mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.45k stars 1.27k forks source link

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

Open nPrevail opened 1 year ago

nPrevail commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

nPrevail commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

daschuer commented 1 year ago

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:

daschuer commented 1 year ago

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