csete / gpredict

Gpredict satellite tracking application
http://gpredict.oz9aec.net/
GNU General Public License v2.0
865 stars 251 forks source link

Crash After Closing Antenna Control and Attempting to Open Menu #325

Open spsvihla opened 1 year ago

spsvihla commented 1 year ago

I've noticed that Gpredict crashes with a segfault when I try to open the module configuration menu after closing the antenna control. This behavior seems related to issue #279.

OS: Ubuntu 16.04.1 Kernel: 4.15.0-142-generic CPU: Intel (R) Core i7-7576U @ 3.50 GHz Gpredict Version: 2.3.115-0f3be Rotator Control: Yarsu G-5500 az-el rotator with the Yaesu GS-232B PC interface

Here is how to reproduce the issue:

  1. Open the antenna control, track, and engage
  2. Un-engage, un-track, and close the antenna control
  3. Open the satellite module popup and select "configure"

What I've learned so far is that gtk_rot_ctrl_timeout_cb is being called after rot_ctrl_destroy (which should have removed the corresponding timeout source from the default main context). At gtk-rot-ctrl.c:804 it attempts to access a property of ctrl->AzSet (at this point ctrl->SetAz is NULL) and segfaults.

I get the following error messages:

(gpredict:11045): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkRotCtrl' Segmentation fault