Page 1 of 1

Variables getting wrong value

Posted: Mon Jan 09, 2006 12:43 pm
by phuckstepp
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.

Posted: Mon Jan 09, 2006 3:10 pm
by Dr. Dri
the string library is not thread-safe
should be fixed in the 4 version

Dri ;)

Posted: Mon Jan 09, 2006 3:41 pm
by phuckstepp
Hmm, thats what I thought. Any ideas when we can expect v4? There seems to be posts back from 2004 about it.

Posted: Mon Jan 09, 2006 4:40 pm
by Steve Elliott
When will v4 be available? Asked the same question myself - see Henrik's reply:

viewtopic.php?t=18451

Posted: Mon Jan 09, 2006 5:53 pm
by blueznl
when it's done... probably monday

Posted: Mon Jan 09, 2006 9:59 pm
by Bonne_den_kule
...or next month I guess.

Posted: Tue Jan 10, 2006 12:28 am
by blueznl
didn't say *which* monday :-)

Posted: Tue Jan 10, 2006 8:52 am
by phuckstepp
guess I'll have to wait for v4's release then.

Thanks.

Posted: Tue Jan 10, 2006 10:02 am
by blueznl
you could use mutex stuff if necessary, or critical section coding...