Hi Seems that the last round of commits makes bigdemo crash fairly quickly. Guessing it''s something to do with either the Window or fixmodule change. Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00034fbc in rb_obj_is_kind_of (obj=3825080, c=1839676) at object.c:523 523 object.c: No such file or directory. Any hints? alex
I can narrow this down a bit, though I haven''t got a solution. It crashes several samples, without user interaction (bigdemo, treectrl, listbook), but others seem fine (textctrl, unicode, minimal). It''s something to do with the change to fixmodule.rb, that now does if (rb_obj_is_kind_of(obj, (((swig_class *) (type->clientdata))->klass))) { ... for some methods. The patch didn''t apply cleanly, so hopefully I have made a mistake in integrating it - perhaps Roy you could check against what was meant to happen. Otherwise, perhaps it''s a problem with certain kinds of events (TreeEvent? IdleEvent in bigdemo). Keen to get this fixed so we can do a release. thanks alex Alex Fenton wrote:> Hi > > Seems that the last round of commits makes bigdemo crash fairly quickly. > Guessing it''s something to do with either the Window or fixmodule change. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > 0x00034fbc in rb_obj_is_kind_of (obj=3825080, c=1839676) at object.c:523 > 523 object.c: No such file or directory. > > Any hints? > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Alex Fenton wrote:> Seems that the last round of commits makes bigdemo crash fairly quickly. > Guessing it''s something to do with either the Window or fixmodule change. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > 0x00034fbc in rb_obj_is_kind_of (obj=3825080, c=1839676) at object.c:523 > 523 object.c: No such file or directory. > > Any hints? > >Hmm... That is pretty strange. Not having that problem on my system. It seems almost like something is wrong in the inheritance chain somewhere (which is what obj_is_kind_of walks through. I''d be curious if you could track it down to a specific function or object. Does it happen with Minimal? Roy
> I''d be curious > if you could track it down to a specific function or object. Does it > happen with Minimal? >Haven''t been able to yet - have tried gradually adding things (TextCtrl, Sizer, Idle handler) to minimal but can''t get it to crash. The others just crash seemingly randomly. I guess what I need to do is add a C++ line before your tweak to fixmodule that spits out the arguments that it''s about to call rb_obj_is_kind_of with. I don''t know C++ so I wonder if someone could suggest a debugging line (printf?) that will help pin down the problem with: if (rb_obj_is_kind_of(obj, (((swig_class *) (type->clientdata))->klass))) { thanks alex
Alex Fenton wrote:> Seems that the last round of commits makes bigdemo crash fairly quickly. > Guessing it''s something to do with either the Window or fixmodule change. >Tracked it down a bit further. It seems as some time, SWIG tracking is returning a broken ruby object - if you call rb_inspect on it it segfaults. It''s meant to be some sort of Event object that''s generated continuously and on lots of types of Windows. I can''t work out what sort it''s meant to be, but doesn''t seem to be IdleEvent. The attached patch avoids the crash. It doesn''t get to the bottom of what the tracking problem is on OS X but allows us to proceed. cheers alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixmodule_rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20061001/40de7dc4/attachment.pl
Alex, Good work! This fixes my crashing with my minimal sample when I try GC.start. Roy Alex Fenton wrote:> Alex Fenton wrote: >> Seems that the last round of commits makes bigdemo crash fairly >> quickly. Guessing it''s something to do with either the Window or >> fixmodule change. >> > Tracked it down a bit further. It seems as some time, SWIG tracking is > returning a broken ruby object - if you call rb_inspect on it it > segfaults. It''s meant to be some sort of Event object that''s generated > continuously and on lots of types of Windows. I can''t work out what > sort it''s meant to be, but doesn''t seem to be IdleEvent. > > The attached patch avoids the crash. It doesn''t get to the bottom of > what the tracking problem is on OS X but allows us to proceed. > > cheers > alex > > ------------------------------------------------------------------------ > > Index: wxruby2/swig/fixmodule.rb > ==================================================================> --- wxruby2/swig/fixmodule.rb (revision 602) > +++ wxruby2/swig/fixmodule.rb (working copy) > @@ -82,7 +82,7 @@ > end > # Patch submitted for SWIG 1.3.30 > if(line.index("if (strcmp(type->name, type_name) == 0) {")) > - line = " if (rb_obj_is_kind_of(obj, (((swig_class *) (type->clientdata))->klass))) {" > + line = " if ( value != Qnil && rb_obj_is_kind_of(obj, sklass->klass) ) {" > end > #TODO 1.3.30 > # end > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users
Roy Sutton wrote:> Good work! This fixes my crashing with my minimal sample when I try > GC.start >Thanks for testing. Applied to SVN. I''m going to tag and release 0.0.36 later today. Will pick up your ruby 1.9 patch after that. Did you mean to send a patch for typedefs.i ? alex
Alex Fenton wrote:> I''m going to tag and release 0.0.36 later today. Will pick up your ruby > 1.9 patch after that. Did you mean to send a patch for typedefs.i ? > >Well, yes... Here it is. I''ll download and build the tagged version as soon as you get it ready. If you can send the appropriate SVN command out I won''t have to brush up on my SVN-fu. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: typedefs.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20061002/5ea06298/attachment.pl
Apparently Analagous Threads
- [850] trunk/wxruby2/samples/bigdemo/bigdemo.rb: Fix crasher when selecting first-level category in tree
- [978] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Fix crazy crashers on MSW; fix scrolling/drawing position; safe path to bitmap
- bigdemo patches
- TreeEvent patch
- Bigdemo Menu Demo