|
From: James R. V. Z. <jr...@co...> - 2009-02-18 01:29:35
|
I ran across a reliable segfault with the splot command, with the
current CVS code:
G N U P L O T
Version 4.3 patchlevel 0
last modified February 2009
In particular, this is *without* my proposed changes to fit.c
Here's a run under the debugger:
gnuplot> splot 'lin2.dat',x+y
[New Thread 0xb7843a40 (LWP 27810)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7843a40 (LWP 27810)]
calculate_set_of_isolines (value_axis=FIRST_Z_AXIS, cross=false, this_iso=0xbffb32e0, iso_axis=FIRST_Y_AXIS, iso_min=2, iso_step=0.33333333333333331, num_iso_to_use=10, sam_axis=FIRST_X_AXIS, sam_min=1, sam_step=0.030303030303030304, num_sam_to_use=100, need_palette=false) at plot3d.c:1174
(gdb) backtrace
#0 calculate_set_of_isolines (value_axis=FIRST_Z_AXIS, cross=false, this_iso=0xbffb32e0, iso_axis=FIRST_Y_AXIS, iso_min=2, iso_step=0.33333333333333331, num_iso_to_use=10, sam_axis=FIRST_X_AXIS, sam_min=1, sam_step=0.030303030303030304, num_sam_to_use=100, need_palette=false) at plot3d.c:1174
#1 0x080a808c in plot3drequest () at plot3d.c:1909
#2 0x080571d7 in do_line () at command.c:595
#3 0x0805796d in com_line () at command.c:338
#4 0x0809a6dd in main (argc=1, argv=0xbffb35a4) at plot.c:659
(gdb)
Here's lin2.dat:
---------------------------------------------
#octave:9> for x=[1:4];for y=[2:5]; fprintf('%f %f %f 1\n',x,y,10*x+2*y+randn);end;end
1.000000 2.000000 13.753875 1
1.000000 3.000000 15.843192 1
1.000000 4.000000 17.752269 1
1.000000 5.000000 18.819627 1
2.000000 2.000000 25.480149 1
2.000000 3.000000 26.217588 1
2.000000 4.000000 28.555638 1
2.000000 5.000000 30.757950 1
3.000000 2.000000 33.879955 1
3.000000 3.000000 36.190724 1
3.000000 4.000000 39.199289 1
3.000000 5.000000 40.153219 1
4.000000 2.000000 43.413695 1
4.000000 3.000000 45.938903 1
4.000000 4.000000 49.196757 1
4.000000 5.000000 50.136290 1
#octave:10> diary off
-----------------------------------------
All these commands work fine:
gnuplot> splot 'fit2.dat'
gnuplot> splot x+y
gnuplot> splot x+y,'fit2.dat'
It only fails when plotting the data file first, then the function.
I've had other data files fail, but demo/glasses.dat succeeds.
I set a breakpoint at plot3d.c:1174 in calculate_set_of_isolines() and
followed execution. When j=0 and i=99, the function reaches end of
the linked list, sets this_iso to zero, then sets points to zero. The
next time through when j=1 and i=0, the function dies trying to access
points[i].x. I haven't been able to identify the cause.
I have a couple of other binaries installed.
This version also crashes:
G N U P L O T
Version 4.3 patchlevel 0
last modified January 2007
This version is okay:
G N U P L O T
Version 4.2 patchlevel 4
last modified Sep 2008
Does anyone else see this?
- Jim Van Zandt
|