×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Segmentation fault when parking the telescope simulator

  • Posts: 456
  • Thank you received: 76
I'm getting a segmentation fault when parking the telescope simulator.
Below is the stack trace from gdb. However some functions are showing as ??() which is not much help.
Thread 1 "kstars" received signal SIGSEGV, Segmentation fault.
0x00000000005f76a0 in ?? ()
(gdb) bt
#0  0x00000000005f76a0 in ?? ()
#1  0x0000000000719d6f in ?? ()
#2  0x00000000005b3c57 in ?? ()
#3  0x00007ffff3d21d2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00000000005a1ce1 in ?? ()
#5  0x00000000006f969e in ?? ()
#6  0x00000000005b4455 in ?? ()
#7  0x00007ffff3d21d2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff3d2e5c8 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff3d22bb3 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff4acf05c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff4ad4516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff3cf338b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff3d485ed in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff3d48af1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fffeeef41a7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007fffeeef4400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007fffeeef44ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff3d497eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff3cf0b4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff3cf8bec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x0000000000484273 in ?? ()
#22 0x00007ffff25e3830 in __libc_start_main (main=0x4827b0, argc=1, argv=0x7fffffffdf58, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf48) at ../csu/libc-start.c:291
#23 0x0000000000491219 in _start ()
(gdb) 

Here is a screenshot of what it looks like when it crashed.... If I dont have gdb running kstars then the entire application just vanishes.
7 years 2 months ago #13805
Attachments:

Please Log in or Create an account to join the conversation.

Can't replicate it here. You're building from source or PPA? Sometimes PPA builds produce these weird crashes.
7 years 2 months ago #13817

Please Log in or Create an account to join the conversation.

  • Posts: 456
  • Thank you received: 76
From the PPA, I've replicated on 3 systems.
1 Physical PC in the observatory installed kstars and indi with PPA
2 My laptop running linux in a vm (installed kstars and indi with PPA)
3 Another laptop running linux (installed kstars and indi with PPA)
7 years 2 months ago #13818

Please Log in or Create an account to join the conversation.

  • Posts: 314
  • Thank you received: 34
I can reproduce this from kstars git build (pulled 10 minutes ago):
Reading symbols from kstars...done.
(gdb) r
Starting program: /mnt/store/build/kstars/build/kstars/kstars 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe35f0700 (LWP 16763)]
[New Thread 0x7fffe17d7700 (LWP 16764)]
[New Thread 0x7fffd9bca700 (LWP 16765)]
[New Thread 0x7fffd93c9700 (LWP 16766)]
[New Thread 0x7fffd8bc8700 (LWP 16767)]
[New Thread 0x7fffc6e03700 (LWP 16776)]
[New Thread 0x7fffc7fff700 (LWP 16777)]
[New Thread 0x7fffc77fe700 (LWP 16778)]
[New Thread 0x7fffc6602700 (LWP 16779)]
[New Thread 0x7fffc5e01700 (LWP 16780)]
[New Thread 0x7fffbfb08700 (LWP 16846)]
[Thread 0x7fffbfb08700 (LWP 16846) exited]
[New Thread 0x7fffbfb08700 (LWP 16847)]
[New Thread 0x7fffd81e1700 (LWP 16848)]
[New Thread 0x7fffc6ffd700 (LWP 16849)]
[Thread 0x7fffc6ffd700 (LWP 16849) exited]
[Thread 0x7fffd81e1700 (LWP 16848) exited]
[New Thread 0x7fff9ae71700 (LWP 16878)]
 
Program received signal SIGSEGV, Segmentation fault.
0x00000000006479df in ISD::CCD::getChip (this=0x0, cType=ISD::CCDChip::PRIMARY_CCD)
    at /home/paul/build/kstars/kstars/indi/indiccd.cpp:1601
1601            return primaryChip;
(gdb) bt
#0  0x00000000006479df in ISD::CCD::getChip (this=0x0, cType=ISD::CCDChip::PRIMARY_CCD)
    at /home/paul/build/kstars/kstars/indi/indiccd.cpp:1601
