Re: XForms: A bug?

Steve Lamont (spl@szechuan.ucsd.edu)
Sat, 28 Nov 98 07:20:58 PST

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

> > When I run the program , it crashes and dbx shows me the following:
>
> > 1 find_xbounds(0x0, 0x0, 0x10018e80, 0x10018e84)
> ["xyplot.c":1994,0x5ff9e77c]
> > 2 fl_set_xyplot_xbounds(0x10018d78, 0x0, 0x10018d78, 0x10018e84)
> ["xyplot.c":1903, 0x5ff9e498]
>
> I don't know what the cause might be, but set_xyplot_xbounds() does
> not take 4 arguments, and it looks suspicious that
> the last two values are not the same (10.0, and 10.0). Make sure
> that you go through and understand all warnings from the compiler.

Actually, this is normal behavior from the debugger for code to which
it does not have access or for which there do not exist symbol
tables. It just shows whatever junk it finds on the stack.

I thought about this a little after I posted my previous response and
I realized that since this was on a SGI platform, the argument list is
about what I'd expect. The SGI argument passing convention puts
doubles or (I believe) floats in registers rather than passing them on
the stack.

Having said that, I do suspect some sort of coding error on the part
of the user. The innards of fl_set_xyplot_xbounds() and
fl_set_xyplot_xbounds() are pretty straightforward.

Ah! A thought:

If you call fl_set_xyplot_xbounds() and/or fl_set_xyplot_ybounds()
before you call fl_set_xyplot_data() this will produce a core dump as
experienced by the user:

fl_set_xyplot_xbounds( fd_try->plot, 10, 10 );
fl_set_xyplot_ybounds( fd_try->plot, 10, 10 );
fl_set_xyplot_data( fd_try->plot, x, y, 100, "foo", "bar", "baz" );

I just confirmed this by experiment on a Sun SPARC 5.

I dunno if you'd classify this as a bug or not. I guess some variable
validity checking in the bounds routines would eliminate this.

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/