mate-desktop / mate-utils

GNU General Public License v2.0
39 stars 30 forks source link

mate-screenshot hangs when storage-folder is not accessible #191

Open alexarnaud opened 6 years ago

alexarnaud commented 6 years ago

Expected behaviour

No hangs

Actual behaviour

mate-screenshot hangs when storage-folder is not accessible

Steps to reproduce the behaviour

$ mate-screenshot Store the screenshot to a test folder. -> The the new location is stored.

Make it inaccessible: $ chmod 000 (Or unmount the place where the folder is) (Deleting the folder will not reproduce the issue)

Make a new screenshot: $ mate-screenshot -> Busy loop with 100% CPU -> Needs to be killed

MATE general version

Tested on 1.16 and 1.20

Package version

1.16.0-1 and 1.20.0-1

Linux Distribution

Debian Stretch and Debian Sid

Link to downstream report of your Distribution

This report is the forward of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891362

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/55715400-mate-screenshot-hangs-when-storage-folder-is-not-accessible?utm_campaign=plugin&utm_content=tracker%2F1509859&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1509859&utm_medium=issues&utm_source=github).
lukefromdc commented 6 years ago

I had mixed this up with a screensaver issue. This too should probably pop up a dialog, in this case to ask whether to cancel or try another location.

lukefromdc commented 6 years ago

I just found that an error dialog was exactly what I got when I made a screenshot, selected a folder to save it in, moved that folder to the trash, and then tried to save. No hang, no heavy CPU use, just an error dialog asking for another location.

The Debian report says no issue with a deleted folder, so I tried removing both read and write permissions and again the error dialog came up fine.

screenshot_error_dialog

For your 1.20.0 tests, did you only update mate-utils or all of MATE?

alexarnaud commented 6 years ago

Le 02/03/2018 à 19:01, lukefromdc a écrit :

I just found that an error dialog was exactly what I got when I made a screenshot, selected a folder to save it in, moved that folder to the trash, and then tried to save. No hang, no heavy CPU use, just an error dialog asking for another location.

You've to save a screenshot on the location first. Make the location unreadable with chmod 000 on it and relaunch mate-screenshot.

The Debian report says no issue with a deleted folder, so I tried removing both read and write permissions and again the error dialog came up fine.

For your 1.20.0 tests, did you only update mate-utils or all of MATE?

All the Mate package.

Best regards, Alex.

lukefromdc commented 6 years ago

OK, that confirms it. The issue appears on first opening mate-screenshot when the previously written location cannot be accessed as as default save location but does exist.

fixups commented 2 years ago

Still not fixed in Ubuntu Mate 20.04.

Advice for whoever encounters this bug: you can fix it by entering this command in a terminal: gsettings set org.mate.screenshot last-save-directory '' (at the end of the command, it's two simple quotes, not a double quote).