[fxruby-users] GP on Windows XP with threading

Joel VanderWerf vjoel at path.berkeley.edu
Mon May 23 17:41:31 EDT 2005

Steve Tuckner wrote:
> Hello all,
> I have written a relatively small app that is a kind of IRB written in 
> Fox. You enter an expression into an edit box on one tab and then the 
> app switches to another tab to display the results. It also connects 
> using DRb server which contains an object that is part of the IRB's 
> binding (I don't use the IRB class in Ruby by the way). If my 
> expressions don't cause a DRb transaction to occur, then the application 
> doesn't crash. But if it does then I can crash the app (GP) by doing 
> 1-10 expressions involving the remote object.
> I am not really sure how to debug this issue further other than 
> isolating it which I am willing to do, but I am not sure what to isolate.

Some very generic advice is all I can offer: the randomness of the 
problem suggests a GC-related bug--something is being collected but it 
is actually a live object. This is unfortunately something that happens 
from time to time with ruby extension programming (not just FXRuby).

Try putting a "GC.disable" early in the app that is crashing. If that 
"fixes" it, then you can try isolating it by putting in some GC.start 
calls here and there and seeing when it crashes, and what objects were 
created before the last crash (logging the number of objects of each 
type using ObjectSpace_each_object may be useful, but be careful not to 
keep any extra references to those objects). I wish I knew a better way...

More information about the fxruby-users mailing list