swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.16k stars 1.08k forks source link

Sway crashes while using Gimp #7139

Open MauroGuida opened 1 year ago

MauroGuida commented 1 year ago

Edit: This issue is not present in GIMP 3 beta and is likely related to GTK 2 applications. It could also occur with PCManFM GTK 2.

wildwestrom commented 1 year ago

I just had the same issue. I opened 'scale image' I believe. I can never predict which widget is going to trigger the crash.

MauroGuida commented 1 year ago

I had the same issue again a few days ago, but this time with PCManFM GTK2, at this point I think that this issue is related to GTK2 dialogs, after switching to PCManFM-qt and Gimp beta (GTK3) I never had this issue again.

Jordanyay commented 1 year ago

I had something similar just happen to me a moment ago.

I was using GIMP and I clicked "File>Save As..." to open the "Save Image" window, I thought I had caused the crash when I pressed the "Ctrl+A" keybinding without being properly focused on a text field, but from reading the comments from this issue, maybe that wasn't the case?

I made a comment on another issue last week regarding images "freezing" in GIMP under certain conditions, it's starting to sound like Sway isn't too fond of GTK2/XWayland applications?

clay53 commented 1 year ago

I am having the same issue

jschoone commented 1 year ago

I had something similar just happen to me a moment ago.

I was using GIMP and I clicked "File>Save As..." to open the "Save Image" window, I thought I had caused the crash when I pressed the "Ctrl+A" keybinding without being properly focused on a text field, but from reading the comments from this issue, maybe that wasn't the case?

I made a comment on another issue last week regarding images "freezing" in GIMP under certain conditions, it's starting to sound like Sway isn't too fond of GTK2/XWayland applications?

That sounds like the problem why I'm here. There are several reasons for a crash but I can reproduce it. With this, I was able to reliably reproduce it:

So far I don't know how to log that to provide more information.

I'm on Sway 1.8, more precise package version 1.8-3 from the arch community repository. After downgrading to 1.7 (1.7-10) I can't reproduce a crash. Since the author created the issue on version 1.7 it's maybe just a matter of time. :smile:

erahhal commented 1 year ago

+1 I'm seeing this on recent versions of sway and gimp. I turned on wayland scaling recently, wonder if that could be related...

emersion commented 1 year ago

The backtrace you provided doesn't contain debug symbols. This most likely happens because the Sway binary you're using doesn't have debug information bundled.

Can you try again with a manually compiled Sway binary? See https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

erahhal commented 1 year ago

I'm on NixOS, will look at how to run a build with debug symbols.

I just realized now that Sway isn't actually crashing for me. I tried to execute "Export as", then the file dialog popped up, after which everything hung completely, including the mouse. But I ssh'd in from another machine, killed gimp, then sway recovered fully. I loaded gimp and tried the same thing, and it didn't hang the second time, so it's not deterministically reproduceable in my case, or at least i haven't found a way to reproduce it reliably.

MauroGuida commented 11 months ago

The backtrace you provided doesn't contain debug symbols. This most likely happens because the Sway binary you're using doesn't have debug information bundled.

Can you try again with a manually compiled Sway binary? See https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

I cannot reproduce the issue anymore. I have tried for over 1 hour, but nothing. GIMP 2 won't crash anymore. At this point, I don't know if something has changed on my system that has resolved the issue or if it's just bad luck (or luck, depending on the point of view) while trying to reproduce the issue. This kind of crash that I was experiencing months ago happens at completely random times.

I will return to use GTK2 software, especially Gimp 2, in order to maximize the probability of a crash during normal PC usage. If something happens again, I will submit the log here.

Thank you for your work and support!

ghost commented 11 months ago

It still crashes (hangs indefinitely) for me on Arch Linux. Gimp, New file, File -> Export as... and it's dead. Not every single time but it happens way too often. It's not possible to switch to a different VT. So Magic SysRQ it is until I find the time to automate killing off an unresponsive Gimp.

not sure if it helps at all or what else to do

https://0x0.st/Heht.txt

MauroGuida commented 11 months ago

Maybe I have found a potential workaround (please note, this is indeed a workaround, not a permanent solution). A few months ago, I encountered an issue with a program that would freeze my PC for over a minute and generate a core dump of more than 10 GB. This problem occurred only upon closing the said program. To address this issue and prevent the wastage of time and storage space, I disabled automatic core dumps. This step successfully resolved the problem (though it did not address the root cause, as the program still crashes upon exit; however, I no longer have to wait for the core dump to generate).

Back to our issue, I have been using Gimp 2 extensively lately, and I have not experienced a single crash or hang in the past three weeks. I still have automatic core dumps disabled, and perhaps I haven't experienced this issue because there could be a correlation between this indefinite hang of Sway and core dumps. Currently, I do not have sufficient time to test this presumed correlation. However, if someone wishes to investigate further, you can try disabling automatic core dumps.

c0001 commented 10 months ago

For now [20230905] I seeing this bug either when export image as another formats.

sway version: 1.8.1 stable wlroots version: 0.16.2

c0001 commented 9 months ago

Since river has confirmed that wlroots 0.16.2 has fix this issue by this patch, but it's still occurred in sway 1.8.1 with wlroots 0.16.2, need for investigating ...

Moelf commented 7 months ago

same issue

mfs12 commented 7 months ago

Just used gimp 2.10, sway 1.8.1 and wlroots 0.16.2. It got a little better. It seams something is blocking the UI when opening a file dialog from within gimp which makes it nearly unusable.

OpenSauce04 commented 6 months ago

This is almost definitely still a prominent issue.

I tried out Sway for the first time at the beginning of this week, and for the first few days it was fine, but after that point I noticed that after a while, Sway would lock up, log me out, or close every xwayland application that was open at the time. This happened a couple of times a day on a machine where I was trying to be productive, so it wasn't a great experience.

I was one step away from dismissing it as some incompatibility between some component of Sway and my hardware configuration, and was about to switch to another WM, but I stumbled upon this issue.

I've been using GIMP recently to track my progress on an assignment by having the prompt sheet opened and highlighting sections I have completed. This meant that GIMP was open pretty much all the time when I was using my laptop, explaining the constant instability.

After seeing this issue, I uninstalled my current version of GIMP, then reinstalled the latest beta release via flatpak, which is Wayland native. Just over a day on, this issue has not happened since.

When the issue occurred, I was using the latest Sway 1.8.1-3.fc39, wlroots 0.17.1-1.fc39, and GIMP 2:2.10.36-2.fc39

OpenSauce04 commented 5 months ago

The crashing has still not appeared since. Usage of GIMP was definitely the cause of my issues

NelDav commented 5 months ago

Thanks @OpenSauce04, I tried your solution, to install the beta flatpak from gimp and indeed, gimp no longer crashes.

bruteforks commented 1 week ago

same with crashing flatpak on sway. Adding the beta version worked like a charm!!!

the steps for the next person:

flatpak uninstall org.gimp.GIMP flatpak install --user https://flathub.org/beta-repo/appstream/org.gimp.GIMP.flatpakref flatpak run org.gimp.GIMP//beta