Well, this might be the end of those dreaded Handle errors popping up randomly in 
PicoGUI clients! While testing a clock written with PicoGUI (more on that in a later 
post) I found a very reproducible way to cause those errors, (Speed up the clock and 
leave it running), and traced it to bad handle numbers.

No problem with the red-black tree or any of the /hard/ stuff, the simple function 
that generates handle numbers was generating illegal handle numbers!
What threw me right away was a handle of 0x0000. This is reserved for null, so not 
surprisingly the tree got a bit confused. It also turns out (after extensive testing) 
that the highest possible handle value (in this case 0xFFFF) also causes handle 
errors. I'm not sure why this is the case, but after eliminating the 0x0000 and 
0xFFFF, the code has run through about 100000 handle create/delete cycles in this 
clock and it's still ticking.

--
To the systems programmer, users and applications server only to provide a 
test load.


_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to