Summary: | KStars crash when launched on Ubuntu 21.04 | ||
---|---|---|---|
Product: | [Applications] kstars | Reporter: | Anthony <anthony.hinsinger> |
Component: | general | Assignee: | Jasem Mutlaq <mutlaqja> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | normal | CC: | jrlangston11 |
Priority: | NOR | ||
Version: | git | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Anthony
2021-07-13 18:38:32 UTC
Thanks for the report. It doesn't look like it's related directly to KStars per se but some issue with Qt. Yes, it seems to crash when it instanciate the QApplication. The strange thing is it only crash with kstars. I tried to compile a very simple apps with just a QApplication and it launch without any issue. I've also tried to recompile the kstars-bleeding source package on my machine, the same crash happens. Do you think it can be caused by some compilation options used by kstars ? Thks, Anthony. Here is a more detailed backtrace (with qt debug symbols) #0 doActivate<false> (sender=0x0, signal_index=9, argv=argv@entry=0x7fffffffd750) at kernel/qobject.cpp:3768 #1 0x00007ffff5345728 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff5c7e0a0 <QGuiApplication::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffd750) at kernel/qobject.cpp:3946 #2 0x00007ffff56eb6e6 in QGuiApplication::screenAdded (this=<optimized out>, _t1=<optimized out>, _t1@entry=0x555556513360) at .moc/moc_qguiapplication.cpp:389 #3 0x00007ffff56d0ce0 in QWindowSystemInterface::handleScreenAdded (ps=ps@entry=0x555556504810, isPrimary=<optimized out>) at kernel/qwindowsysteminterface.cpp:826 #4 0x00007fffef947240 in QXcbConnection::initializeScreens (this=this@entry=0x5555564dbf00) at qxcbconnection_screens.cpp:413 #5 0x00007fffef91e5f0 in QXcbConnection::QXcbConnection (this=0x5555564dbf00, nativeInterface=<optimized out>, canGrabServer=<optimized out>, defaultVisualId=<optimized out>, displayName=<optimized out>) at qxcbconnection.cpp:103 #6 0x00007fffef921d63 in QXcbIntegration::QXcbIntegration (this=0x5555564d78c0, parameters=..., argc=<optimized out>, argv=<optimized out>) at qxcbintegration.cpp:197 #7 0x00007ffff7fbf513 in QXcbIntegrationPlugin::create (this=<optimized out>, system=..., argv=0x7fffffffe108, argc=@0x7fffffffddac: 1, parameters=...) at qxcbmain.cpp:56 #8 QXcbIntegrationPlugin::create (this=<optimized out>, system=..., parameters=..., argc=@0x7fffffffddac: 1, argv=0x7fffffffe108) at qxcbmain.cpp:53 #9 0x00007ffff56efcbc in init_platform (argv=<optimized out>, argc=@0x7fffffffddac: 1, platformThemeName=..., platformPluginPath=..., pluginNamesWithArguments=...) at kernel/qguiapplication.cpp:1223 #10 QGuiApplicationPrivate::createPlatformIntegration (this=0x5555564cd400) at kernel/qguiapplication.cpp:1481 #11 0x00007ffff56f11d8 in QGuiApplicationPrivate::createEventDispatcher (this=<optimized out>) at kernel/qguiapplication.cpp:1498 #12 0x00007ffff531b426 in QCoreApplicationPrivate::init (this=this@entry=0x5555564cd400) at kernel/qcoreapplication.cpp:834 #13 0x00007ffff56f4152 in QGuiApplicationPrivate::init (this=this@entry=0x5555564cd400) at kernel/qguiapplication.cpp:1527 #14 0x00007ffff5e0bd0d in QApplicationPrivate::init (this=0x5555564cd400) at kernel/qapplication.cpp:513 #15 0x000055555571599d in main (argc=<optimized out>, argv=0x7fffffffe108) at ./kstars/main.cpp:78 one more information, kstars crash with the same backtrace in ubuntu 21.10 (impish), the next stable release. Once again, I've not other Qt application crashing on thoses ubuntu versions. A. one more information, kstars (both stable and indinightly PPA) crash with the same backtrace in ubuntu 21.10 (impish), the next stable release. Once again, I've not other Qt application crashing on thoses ubuntu versions. A. Jasem, I take some time to debug this problem. First, I've compile the source directly (using the same deps as the deb package) with a simple cmake/make ... and ho surprise, it works :) So I 've tired to find differences in compilation options between the deb package and my build, and found the gulty one : LTO Ubuntu has activated LTO by "default" since 21.04 (so dpkg-buildflags ouptut it) and I suspect Qt library or may be another kstars dependency lib is not using it. So I've just added this to the debian/rules file (packaging/linux/debian/rules in your repo) : export DEB_BUILD_MAINT_OPTIONS = optimize=-lto It now works perfect ! I think you can add it without issue with old ubuntu version because it was already disabled by default. I'm adding a PR to the github repo, tell me if it's the right way. Thanks again for you amazing app ! Anthony. I am using kstars 5.5.5 compiled nightly on Kubuntu 21.04 with no issues in this regard. But I use the stable Indi sources compiled too, not nightly. Hope this helps (In reply to James from comment #6) > I am using kstars 5.5.5 compiled nightly on Kubuntu 21.04 with no issues in > this regard. But I use the stable Indi sources compiled too, not nightly. > Hope this helps I mean Kstars 3.5.5 lol Looks like this issue is not directly related to KStars per se, but packages downstream. |