I have an application I'm writing that uses multiple threads. The thread when active processes a set folder and adds information in a listIconGadget.
I have a timer that counts down and then calls a procedure that processes the items in the list that the thread has added to it.
In this procedure consists of a loop that takes the first row from the list, processes it and then removes it. Once all items have been processed the procedure quits.
However, when I use:
dataToProcess$ = GetGadgetItemText(#gadget_processlist,0,0)
The value that is put in the variable is not correct and seems to be from an entirelly different gadget elsewhere in the application. If I print the variable and the getGadget to the debug window both values are different. The value printed directly from the gadget is correct, the variable is not.
Does anyone know what and why this is happening. I can't find any logical explaination for it. I thought it might have been a threading thing but even with the threads stopped it still does it. The procedure is also causing an 'Invalid memory access' error, but again I'm not sure why.
I can't post the procedure code at the mo because I'm at work but any suggestions and help would be appreciated.
My System:
Windows XP Pro x64 Edition
2Gb RAM
GeForce 6800GT 256Mb
I've also tested on a 32Bit Windows XP Pro as well with the same results.
			
			
									
									
						Variables getting wrong value
- 
				phuckstepp
 - User

 - Posts: 19
 - Joined: Tue Dec 27, 2005 12:10 pm
 - Location: United Kingdom
 - Contact:
 
- 
				phuckstepp
 - User

 - Posts: 19
 - Joined: Tue Dec 27, 2005 12:10 pm
 - Location: United Kingdom
 - Contact:
 
- 
				Steve Elliott
 - Enthusiast

 - Posts: 109
 - Joined: Sun Jan 01, 2006 9:34 pm
 - Location: Wales, UK
 
When will v4 be available?  Asked the same question myself - see Henrik's reply:
viewtopic.php?t=18451
			
			
									
									
						viewtopic.php?t=18451
when it's done... probably monday
			
			
									
									( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
						( The path to enlightenment and the PureBasic Survival Guide right here... )
didn't say *which* monday 
			
			
									
									( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
						( The path to enlightenment and the PureBasic Survival Guide right here... )
- 
				phuckstepp
 - User

 - Posts: 19
 - Joined: Tue Dec 27, 2005 12:10 pm
 - Location: United Kingdom
 - Contact:
 
you could use mutex stuff if necessary, or critical section coding...
			
			
									
									( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
						( The path to enlightenment and the PureBasic Survival Guide right here... )

