Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23.3: Crash on startup (Fedora) #3429

Closed
limburgher opened this issue Sep 26, 2023 · 38 comments
Closed

23.3: Crash on startup (Fedora) #3429

limburgher opened this issue Sep 26, 2023 · 38 comments
Labels
importance: critical Real showstopper, program fails here qt Issues, related to Qt framework state: confirmed A developer can reproduce the issue

Comments

@limburgher
Copy link

Expected Behaviour

Stellarium starts normall.

Actual Behaviour

See attached backtrace

Steps to reproduce

Build on Fedora 39, launch

System

  • Stellarium version: 23.3
  • Operating system: Fedora 39

Logfile

gdb.txt
log.txt

@gzotti
Copy link
Member

gzotti commented Sep 26, 2023

There may be a problem with importing minor bodies. Please try to remove (or rename first if it is important!) your data/ssystem_minor.ini to force resetting to default.

@limburgher
Copy link
Author

This made no difference.

@10110111
Copy link
Contributor

Likely because of 3d1fe8b.

@alex-w alex-w added bug Something likely wrong in the code importance: critical Real showstopper, program fails here labels Sep 26, 2023
@alex-w alex-w added this to the 23.4 milestone Sep 26, 2023
@limburgher
Copy link
Author

Likely because of 3d1fe8b.

Removing that line doesn't fix the crash.

@alex-w
Copy link
Member

alex-w commented Sep 26, 2023

Please try rename ~/.stellarium and check it again

@limburgher
Copy link
Author

No luck.

@alex-w
Copy link
Member

alex-w commented Sep 26, 2023

No luck.

Where we can see spec file for RPM?

@limburgher
Copy link
Author

stellarium.spec.txt

@gzotti gzotti changed the title 23.3: Crash on startup 23.3: Crash on startup (Fedora) Sep 26, 2023
@alex-w
Copy link
Member

alex-w commented Sep 26, 2023

stellarium.spec.txt

Thanks!

This is weird. Could you share build log?

@limburgher
Copy link
Author

Indeed. :)
build.log

@worachate001
Copy link
Member

Testing with fresh installation of Fedora 39 beta. I can confirm the crash with Wayland. Login with the option 'GNOME on Xorg' with a successful launch (but have to install Nvidia driver on my machine).

@10110111
Copy link
Contributor

@worachate001 Did the previous version also crash?

@worachate001
Copy link
Member

@worachate001 Did the previous version also crash?

I have a backup copy of ~/.stellarium created during development in Manjaro and I just did some experiments in Fedora 38/39 beta (both give similar results).

Wayland

  • Launching Stellarium 23.2/23.3 with no previous setting, program crashes
  • Launching Stellarium 23.2/23.3 with backup ~/.stellarium folder, program runs properly

X11

  • Launching Stellarium 23.2/23.3 with backup ~/.stellarium folder or with none, program runs properly

Note: Nvidia driver is needed in my machine for proper graphical display.

@alex-w
Copy link
Member

alex-w commented Sep 27, 2023

@worachate001 could you prepare and run debug edition of stellarium without previous settings under wayland?

@worachate001
Copy link
Member

@worachate001 could you prepare and run debug edition of stellarium without previous settings under wayland?

Never do it, any direction for a beginner?

@10110111
Copy link
Contributor

  • Launching Stellarium 23.2/23.3 with no previous setting, program crashes
  • Launching Stellarium 23.2/23.3 with backup ~/.stellarium folder, program runs properly

If the program crashes on the second run too, could you share two config files: one that results in a crash, and another that doesn't?

@alex-w
Copy link
Member

alex-w commented Sep 27, 2023

Never do it, any direction for a beginner?

The general instructions: https://github.com/Stellarium/stellarium/blob/master/BUILDING.md

Configuration: cmake -DCMAKE_INSTALL_PREFIX=/opt/stellarium -DCMAKE_BUILD_TYPE=Debug ../..

Run under DBG after installing: dbg /opt/stellarium/bin/stellarium

@worachate001
Copy link
Member

@10110111 I just did another experiment by editing config.ini at this line.

[video]
fullscreen                             = true

