SIGSEV on dragging time control slider
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
gpredict 1.3, built from source with the following added into Makefile.in:
AM_CFLAGS = -g3 -O0
AM_CXXFLAGS = -g3 -O0
Running on:
Ubuntu 12.04 (precise) 32-bit
Kernel Linux 3.2.0-43-generic-pae
Opened time controller window, clicked pause and started dragging the slider. Got a segmentation fault.
Program received signal SIGSEGV, Segmentation fault.
0x0805f84d in create_track (pv=0x839a800) at gtk-polar-plot.c:927
927 points->coords[0] = (double) x;
(gdb) p x
$1 = 100
(gdb) p points
$2 = (GooCanvasPoints *) 0x8223dd0
(gdb) p points->coords
$3 = (double *) 0x0
(gdb) bt
#0 0x0805f84d in create_track (pv=0x839a800) at gtk-polar-plot.c:927
#1 0x0807bdab in gtk_sat_module_timeout_cb (module=0x8245008)
at gtk-sat-module.c:840
#2 0xb781ca7f in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3 0xb781bd86 in g_main_context_dispatch ()
from /lib/i386-linux-gnu/libglib-2.0.so.0
#4 0xb781c125 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5 0xb781c56b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6 0xb7c46b8f in gtk_main () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#7 0x08050e8e in main (argc=1, argv=0xbffff234) at main.c:185
(gdb) p num
$4 = 0
(gdb) p pv
$5 = (GtkPolarPlot *) 0x839a800
(gdb) p pv->pass->details
$6 = (GSList *) 0x0
(gdb) p pv->pass
$7 = (pass_t *) 0x8449ac0
Apparently, in the create_track function, pv->pass->details is a NULL pointer, which causes num to be 0 so that points won't have any coordinates allocated (points->coords points to NULL).
Would it be okay to just return from the create_track function when num is 0?
Should probably check that num is at least 2.
Do you have a pass prediction or rotator controller window open?
Can you provide me with details about which satellite and element set this happens with?
It would also be helpful if you could try and see that this still happens with the latest code from the git repository.
I think checking that num >= 2 would only be a workaround because the caller of create_track should only call the function with valid pass data, so I'd like to understand why this happens.
Thanks!
Both rotator control and radio control windows were open. The satellite is "ESTCUBE 1", I guess the element set number was 156. Couldn't locate the file with "ESTCUBE 1" in /usr/local/share/gpredict.
On second attempt, it did not crash, but I guess it froze somewhere.
The git version seems to be working better. Haven't seen it freeze nor crash so far.
The satellite data is kept under ~/.config/Gpredict/ together with the rest of the configuration.
Ah, thanks!
Time control seems to be working well in the git version of gpredict.
Ok, closing the bug. Feel free to let us know if you encounter the problem again.