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

Changing between Light and Dark themes in GNOME causes Mixxx to hang #11464

Open
nPrevail opened this issue Apr 10, 2023 · 11 comments
Open

Changing between Light and Dark themes in GNOME causes Mixxx to hang #11464

nPrevail opened this issue Apr 10, 2023 · 11 comments

Comments

@nPrevail
Copy link

nPrevail commented Apr 10, 2023

Computer specs:
Fedora 37 / Gnome 43
EDIT: Mixxx 2.3.4

In GNOME 43, if you have Mixxx up and running, and decide to change your "Appearance" theme from Dark or Light (and vice versa), Mixxx hangs and has to be "forced quit" to close and reopen the program again.

I did a quick desktop recording to show this.

In the first 10 seconds, you'll see that Mixxx is working perfectly fine. By 00:15, I decide to change the Appearance theme from Default to Dark. Mixxx then starts to hang as it fails to respond. (I forgot to "show my cursor" as I recorded the desktop, but I'm clicking "wait" in hopes that Mixxx will respond to the crash, and to avoid "quitting' if possible).

Force quitting is the only way to get out.

Screencast.from.2023-04-10.12-12-47.webm
@daschuer
Copy link
Member

Which version of Mixxx is affected? Are other skins affected as well?
Why are two Mixxx icons in your taskbar? Is that an issue as well?

@daschuer
Copy link
Member

Can you run Mixxx under GDB, brake via Ctrl+C in the console and create a backtrace?
thread apply all bt full

@nPrevail
Copy link
Author

Which version of Mixxx is affected? Are other skins affected as well? Why are two Mixxx icons in your taskbar? Is that an issue as well?

I'm using 2.3.4; LateNite PaleMoon skin.

About the two icons... it might just be a bug. For some reason, I thought it was GNOME's fault, or the extension.
So here's the weird thing about the "two Mixxxs" on my taskbar: one is a shortcut to open the program, the other is the actual program. It is quite annoying, but it never came to my mind until you pointed it out.

Should I start a separate bug report for that?

@uklotzde
Copy link
Contributor

Confirmed. Fans are spinning up. Maybe an endless loop in Qt 5 code? Unlikely, that this gets fixed (soon).

I have interrupted Mixxx in the debugger and get the following stack trace.

Process 22332 stopped
* thread #1, name = 'mixxx', stop reason = signal SIGSTOP
    frame #0: 0x00007ffff32e14c4 libQt5Core.so.5`(anonymous namespace)::convert(QVariant::Private const*, int, void*, bool*) + 1748