#1  0x00000000007c44e7 in Ekos::Guide::abort (this=0x3eb0f50) at /home/paul/build/kstars/kstars/ekos/guide/guide.cpp:658
#2  0x00000000007c5797 in Ekos::Guide::setMountStatus (this=0x3eb0f50, newState=ISD::Telescope::MOUNT_PARKING)
    at /home/paul/build/kstars/kstars/ekos/guide/guide.cpp:1066
#3  0x00000000005e12ae in Ekos::Guide::qt_static_metacall (_o=0x3eb0f50, _c=QMetaObject::InvokeMetaMethod, _id=25, 
    _a=0x7fffffffd130) at /home/paul/build/kstars/build/kstars/moc_guide.cpp:382
#4  0x00007ffff2462c80 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#5  0x00000000005e3c1b in Ekos::Mount::newStatus (this=0x3d64f60, _t1=ISD::Telescope::MOUNT_PARKING)
    at /home/paul/build/kstars/build/kstars/moc_mount.cpp:359
#6  0x0000000000797555 in Ekos::Mount::updateTelescopeCoords (this=0x3d64f60)
    at /home/paul/build/kstars/kstars/ekos/mount/mount.cpp:243
#7  0x00000000005e33cc in Ekos::Mount::qt_static_metacall (_o=0x3d64f60, _c=QMetaObject::InvokeMetaMethod, _id=8, 
    _a=0x7fffffffd370) at /home/paul/build/kstars/build/kstars/moc_mount.cpp:225
#8  0x00007ffff2462c80 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#9  0x00007ffff246f218 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib64/libQt5Core.so.5
#10 0x00007ffff2463ccb in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#11 0x00007ffff347126c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#12 0x00007ffff347675e in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff243b36a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#14 0x00007ffff2489b03 in QTimerInfoList::activateTimers() () from /usr/lib64/libQt5Core.so.5
#15 0x00007ffff248a091 in ?? () from /usr/lib64/libQt5Core.so.5
#16 0x00007fffecbeefc7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#17 0x00007fffecbef220 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00007fffecbef2cc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#19 0x00007ffff248a5bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQt5Core.so.5
#20 0x00007ffff243a1ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#21 0x00007ffff2441c8c in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#22 0x000000000045e181 in main (argc=1, argv=0x7fffffffdc48) at /home/paul/build/kstars/kstars/main.cpp:277
(gdb)
 
--= human, without Windows™ =--
pls excuse my bad english! :)
7 years 2 months ago #13820

Please Log in or Create an account to join the conversation.

  • Posts: 314
  • Thank you received: 34
It seems only to happen if you do not use the connect button that connects all devices. If you only connect the Telescope Simulator and not the CCD Simulator it will segfault
--= human, without Windows™ =--
pls excuse my bad english! :)
The following user(s) said Thank You: Derek
Last edit: 7 years 2 months ago by pauledd.
7 years 2 months ago #13822

Please Log in or Create an account to join the conversation.

  • Posts: 456
  • Thank you received: 76
Yes it looks like the ccd in particular,
It works if I connect the ccd driver.

Also the top of your stack trace has...
ISD::CCD::getChip
Maybe it needs a null check here?
7 years 2 months ago #13823

Please Log in or Create an account to join the conversation.

yeah please pull again and try.
The following user(s) said Thank You: pauledd, Derek
7 years 2 months ago #13826

Please Log in or Create an account to join the conversation.

  • Posts: 456
  • Thank you received: 76
A side question, how do I get the function name in the back trace instead of '?? ()'. Is the only way to build kstars from source?
Thanks,
Derek
7 years 2 months ago #13832

Please Log in or Create an account to join the conversation.

  • Posts: 314
  • Thank you received: 34
Did you build kstars with Debug flag?
I built mine with:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..

@knro thanks, works now.
--= human, without Windows™ =--
pls excuse my bad english! :)
The following user(s) said Thank You: Derek
Last edit: 7 years 2 months ago by pauledd.
7 years 2 months ago #13835

Please Log in or Create an account to join the conversation.

  • Posts: 456
  • Thank you received: 76
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..

Thanks, I'll try that. I was using the PPA package so I guess that would not have the debug info compiled in.
7 years 2 months ago #13836

Please Log in or Create an account to join the conversation.

They do. sudo apt-get install kstars-bleeding-dbg
The following user(s) said Thank You: Derek
7 years 2 months ago #13840

Please Log in or Create an account to join the conversation.

Time to create page: 0.264 seconds