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. Any suggestions to debug this problem would be great. I really like the functionality that I have built into it and don''t relish duplicating this functionality using a different toolkit (ie. WxRuby or VRuby). I recently upgraded it to use Fox 1.2 hoping that that would fix it, but it didn''t. I am going to try the same thing on Linux to see if it occurs there. I am using 1.8.2-14 on Windows (The Prag/Programmers installation). Thanks, Steve Tuckner P.S. If anyone wants the source to try this with, I will be happy to send it to them.
Sorry to respond to my old post, but I have also now reproduced the problem on Linux. 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. > > Any suggestions to debug this problem would be great. I really like > the functionality that I have built into it and don''t relish > duplicating this functionality using a different toolkit (ie. WxRuby > or VRuby). I recently upgraded it to use Fox 1.2 hoping that that > would fix it, but it didn''t. > > I am going to try the same thing on Linux to see if it occurs there. I > am using 1.8.2-14 on Windows (The Prag/Programmers installation). > > Thanks, > > Steve Tuckner > > P.S. If anyone wants the source to try this with, I will be happy to > send it to them. > _______________________________________________ > fxruby-users mailing list > fxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users >
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...