stellarium icon indicating copy to clipboard operation
stellarium copied to clipboard

Segfault in Observing Lists

Open gzotti opened this issue 2 years ago • 1 comments

Moved from a different issue (#2232):

Like many others I am also interested in creating, exporting and importing observing lists in Stellarium and would like to see this feature become a reality. In trying to understand what's going on I just run Stellarium through gdb. I guess you developers do this all the time. At this point I cannot understand what is going wrong and cannot contribute a solution. But in case it is useful for you I post the backtrace below after a segfault caused by importing an observing list previously created in the same program. I will keep looking anyway.

OS: openSUSE Tumbleweed (rolling release), Stellarium version 0.22.1 (built from source)

Thread 1 "stellarium" received signal SIGSEGV, Segmentation fault.
0x00007fffedf86aa0 in QVariant::toString() const () from /lib64/libQt5Core.so.5
Missing separate debuginfos, use: zypper install Mesa-dri-nouveau-debuginfo-22.0.1-307.2.x86_64 Mesa-libGL1-debuginfo-22.0.1-307.1.x86_64 Mesa-libglapi0-debuginfo-22.0.1-307.1.x86_64 krb5-debuginfo-1.19.2-4.5.x86_64 libLLVM14-debuginfo-14.0.0-1.2.x86_64 libQt5Concurrent5-debuginfo-5.15.2+kde294-5.2.x86_64 libQt5Core5-debuginfo-5.15.2+kde294-5.2.x86_64 libQt5DBus5-debuginfo-5.15.2+kde294-5.2.x86_64 libQt5Gui5-debuginfo-5.15.2+kde294-5.2.x86_64 libQt5Positioning5-debuginfo-5.15.2+kde6-2.9.x86_64 libQt5PrintSupport5-debuginfo-5.15.2+kde294-5.2.x86_64 libQt5Widgets5-debuginfo-5.15.2+kde294-5.2.x86_64 libQtQuick5-debuginfo-5.15.2+kde43-2.1.x86_64 libX11-6-debuginfo-1.7.5-1.1.x86_64 libX11-xcb1-debuginfo-1.7.5-1.1.x86_64 libXcursor1-debuginfo-1.2.1-1.1.x86_64 libavcodec58_134-debuginfo-4.4.1-10.4.x86_64 libavformat58_76-debuginfo-4.4.1-10.4.x86_64 libavutil56_70-debuginfo-4.4.1-10.4.x86_64 libbluray2-debuginfo-1.3.1-1.1.x86_64 libdouble-conversion3-debuginfo-3.2.0-1.1.x86_64 libexpat1-debuginfo-2.4.8-1.1.x86_64 libfreetype6-debuginfo-2.12.0-1.1.x86_64 libgcc_s1-debuginfo-12.0.1+git192423-1.2.x86_64 libglib-2_0-0-debuginfo-2.72.0-2.1.x86_64 libgomp1-debuginfo-12.0.1+git192423-1.2.x86_64 libharfbuzz-subset0-debuginfo-4.2.0-1.2.x86_64 libharfbuzz0-debuginfo-4.2.0-1.2.x86_64 libicu70-debuginfo-71.1-1.1.x86_64 libjpeg8-debuginfo-8.2.2-68.1.x86_64 libminizip1-debuginfo-1.2.11-19.1.x86_64 libopenmpt0-debuginfo-0.6.2-1.1.x86_64 libqt5-qtwebengine-debuginfo-5.15.9-1.2.x86_64 libre2-9-debuginfo-20220401-45.1.x86_64 librtmp1-debuginfo-2.4.20151223.fa8646d-1.83.x86_64 libsndfile1-debuginfo-1.1.0-1.1.x86_64 libstdc++6-debuginfo-12.0.1+git192423-1.2.x86_64 libsystemd0-debuginfo-250.4-4.1.x86_64 libudev1-debuginfo-250.4-4.1.x86_64 libunistring2-debuginfo-1.0-1.1.x86_64 libva-drm2-debuginfo-2.14.0-1.2.x86_64 libva2-debuginfo-2.14.0-1.2.x86_64 libx264-161-debuginfo-0.161+git20200912.d198931a-2.30.x86_64 libx265-199-debuginfo-3.5-2.27.x86_64 libxvidcore4-debuginfo-1.3.7-1.36.x86_64 libz1-debuginfo-1.2.11-19.1.x86_64 mozilla-nss-debuginfo-3.76.1-2.1.x86_64
(gdb) backtrace 
#0  0x00007fffedf86aa0 in QVariant::toString() const () from /lib64/libQt5Core.so.5
#1  0x0000000000696be3 in ObsListCreateEditDialog::obsListImportListButtonPresssed() ()
#2  0x00007fffedf7d488 in ?? () from /lib64/libQt5Core.so.5
#3  0x00007fffef1950d2 in QAbstractButton::clicked(bool) () from /lib64/libQt5Widgets.so.5
#4  0x00007fffef19534a in ?? () from /lib64/libQt5Widgets.so.5
#5  0x00007fffef196f10 in ?? () from /lib64/libQt5Widgets.so.5
#6  0x00007fffef197133 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /lib64/libQt5Widgets.so.5
#7  0x00007fffef0e3cde in QWidget::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#8  0x00007fffef0a1b0f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#9  0x00007fffef0a9614 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#10 0x00007fffedf46b5a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#11 0x00007fffef0a8123 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib64/libQt5Widgets.so.5
#12 0x00007fffef3ca786 in ?? () from /lib64/libQt5Widgets.so.5
#13 0x00007fffef3b4608 in QGraphicsItem::sceneEvent(QEvent*) () from /lib64/libQt5Widgets.so.5
#14 0x00007fffef3d72e1 in ?? () from /lib64/libQt5Widgets.so.5
#15 0x00007fffef3dce5c in QGraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent*) ()
   from /lib64/libQt5Widgets.so.5
#16 0x00007fffef3e9a51 in QGraphicsScene::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#17 0x00007fffef0a1b0f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#18 0x00007fffedf46b5a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#19 0x00007fffef407370 in QGraphicsView::mouseReleaseEvent(QMouseEvent*) () from /lib64/libQt5Widgets.so.5
#20 0x00007fffef0e3cde in QWidget::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#21 0x00007fffef1905fe in QFrame::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#22 0x00007fffedf468c2 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
   from /lib64/libQt5Core.so.5
#23 0x00007fffef0a1afe in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#24 0x00007fffef0a9614 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#25 0x00007fffedf46b5a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#26 0x00007fffef0a8123 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib64/libQt5Widgets.so.5
#27 0x00007fffef0fcddc in ?? () from /lib64/libQt5Widgets.so.5
#28 0x00007fffef1001f5 in ?? () from /lib64/libQt5Widgets.so.5
#29 0x00007fffef0a1b0f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#30 0x00007fffedf46b5a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
--Type <RET> for more, q to quit, c to continue without paging--
#31 0x00007fffee848a77 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from /lib64/libQt5Gui.so.5
#32 0x00007fffee81e86c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /lib64/libQt5Gui.so.5
#33 0x00007fffe45a1e9a in ?? () from /lib64/libQt5XcbQpa.so.5
#34 0x00007fffea449122 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#35 0x00007fffea4494b8 in ?? () from /lib64/libglib-2.0.so.0
#36 0x00007fffea44956f in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#37 0x00007fffedf9e2b4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /lib64/libQt5Core.so.5
#38 0x00007fffedf4555b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#39 0x00007fffedf4d820 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#40 0x0000000000504def in main ()

Originally posted by @dhdeangelis in https://github.com/Stellarium/stellarium/issues/2232#issuecomment-1101384793

gzotti avatar Apr 20 '22 12:04 gzotti

Same happens on 0.22.1 macos x86_64 and macos arm64 with the same symptoms:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000028
Exception Codes:       0x0000000000000001, 0x0000000000000028
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [29554]

VM Region Info: 0x28 is not in any region.  Bytes before following region: 4421136344
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      107853000-1088f9000    [ 16.6M] r-x/r-x SM=COW  ...OS/stellarium

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   QtCore                        	       0x10b7eca20 QVariant::toString() const + 16
1   stellarium                    	       0x10822596c ObsListCreateEditDialog::obsListImportListButtonPresssed() + 1020
2   QtCore                        	       0x10b7ddd0c QMetaObject::activate(QObject*, int, int, void**) + 3132
3   QtWidgets                     	       0x10a5a9c3f 0x10a4af000 + 1027135

offermannu avatar Apr 20 '22 12:04 offermannu

Hello @gzotti!

The bug or issue has been fixed! You may test it via building Stellarium from source code or wait the weekly development snapshot...

github-actions[bot] avatar Sep 22 '22 10:09 github-actions[bot]

Hello @gzotti!

Please check the fresh version (development snapshot) of Stellarium: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

github-actions[bot] avatar Sep 22 '22 13:09 github-actions[bot]

Hello @gzotti!

Please check the latest stable version of Stellarium: https://github.com/Stellarium/stellarium/releases/latest

github-actions[bot] avatar Oct 01 '22 12:10 github-actions[bot]