[fxruby-users] no clean exit

James Johnson lyle at lylejohnson.name
Fri Sep 25 14:51:54 EDT 2009

On Sep 25, 2009, at 1:00 PM, Björn Bergqvist wrote:

> when I quit the application I'm currently developing there is a lot of
> messages popping up (see below). I've not discovered any problems when
> running the application, but have I done something wrong?

I don't think you're doing anything wrong. It doesn't seem to happen  
on every FXRuby app, but I too have seen it crash on exit (from Ruby  
1.9.1) in several cases, e.g.


It's been awhile since I've had time to look into this (or much else  
FXRuby related), but IIRC the problem boils down to the more or less  
random way that garbage collection occurs during finalization on exit.  
While your program's running, if you (for example) destroy a parent  
object, FOX will subsequently destroy the child object(s), and the  
Ruby objects associated with them get cleaned up in an orderly  
fashion. When the Ruby interpreter is exiting, however, it is possible  
that the child object will be GC'd before the parent, leaving dangling  
pointers lying around. I'm not really sure how to fix it at this point.

More information about the fxruby-users mailing list