libQt5Core.so.5`(anonymous namespace)::convert:
->  0x7ffff32e14c4 <+1748>: jmp    0x7ffff32e0f78            ; <+392>
    0x7ffff32e14c9 <+1753>: nopl   (%rax)
    0x7ffff32e14d0 <+1760>: movq   $0x0, (%r13)
    0x7ffff32e14d8 <+1768>: movl   $0x33, %edi
(lldb) bt
* thread #1, name = 'mixxx', stop reason = signal SIGSTOP
  * frame #0: 0x00007ffff32e14c4 libQt5Core.so.5`(anonymous namespace)::convert(QVariant::Private const*, int, void*, bool*) + 1748
    frame #1: 0x00007ffff32de93e libQt5Core.so.5`QVariant::convert(int) + 302
    frame #2: 0x00007ffff5ce2c6d libQt5Gui.so.5`setFontSizeFromValue(QCss::Value, QFont*, int*) (.isra.0) + 493
    frame #3: 0x00007ffff5ce3148 libQt5Gui.so.5`QCss::ValueExtractor::extractFont(QFont*, int*) + 1160
    frame #4: 0x00007ffff5ce3325 libQt5Gui.so.5`QCss::ValueExtractor::extractFont() + 53
    frame #5: 0x00007ffff5ce677c libQt5Gui.so.5`QCss::ValueExtractor::extractGeometry(int*, int*, int*, int*, int*, int*) + 44
    frame #6: 0x00007ffff6453248 libQt5Widgets.so.5`QRenderRule::QRenderRule(QVector<QCss::Declaration> const&, QObject const*) + 408
    frame #7: 0x00007ffff6455468 libQt5Widgets.so.5`QStyleSheetStyle::renderRule(QObject const*, int, unsigned long long) const + 2024
    frame #8: 0x00007ffff645a1d0 libQt5Widgets.so.5`QStyleSheetStyle::updateStyleSheetFont(QWidget*) const + 224
    frame #9: 0x00007ffff63e2c8d libQt5Widgets.so.5`QWidgetPrivate::updateFont(QFont const&) + 557
    frame #10: 0x00007ffff63e5301 libQt5Widgets.so.5`QWidget::setFont(QFont const&) + 193
    frame #11: 0x00007ffff644f321 libQt5Widgets.so.5`QStyleSheetStyle::unsetPalette(QWidget*) + 785
    frame #12: 0x00007ffff6457742 libQt5Widgets.so.5`QStyleSheetStyle::unpolish(QWidget*) + 226
    frame #13: 0x00007ffff63e2435 libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 181
    frame #14: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #15: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #16: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #17: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #18: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #19: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #20: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #21: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #22: 0x00007ffff63e258c libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 524
    frame #23: 0x00007ffff63b23d1 libQt5Widgets.so.5`QApplication::setStyle(QStyle*) + 481
    frame #24: 0x00007ffff63b2ffa libQt5Widgets.so.5`QApplication::setStyle(QString const&) + 26
    frame #25: 0x00007fffdc03e681 libqgnomeplatform.so`GnomeSettings::onThemeChanged() + 97
    frame #26: 0x00007ffff32d0e96 libQt5Core.so.5`void doActivate<false>(QObject*, int, void**) + 982
    frame #27: 0x00007fffdc0419aa libqgnomeplatform.so`PortalHintProvider::qt_metacall(QMetaObject::Call, int, void**) + 106
    frame #28: 0x00007ffff37920bb libQt5DBus.so.5`QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) + 1323
    frame #29: 0x00007ffff32c8134 libQt5Core.so.5`QObject::event(QEvent*) + 532
    frame #30: 0x00007ffff63aed62 libQt5Widgets.so.5`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 130
    frame #31: 0x00007ffff329d4e8 libQt5Core.so.5`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 280
    frame #32: 0x00007ffff32a0854 libQt5Core.so.5`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 372
    frame #33: 0x00007ffff32eeb07 libQt5Core.so.5`postEventSourceDispatch(_GSource*, int (*)(void*), void*) + 23
    frame #34: 0x00007ffff5817c7f libglib-2.0.so.0`g_main_context_dispatch + 415
    frame #35: 0x00007ffff586e118 libglib-2.0.so.0`g_main_context_iterate.constprop.0 + 776
    frame #36: 0x00007ffff5814f00 libglib-2.0.so.0`g_main_context_iteration + 48
    frame #37: 0x00007ffff32ee5fa libQt5Core.so.5`QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 106
    frame #38: 0x00007ffff329bf3a libQt5Core.so.5`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 314
    frame #39: 0x00007ffff32a4002 libQt5Core.so.5`QCoreApplication::exec() + 146
    frame #40: 0x00000000005a4cb4 mixxx`main at main.cpp:74:34
    frame #41: 0x00007ffff2a4a510 libc.so.6`__libc_start_call_main + 128
    frame #42: 0x00007ffff2a4a5c9 libc.so.6`__libc_start_main@@GLIBC_2.34 + 137
    frame #43: 0x00000000005c8dd5 mixxx`_start + 37

@uklotzde
Copy link
Contributor

Another one for comparison, slightly different:

