[fxruby-users] Re: FXRuby issues

Gonzalo Garramuno ggarra at advancedsl.com.ar
Tue Sep 6 14:20:11 EDT 2005

Yes, it isn't that.  What's more, I've been trying to debug a still present
crashing bug that will crash the application after some time of use (an hour
or so), and I now have a definitive clue as to what's causing it.

In my code, I basically have code that does:

 @image = FXBMPImage.new(@window.getApp, nil, IMAGE_SHMI|IMAGE_SHMP,
    width, height)

whenever the user zooms in/out on the canvas (or the canvas is resized as a
result of the map growing).  I have verified that width, height and @window
are valid thru printing statements, yet I have noticed that sometimes the
FXBMPImage.new() function does not return.
Instead it seems to pop the ruby stack, returning from the current function,
leaving @image unitialized and uncreated (ie. @image.create and subsequent
code is never reached).
My guess is that there's probably some sort of exception being raised in the
FXBMPImage constructor of which ruby is never made aware of.
This eventually leads to a crash later on in my code, whenever a DC context
wants to be inited with that image, as it remains unitialized.

On that subject, is there any way I can check if an element is created.
Something like @image.created?

More information about the fxruby-users mailing list