The default value is 'true', changing it to 'false' is really helping Stellarium to launch under Wayland. Setting to full screen while running the program doesn't lead to a crash but if you save the setting, it will crash again in the next launch.

@worachate001
Copy link
Member

worachate001 commented Sep 27, 2023

See below.

@worachate001
Copy link
Member

@alex-w alex-w added the state: confirmed A developer can reproduce the issue label Oct 2, 2023
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Hello @limburgher!

OK, developers can reproduce the issue. Thanks for the report!

@alex-w
Copy link
Member

alex-w commented Oct 2, 2023

@worachate001 could you play with code around lines 418-435 in main.cpp?

@worachate001
Copy link
Member

@worachate001 could you play with code around lines 418-435 in main.cpp?

@alex-w I'm trying. BTW, running with gbd shows this:

Thread 1 "stellarium" received signal SIGSEGV, Segmentation fault.
QtWaylandClient::QWaylandAbstractDecoration::update (this=0x0)
    at /usr/src/debug/qt6-qtwayland-6.5.2-1.fc38.x86_64/src/client/qwaylandabstractdecoration.cpp:110
110         d->m_isDirty = true; 

The fact that I can run Stellarium-23.3-qt5-x86_64.AppImage with no crash at start, it's likely related to Qt6/Wayland.

@alex-w alex-w added the qt Issues, related to Qt framework label Oct 2, 2023
@10110111
Copy link
Contributor

10110111 commented Oct 2, 2023

BTW, running with gbd shows this

Could you show a deeper stack trace?

@worachate001
Copy link
Member

@10110111 I use bt command and got this:

#0  QtWaylandClient::QWaylandAbstractDecoration::update() (this=0x0)
    at /usr/src/debug/qt6-qtwayland-6.5.2-1.fc38.x86_64/src/client/qwaylandabstractdecoration.cpp:110
#1  0x00007fff76f5de7a in QAdwaitaDecorations::forceRepaint() (this=0x1a99a620)
    at /usr/src/debug/qadwaitadecorations-0.1.1-1.fc38.x86_64/src/qadwaitadecorations.cpp:639
#2  0x00007fff76f5ee2e in operator()(QDBusPendingCallWatcher*) const
    (__closure=0x1738c4a0, watcher=<optimized out>)
    at /usr/src/debug/qadwaitadecorations-0.1.1-1.fc38.x86_64/src/qadwaitadecorations.cpp:124
#3  0x00007ffff59de3a4 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fffffffc290, r=0x1738ff40, this=0x1738c490)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#4  doActivate<false>(QObject*, int, void**)
    (sender=0x1738ff40, signal_index=3, argv=0x7fffffffc290)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#5  0x00007ffff59d4e27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=<optimized out>, m=m@entry=0x7ffff511bf40 <QDBusPendingCallWatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffc290)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052
#6  0x00007ffff50eb771 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) (this=<optimized out>, _t1=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/redhat-linux-build/src/dbus/DBus_autogen/include/moc_qdbuspendingcall.cpp:200
#7  0x00007ffff59cfe67 in QObject::event(QEvent*)
    (this=0x1738ff40, e=0x295a7b0)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qobject.cpp:1391
