Bug 482298 - Plasma shell crashed by file dropped as layer in GIMP under Wayland
Summary: Plasma shell crashed by file dropped as layer in GIMP under Wayland
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 6.0.0
Platform: Other Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-03 12:44 UTC by BOF
Modified: 2024-03-06 09:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
plasma crashed on dropped layer in GIMP (3.90 MB, video/webm)
2024-03-03 12:44 UTC, BOF
Details
text in terminal of crashed shell (32.39 KB, text/plain)
2024-03-03 12:48 UTC, BOF
Details
system monitor - GIMP dropped layer (137.88 KB, image/png)
2024-03-06 09:46 UTC, BOF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BOF 2024-03-03 12:44:39 UTC
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)
Comment 1 BOF 2024-03-03 12:48:25 UTC
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
Comment 2 BOF 2024-03-03 15:01:09 UTC
Bug on the GIMP bug tracker can be found here: https://gitlab.gnome.org/GNOME/gimp/-/issues/10515
Comment 3 Nate Graham 2024-03-05 18:49:40 UTC
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?
Comment 4 BOF 2024-03-06 09:46:33 UTC
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)