Created attachment 166349 [details] plasma crashed on dropped layer in GIMP SUMMARY When you open a file in GIMP (right click > open with GIMP) and drop a second image as new layer GIMP goes crazy and crashes the plasma shell. Sometimes it's able to recover, other times I need to open the terminal and enter 'plasmashell start' to recover it. -> THIS ONLY HAPPENS UNDER WAYLAND STEPS TO REPRODUCE 1. Right click a file > open with GIMP 2. Select a second file and drag&drop it as new layer into GIMP 3. GIMP crashes the plasmashell OBSERVED RESULT Plasmashell is crashed and only sometimes does recover. EXPECTED RESULT Plasmashell is not crashed. SOFTWARE/OS VERSIONS Operating System: KDE neon 6.0 KDE Plasma Version: 6.0.0 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.5.0-21-generic (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics Memory: 30.7 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: Micro-Star International Co., Ltd. Product Name: Bravo 17 A4DDR System Version: REV:1.0 ADDITIONAL INFORMATION - The exact same steps do *NOT* cause a crash under X11 - Before Plasmashell was crashed I saw GIMP opening >200 dialog boxes in the background trying to import the file. To me it looked like a 'loop bug' where the dropped file somehow causes an infinite loop that results in a crash of the plasmashell (or something else, I have no idea)
Created attachment 166351 [details] text in terminal of crashed shell When the plasmashell does not recover I start it with the terminal (krun > konsole > 'plasmashell start'). This is what was left in the terminal after the code of the started plasmashell
Bug on the GIMP bug tracker can be found here: https://gitlab.gnome.org/GNOME/gimp/-/issues/10515
Are you dragging the files from Dolphin or the Plasma desktop? What kind of files are you dragging? Does it happen with all files and file types tested, or only some?
Created attachment 166470 [details] system monitor - GIMP dropped layer (In reply to Nate Graham from comment #3) > Are you dragging the files from Dolphin or the Plasma desktop? > > What kind of files are you dragging? Does it happen with all files and file > types tested, or only some? In the video example I was dragging the files from the Plasma desktop. But the crash can also be reproduced with drag&drop from Dolphin. In the example it was png files, but I got the same result with jpg files. In general the crash happens with all files. Sometimes Plasma crashes with the same files in one session but only imports one image as >100 layers the next time after a reboot. Some different behaviour could be related to png files or large tiff files as they tend to crash GIMP less often (but crash plasma nonetheless). This _could_ also be related to their resolution since it seems to be less problematic when you drop a file with smaller resolution on a bigger with larger resolution. HOWEVER: This is just wild speculation on my part. You have to drop the file *in the layers section* for the bug to occur. When I drop the file in the main window (where you see your image) there is no crash. I closely watched the system monitor and as you drop the file you can see that the used RAM shoots up. Once the application hits around ~4GB in size, plasma crashes. (No idea if there is a RAM limit for individual applications or if this could be related to 32bit architecture or library somewhere) In the attached image I was able to snapshot a moment when GIMP opened >100 tasks and the RAM shot up to ~11 GB (was at ~400 MB with only one image)
Thank you for the bug report, and the detailed information. In order to find out the cause of the crash in plasmashell, we need a backtrace of plasmashell when this crash occurs (I did see the backtrace of the GIMP in the report on that tracker). Could we ask you to add a plasmashell backtrace to this report?
Created attachment 173062 [details] xwayland_100% So while I can't make it crash I know (probably) why it crashes: Once I add the second image to the layer it errors out with: "imp: Gimp-Widgets-WARNING: Received invalid file data!" Which continuously tries to add new layers which makes xwayland go close to 100% CPU (and laggs really bad) and possibly crashes on lower end hardware. Attached is the process that goes close to 100% Moving to kwin, for further evaluation. Unsure if this can be guarded against or if this needs to be fixed on the GTK side.
I was able to reproduce this with the steps in the video. It's important to drag onto the layer list.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6494
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6498
Git commit 48faf8314d90426abcc8a45daf082b7627f4e9bd by Vlad Zahorodnii. Committed on 26/09/2024 at 10:57. Pushed by vladz into branch 'master'. xwayland: Fix sending multiple XdndDrop messages after a drop occurs There might be more XdndStatus client messages after a drop occurs. In which case avoid sending XdndDrop client message again as it can result in a feedback loop with clients such as GIMP. M +17 -12 src/xwayland/drag_wl.cpp M +2 -1 src/xwayland/drag_wl.h https://invent.kde.org/plasma/kwin/-/commit/48faf8314d90426abcc8a45daf082b7627f4e9bd
Git commit 259afc9e607e91ef5145883d4b03255f061af369 by Vlad Zahorodnii. Committed on 26/09/2024 at 11:10. Pushed by vladz into branch 'Plasma/6.2'. xwayland: Fix sending multiple XdndDrop messages after a drop occurs There might be more XdndStatus client messages after a drop occurs. In which case avoid sending XdndDrop client message again as it can result in a feedback loop with clients such as GIMP. (cherry picked from commit 48faf8314d90426abcc8a45daf082b7627f4e9bd) Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> M +17 -12 src/xwayland/drag_wl.cpp M +2 -1 src/xwayland/drag_wl.h https://invent.kde.org/plasma/kwin/-/commit/259afc9e607e91ef5145883d4b03255f061af369
*** Bug 473977 has been marked as a duplicate of this bug. ***