[wxruby-users] Segmentation Fault (GC)
Alex Fenton
alex at pressure.to
Fri Aug 15 07:23:46 EDT 2008
Hi Bryan
Bryan Ash wrote:
> I've been ignoring a Garbage Collection Segmentation Fault for some time
> now with the help of GC.disable in my Wx::App.
>
> I'm running Windows XP with:
> ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
> wxruby (1.9.7)
> activerecord (2.1.0)
> sqlite3-ruby (1.2.2)
>
> The application stores the time spent working on tasks in SQLite when
> the user starts and stops a task from the TaskBarIcon.
>
> It uses the following Wx components: Frame, Button, BoxSizer, Grid,
> GridTableBase, GridCellAttr, Panel, StaticText, TaskBarIcon, Image,
> Bitmap, Menu, MiniFrame, SystemSettings, TextCtrl
>
> The segfaults occur when I open and close the "Edit time entries" and
> "Timesheet" frames.
>
> I've attached a cut down version that doesn't interface to SQLite or
> ActiveRecord that still exhibits the problem.
>
Thanks for the report, and particularly for taking the time to produce a
self-contained runnable version. It really helps investigates these things.
I could reproduce your crash on OS X / ruby 1.8.6 with version 1.9.7 (I
don't have an XP machine easily to hand right now, but I'd guess it's
the same error). I traced the crash to problems with the memory
management of destroyed Menus (as popped-up by the TaskBarIcon).
However, I also tried it with the latest SVN HEAD and the crashes don't
occur. I recently applied a fix for some similar Menu bugs and I think
this has resolved the problem you're finding too.
Unless you have a compiler set up, there's no workaround for now except
to keep using GC.disable. However I'll test on Windows before the next
release to confirm this is fixed there too. Hopefully we will have a
next release in a week or two.
cheers
alex
More information about the wxruby-users
mailing list