#8  0x00007ffff73c0af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=<optimized out>, receiver=0x1738ff40, e=0x295a7b0)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287
#9  0x00007ffff597cdc8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    (receiver=0x1738ff40, event=0x295a7b0)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118
#10 0x00007ffff597cfcd in QCoreApplication::sendEvent(QObject*, QEvent*)
--Type <RET> for more, q to quit, c to continue without paging--c
    (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1536
#11 0x00007ffff59808e5 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x29226e0)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1898
#12 0x00007ffff5980c1d in QCoreApplication::sendPostedEvents(QObject*, int)
    (receiver=<optimized out>, event_type=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1757
#13 0x00007ffff5c2106f in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x293a370)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#14 0x00007ffff517d4fc in g_main_dispatch (context=0x7fffdc000f10)
    at ../glib/gmain.c:3460
#15 g_main_context_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:4200
#16 0x00007ffff51db6b8 in g_main_context_iterate.isra.0
    (context=0x7fffdc000f10, block=0, dispatch=1, self=<optimized out>)
    at ../glib/gmain.c:4276
#17 0x00007ffff517ab83 in g_main_context_iteration
    (context=0x7fffdc000f10, may_block=0) at ../glib/gmain.c:4343
#18 0x00007ffff5c2090f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x2937880, flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#19 0x00007ffff597cee5 in QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>, int) (flags=..., flags@entry=..., ms=1000)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1384
#20 0x00007ffff75d3ae2 in waitForWindowExposed (timeout=1000, window=0x2b9c1f0)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/corelib/global/qflags.h:74
#21 QSplashScreen::finish(QWidget*) (this=0x2966600, mainWin=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.2-5.fc38.x86_64/src/widgets/widgets/qsplashscreen.cpp:236
#22 0x0000000000c45e99 in SplashScreen::finish(QWidget*)
    (mainWindow=0x7fffffffc850)
    at /home/worachate/stellarium/src/StelSplashScreen.cpp:51
#23 0x0000000000c08dc8 in main(int, char**) (argc=1, argv=0x7fffffffdff8)
    at /home/worachate/stellarium/src/main.cpp:458

Program crashes at SplashScreen::finish(&mainWin);

And bt-full.txt

@10110111
Copy link
Contributor

10110111 commented Oct 2, 2023

This hints that QAdwaitaDecoration might be the culprit. What if you change or disable client-side decorations?

@worachate001
Copy link
Member

This hints that QAdwaitaDecoration might be the culprit. What if you change or disable client-side decorations?

Yes, I enter this:
WAYLAND_DISPLAY=qtam-wayland-nested QT_WAYLAND_DISABLE_WINDOWDECORATION=1

and can launch Stellarium with no crash at startup.

@10110111
Copy link
Contributor

10110111 commented Oct 2, 2023

Well, this actually seems to make sense: a fullscreen window doesn't have window decorations (as doesn't the splash screen), so there would be no instance of QWaylandAbstractDecoration (though it's just a guess, I don't know how this class interacts with the actual decorations). I think you need to report this to the developers of QAdwaitaDecoration.

@alex-w
Copy link
Member

alex-w commented Oct 3, 2023

@worachate001 please try to add qputenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1"); in main.cpp file near line 233 (qputenv("QT_HARFBUZZ", "old");) and check it again.

@10110111
Copy link
Contributor

10110111 commented Oct 3, 2023

@alex-w This may be a bad solution, since, from the sound of it, it will remove window decorations completely, which is undesirable in windowed mode.

@worachate001
Copy link
Member

@worachate001 please try to add qputenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1"); in main.cpp file near line 233 (qputenv("QT_HARFBUZZ", "old");) and check it again.

Yes, it works. But as @10110111 pointed out. If you switch to windowed mode, you cannot resize or move the window if you need to (may not be a problem for users who only stay in full-screen mode).

@alex-w
Copy link
Member

alex-w commented Oct 3, 2023

OK, this bug is definitely in Qt, and probably we should mark this report as won't fix

@limburgher
Copy link
Author

Please reference the QT bug here when it exists so we can all follow along. Thank you!

@alex-w alex-w removed the bug Something likely wrong in the code label Nov 6, 2023
@gzotti
Copy link
Member

gzotti commented Dec 10, 2023

Any news? If it is nothing we can solve, it's not our bug, it's also not in 23.4, but s.o. could report it to Qt. If we can help Wayland users by setting some environment variables, this info should go into the FAQ ("recent problems").

@worachate001
Copy link
Member

No progress on my part. I have been super busy preparing 2024 almanac for local astronomical society.

@gzotti
Copy link
Member

gzotti commented Dec 10, 2023

No progress on my part. I have been super busy preparing 2024 almanac for local astronomical society.

Ah, Fellow almanachist :-)! Here's mine for Austria: DOI

@limburgher
Copy link
Author

This appears to be fixed on Qt 6.6.0.

@worachate001
Copy link
Member

This appears to be fixed on Qt 6.6.0.

My latest attempt to compile and run Stellarium in Fedora 39 with Wayland is going well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
importance: critical Real showstopper, program fails here qt Issues, related to Qt framework state: confirmed A developer can reproduce the issue
Development

No branches or pull requests

5 participants