FedoraQt / adwaita-qt

A style to bend Qt applications to look like they belong into GNOME Shell
Other
488 stars 48 forks source link

Application never opens; CPU usage goes to 100% #193

Open guihkx opened 1 year ago

guihkx commented 1 year ago

I've always used this theme with this note-taking app and never had any issues.

But as of this commit, the app suddenly stopped opening and CPU usage gets stuck at 100%, so I have no option other than use a different theme (e.g. Fusion) or manually terminate the process.

After running the program with gdb and interrupting the process while it's stuck, I get this stack trace:

(gdb) bt
#0  0x00007ffff577d93c in QObject::removeEventFilter(QObject*) () from /usr/lib/libQt6Core.so.6
#1  0x00007ffff09d9c25 in Adwaita::Style::unpolish(QWidget*) () from /usr/lib/qt6/plugins/styles/adwaita.so
#2  0x00005555556fc67e in setCSSClassesAndUpdate (obj=0x55555624c8c0, classNames="light")
    at /home/gui/dev/notes/src/theme.cpp:44
#3  0x00005555556fc3cc in setCSSThemeAndUpdate (obj=0x55555624c8c0, theme=Theme::Light)
    at /home/gui/dev/notes/src/theme.cpp:32
#4  0x0000555555656fea in MainWindow::setupTextEditStyleSheet (this=0x7fffffffdb30, paddingLeft=15, paddingRight=15)
    at /home/gui/dev/notes/src/mainwindow.cpp:962
#5  0x0000555555655e9c in MainWindow::alignTextEditText (this=0x7fffffffdb30) at /home/gui/dev/notes/src/mainwindow.cpp:973
#6  0x0000555555655d66 in MainWindow::setCurrentFontBasedOnTypeface (this=0x7fffffffdb30, 
    selectedFontTypeFace=FontTypeface::SansSerif) at /home/gui/dev/notes/src/mainwindow.cpp:916
#7  0x0000555555662763 in MainWindow::eventFilter (this=0x7fffffffdb30, object=0x55555624c8c0, event=0x7fffffffaff0)
    at /home/gui/dev/notes/src/mainwindow.cpp:3372
#8  0x00007ffff57395d8 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
   from /usr/lib/libQt6Core.so.6
#9  0x00007ffff67713fb in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#10 0x00007ffff573aad8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#11 0x00007ffff67b7a08 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/libQt6Widgets.so.6
#12 0x00007ffff67bad27 in QWidgetPrivate::show_helper() () from /usr/lib/libQt6Widgets.so.6
#13 0x00007ffff67bb2db in QWidgetPrivate::setVisible(bool) () from /usr/lib/libQt6Widgets.so.6
#14 0x00007ffff67bac74 in QWidgetPrivate::showChildren(bool) () from /usr/lib/libQt6Widgets.so.6
#15 0x00007ffff67bad43 in QWidgetPrivate::show_helper() () from /usr/lib/libQt6Widgets.so.6
#16 0x00007ffff67bb2db in QWidgetPrivate::setVisible(bool) () from /usr/lib/libQt6Widgets.so.6
#17 0x00007ffff67bac74 in QWidgetPrivate::showChildren(bool) () from /usr/lib/libQt6Widgets.so.6
#18 0x00007ffff67bad43 in QWidgetPrivate::show_helper() () from /usr/lib/libQt6Widgets.so.6
#19 0x00007ffff67bb2db in QWidgetPrivate::setVisible(bool) () from /usr/lib/libQt6Widgets.so.6
#20 0x00007ffff67bac74 in QWidgetPrivate::showChildren(bool) () from /usr/lib/libQt6Widgets.so.6
#21 0x00007ffff67bad43 in QWidgetPrivate::show_helper() () from /usr/lib/libQt6Widgets.so.6
#22 0x00007ffff67bb2db in QWidgetPrivate::setVisible(bool) () from /usr/lib/libQt6Widgets.so.6
#23 0x00007ffff67bac74 in QWidgetPrivate::showChildren(bool) () from /usr/lib/libQt6Widgets.so.6
#24 0x00007ffff67bad43 in QWidgetPrivate::show_helper() () from /usr/lib/libQt6Widgets.so.6
#25 0x00007ffff67bb2db in QWidgetPrivate::setVisible(bool) () from /usr/lib/libQt6Widgets.so.6
#26 0x00007ffff67bac74 in QWidgetPrivate::showChildren(bool) () from /usr/lib/libQt6Widgets.so.6
#27 0x00007ffff67bad43 in QWidgetPrivate::show_helper() () from /usr/lib/libQt6Widgets.so.6
#28 0x00007ffff67bb2db in QWidgetPrivate::setVisible(bool) () from /usr/lib/libQt6Widgets.so.6
#29 0x000055555564dccf in MainWindow::setMainWindowVisibility (this=0x7fffffffdb30, state=true) at /home/gui/dev/notes/src/mainwindow.cpp:209
#30 0x00005555556580f4 in MainWindow::setUseNativeWindowFrame (this=0x7fffffffdb30, useNativeWindowFrame=true) at /home/gui/dev/notes/src/mainwindow.cpp:3591
#31 0x0000555555646c50 in MainWindow::restoreStates (this=0x7fffffffdb30) at /home/gui/dev/notes/src/mainwindow.cpp:1261
#32 0x000055555563ea14 in MainWindow::MainWindow (this=0x7fffffffdb30, parent=0x0) at /home/gui/dev/notes/src/mainwindow.cpp:133
#33 0x000055555563d8a2 in main (argc=1, argv=0x7fffffffdf98) at /home/gui/dev/notes/src/main.cpp:84

Maybe that could be helpful...?

Some other information:

Any help is appreciated. Thank you!

guihkx commented 1 year ago

We seem to have fixed this on our side (see the linked pull request).

However, since I'm not sure if this is not a bug in adwaita-qt (because it works without it), I'll leave this open for the maintainers to decide.

Thanks!

grulja commented 1 year ago

Hi, I don't see any reason why it would hang on unpolish() call, but I didn't have time to investigate it. I'm glad you workarounded it on your side. I'll keep it open so I can look into it later.

MartinBriza commented 1 year ago

Jan wrote a comment saying he will look into this issue at some point in the future. You need to understand we're just humans with limited time and we need to divide it between a lot of things in our lives. Please avoid this kind of language in the future.