-
-
Notifications
You must be signed in to change notification settings - Fork 29
mate-screenshot: Replace fork save with sync save #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Newer versions of gdk-pixbuf use libglycin's asynchronous image save mechanism. This makes the fork-save redundant and has a potential of hanging when saving a screenshot.
|
@raveit65 (in response to #367 (comment)) |
|
@vkareh Edit: |
|
@raveit65 yes, the code is backwards compatible - all it does is removes the fork-save that we used to have to make saving files appear faster. In older/slower systems it might feel sluggish (like, maybe up to 1 second? maybe less?), but I don't think it would make a difference in any computer made in the last decade... |
|
@vkareh how is this asynchronous? I didn't read GDK Pixbuf's code, but the write ought to have finished by the time IMO if there's an issue and we want to keep the non-blocking appearance, we should use the actual async APIs, like |
|
(after reading the Fedora report) I don't see how https://gitlab.gnome.org/GNOME/glycin/-/issues/175 could be the issue? If the save fails, we should be handling it correctly whichever process does it. Maybe we have bad error handling? or the issue is entirely different and our subprocess has an environment that cause issues with Glycin's subprocess stuff. |
|
@cwendling Because of wrong values the screnshot won't be saved. |
|
@raveit65 my point is that calling the same function with the same data from outside a subprocess only changes the context, so:
So I don't believe the issue is properly understood. But anyway I don't like that subprocess either, but I think we should switch to the async variants instead of pretending that the newer GDK Pixubf magically doesn't block sequential calls. And having read a tiny bit more about how Glicyn works and why it's there, it's likely only going to be slower, not faster (it always spawns a sandboxed subprocess and communicates with it through DBus -- but I didn't benchmark anything). |
|
No problem...... |
|
@cwendling there are two issues at play here (both caused by the gdk-pixbuf bumping to libglycin-2 in their 2.43 release):
|
|
@raveit65 I see that the bz is closed now - the fix didn't need this commit, I assume? If so we can close it without merge (which would be my preference). Let me know. |
|
OMG. Thanks for asking , i will do another build with the commit for fedora rawhide/f43. |
|
For f43 the commit was already in spec file https://src.fedoraproject.org/rpms/mate-utils/blob/f43/f/mate-utils.spec#_12 Glycin changes are fully added to fedora. Ie. gdkpixbuff-tumbnailer is now replaced with lbglycin-tumbnailer. So i think eom needs to be updated in general (i don't use this for fedora). No idea when other distros will follow fedora. |
|
@vkareh |
|
@vkareh @cwendling |
This fix is needed. |
raveit65
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, patch runs several weeks in fedora 43 without problems
@vkareh @cwendling |
|
@raveit65 have you had a chance to test #370? It should make things asynchronous again, but in a safe way this time.
OK, cool! But I guess that's not something we have control over upstream, do we? I mean, it looks like it's a question of which (3rd party for us) thumbnailer is available and works, right? |
Newer versions of gdk-pixbuf use libglycin's asynchronous image save mechanism. This makes the fork-save redundant and has a potential of hanging when saving a screenshot.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2390588