Re: XForms: flimage_is_supported() seg-fault!

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 8 Dec 99 07:02:12 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> this one's driven me nuts ;-)
>
> so, could it be, there is a problem with flimage_is_supported() ?

Yes. There is a bug.

The problem is an uninitialized internal data structure used in
identifying images.

The workaround is to call one or more of the flimage_enable_XXX()
functions to cause the internal data structure to be initialized.

For example, in your code,

int main (int argc, char *argv[])
{
FD_testh1 * fd_hauptformular; // form handel

// Anfang der Oberflaeche
fl_initialize(&argc, argv, "",0,0);

/*
* add the following to enable PNM, which one would believe should be
* enabled by default.
*/

flimage_enable_pnm();

fd_hauptformular = create_form_testh1();
fl_set_object_bw(fd_hauptformular->kanwas, 0);
fl_add_canvas_handler(fd_hauptformular->kanwas, Expose,
expose_kanwas, 0);

fl_show_form(fd_hauptformular->testh1,
FL_PLACE_FREE,FL_FULLBORDER,"kki");

fl_do_forms();
}

I've suggested a bugfix to TC.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/