Re: XForms: seg fault

Steve Lamont (spl@szechuan.ucsd.edu)
Sun, 21 Jun 98 21:29:59 PDT

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

> >> I have no idea why this line is giving me a seg fault
> >> fl_set_input (fdui_output->output_field,"");

Just for chuckles, try printing out the value of fdui_output->output_field
and fdui_output immediately after you create fdui_output and then just
before the function call to fl_set_input():

fprintf( stderr, "fdui_output = %p\n", fdui_output );
fprintf( stderr, "fdui_output->output_field = %p\n",
fdui_output->output_field );

and see if they've changed in the interim (or do the same thing by
setting breakpoints with your favorite debugger and using the
appropriate debugger command).

Beyond that, you might want to check the contents of the output_field
structure to make sure nothing there, especially the `spec' member,
has changed (which would mean your code has inadvertently walked on
something).

Find a good memory debugging tool, such as dbmalloc, available on the
net, and use it.

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