* thread #1, name = 'mixxx', stop reason = signal SIGSTOP
  * frame #0: 0x00007ffff313d510 libQt5Core.so.5`QByteArray::QByteArray(char const*, int)
    frame #1: 0x00007ffff63afc78 libQt5Widgets.so.5`QApplication::font(QWidget const*) + 184
    frame #2: 0x00007ffff63db665 libQt5Widgets.so.5`QWidgetPrivate::naturalWidgetFont(unsigned int) const + 69
    frame #3: 0x00007ffff63e52dc libQt5Widgets.so.5`QWidget::setFont(QFont const&) + 156
    frame #4: 0x00007ffff644f321 libQt5Widgets.so.5`QStyleSheetStyle::unsetPalette(QWidget*) + 785
    frame #5: 0x00007ffff645aae2 libQt5Widgets.so.5`QStyleSheetStyle::polish(QWidget*) + 242
    frame #6: 0x00007ffff6459c55 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 293
    frame #7: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #8: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #9: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #10: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #11: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #12: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #13: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #14: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #15: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #16: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #17: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #18: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #19: 0x00007ffff6459cd4 libQt5Widgets.so.5`updateObjects(QList<QObject const*> const&) + 420
    frame #20: 0x00007ffff6459e14 libQt5Widgets.so.5`QStyleSheetStyle::repolish(QWidget*) + 196
    frame #21: 0x00007ffff63b23d1 libQt5Widgets.so.5`QApplication::setStyle(QStyle*) + 481
    frame #22: 0x00007ffff63b2ffa libQt5Widgets.so.5`QApplication::setStyle(QString const&) + 26
    frame #23: 0x00007fffdc03e681 libqgnomeplatform.so`GnomeSettings::onThemeChanged() + 97
    frame #24: 0x00007ffff32d0e96 libQt5Core.so.5`void doActivate<false>(QObject*, int, void**) + 982
    frame #25: 0x00007fffdc0419aa libqgnomeplatform.so`PortalHintProvider::qt_metacall(QMetaObject::Call, int, void**) + 106

@uklotzde
Copy link
Contributor

100% CPU, likely caused by the main UI thread getting caught in an endless loop.

@daschuer
Copy link
Member

Both backtracks contain:

frame #25: 0x00007fffdc03e681 libqgnomeplatform.so`GnomeSettings::onThemeChanged() + 97 

There is not much Mixxx code in the stack ...

Now we need to find out at which level the repetition cycles.

Please do the following:

  • Make Mixxx hang in gdb
  • Interrupt it with Ctr+C
  • Add a breakpoint at QEventDispatcherGlib::processEvents()
    • b QEventDispatcherGlib::processEvents
    • cont
  • See if it is reached
    • Yes: done (unlikely) investigate who is sending the repeated event.
    • No: crawl up the stack and find the first point where a breakpoint is reached.

@daschuer
Copy link
Member

Btw: I cannot reproduce it on Ubuntu Focal using the Gnome based Ubuntu desktop.

@heldderarbeit
Copy link

heldderarbeit commented Oct 22, 2024

I can reproduce this crash on Arch, Gnome 47.1, Wayland & Mixxx 2.4.1 installed from Flathub.

What crashes:

  • Start mixxx with dark system theme turned on, then turn it off
  • Start mixxx with dark system theme turned off, then turn it on

When changing the system theme, console output is

qt.qpa.qgnomeplatform:warning [Main] Could not find color scheme ""

If you remove the Wayland permission in Flatseal with sockets=!wayland, changing the system theme changes the mixxx theme but the app still crashes after a couple seconds (contrary with running on Wayland where it crashed instantly without visibly changing the mixxx theme).

@daschuer
Copy link
Member

Does mixxx.log contain something suspicious?

Maybe you can create a backtrace using gdb?

This issue contains some hints how to use gdb with flatpack: #13720

@heldderarbeit
Copy link

The complete mixxx.log file: https://pastebin.com/raw/EzkYeW5v

Now trying to debug with gdb according to #11464 (comment): https://pastebin.com/raw/etDsLU7A

As far as I can see, the breakpoint was not reached. So this is where the step "crawl up the stack and find the first point where a breakpoint is reached" should come into play, but I'm missing the technical knowledge to proceed.

Now the backtrace after crashing according to #13720 (comment): https://pastebin.com/raw/11Uec1dj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants