Alvin wrote:

> Hello,
> 
> <snip>
> 
> The segfault is happening when I make a copy() of image(). From what I can
> see using gdb is that image() doesn't have any width and height??
> 
> This is strange because the app is created using FLUID and the image is
> set using FLUID (fluid stores the RGB data in the cxx file).
> 
> If I comment out the make_deimage() call in Fl_Image_Button::image(), then
> the app appears as normal - with the image shown on the widget.
> 
> What am I doing wrong?
> 
> Alvin

Ok, this is not an issue with calling make_deimage() withing 
Fl_Image_Button::image().

After more testing, I have narrowed the problem to a Fl_Double_Window that I 
create manually (not in FLUID).

What I do is have have a global Fl_Double_Window *wnd2 which is 'new'ed in 
the implementation file. So the object is created as the app is loading 
(static construction??)

I believe that this happens before the main fltk app and 
fl_register_images() is called. So, this isn't a FLTK bug at all. It has 
something to do with the (implicit) order of how the windows in the apps are 
constructed.

Sorry for the noise.

Alvin


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to