Bug 480846 - Opening Menu crashes Application
Summary: Opening Menu crashes Application
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (other bugs)
Version First Reported In: git-master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-04 11:50 UTC by Tobi
Modified: 2024-09-03 06:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobi 2024-02-04 11:50:37 UTC
SUMMARY
On Wayland, using latest master/daily flatpak build app crashes when browsing through menu items.

STEPS TO REPRODUCE
1. Open Kdenlive (flatpak run --branch=master org.kde.kdenlive) 
2. Open Menu "Clip" and move mouse pointer over "Markers" so that nested submenu (including "Add Markers" is visible)
3. Move mouse pointer to "Timeline" top-level menu item
4. Kdenlive crashes

Notice this only crashes when such a nested submenu is shown. Clip -> Markers -> Timeline results in a crash while Tool -> Normal Mode -> Clip works just fine.
On latest stable release this issue does not exists.

The following log line is printed on 2) when mouse pointer is moved to "Markers" 
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x644d2179c440) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x644d22afb9b0) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
Then on 3) the app crashes with this output:
xdg_wm_base@3: error 2: xdg_popup was destroyed while it was not the topmost popup
The Wayland connection experienced a fatal error: Protocol error

OBSERVED RESULT
App crashes while a submenu is opened which opens another menu to the right and one switches to another top-level menu item.

EXPECTED RESULT
No crash when menu item is selected


SOFTWARE/OS VERSIONS
Linux Distribution: Arch Linux / Sway
Kdenlive: Version 24.04.70 (rev. 8870cce99)
KDE Plasma Version: ?
KDE Frameworks Version:  Version 5.248.0
Qt Version: Version 6.6.1 (built against 6.6.1)

ADDITIONAL INFORMATION
Comment 1 emohr 2024-02-05 19:51:27 UTC
I tried this on Windows with Kdenlive-Master-Qt6, following your steps and get no crash. Seems to be a Wayland issue? Do you have the same crash with Kdenlive version 23.08.4?
Comment 2 Tobi 2024-02-07 03:18:38 UTC
On version 23.08.4 it doesn't crash, only get this on Master
Comment 3 Tobi 2024-09-03 06:36:46 UTC
Cannot reproduce it anymore for a while