-
Notifications
You must be signed in to change notification settings - Fork 135
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
Rare crash on showing context menu of notification area item #1802
Comments
May be somehow related to https://bugreports.qt.io/browse/QTBUG-77273 |
Still an issue? |
I haven't checked, but since the Qt bug report is still unresolved, the issue should still exist. Fortunately, it's very rare. I wonder if a workaround is possible in libdbusmenu-lxqt. |
I can't reproduce the issue with Qt6 lxqt-panel + the latest nm-applet + Wayland (labwc). I think something has changed in nm-applet. Since it wasn't our bug, closing... |
It happened again with
EDIT: This time it happened under LXQt+LabWC. Qt's version is 6.7.0. |
Sorry, I reopened it by mistake. Still not our bug. |
I think I've found a workaround for this Qt bug, which persists in Qt6. I'll make a PR against Reopening... EDIT: After I wrestled with it for many hours, it crashed again. I really tried many ways — even borrowed KDE codes —to no avail. EDIT2: Found an effective workaround at last. |
Such random crashes are triggered by Qt → `QMenu::timerEvent()`. Qt doesn't take into account the possibility of dangling pointers in `qmenu.cpp` under very rare circumstances, e.g., when the actions of a menu with a visible submenu are recreated too rapidly multiple times (also see https://bugreports.qt.io/browse/QTBUG-77273, although our case is much more complex). That may no be unexpected in a code full of timers and event handling. To avoid dangling pointers, the patch just puts a minimum interval of two seconds between two consecutive reloads. It also restores the active action on refreshing, such that a reloaded submenu isn't closed anymore (see lxqt/lxqt#2282 and especially @yan12125's report https://gitlab.gnome.org/GNOME/network-manager-applet/-/issues/195). Finally, it removes a redundant, recursive computation. Closes lxqt/lxqt-panel#1802 NOTE: I was able to reproduce the crash easily with nm-applet. Before arriving at this workaround, I tried various ideas but could still make lxqt-panel crash in a few minutes. Only this time I can't, in spite of trying for days.
On rare occasions, for which only the single example of
nm-applet --indicator
is found until now,lxqt-panel
may crash on showing the context menu inside the notification area.nm-applet's original menu is problematic (→ https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/502), and the cause of the crash is in Qt, not in
lxqt-panel
:Apparently, the crash happens in the private slot
QMenu::internalDelayedPopup()
.I opened this issue in the hope that a workaround might be found.
System Information
The text was updated successfully, but these errors were encountered: