"Save As" dialogue default path NullReferenceException
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pinta |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Version: 2.1.1
OS: Ubuntu 20.04.6 LTS
reproduce:
open pinta
File=>Save As
set name: some-new-image.jpg
the path will default to something like /run/user/
hit Save
exception window appears: "Unhandled exception":
System.
---> System.
at Pinta.Actions.
at Pinta.Actions.
at Pinta.Core.
at Pinta.Core.
at Pinta.Actions.
at Pinta.Core.
at InvokeStub_
at System.
--- End of inner exception stack trace ---
at System.
at System.
at System.
at GLib.Signal.
at GLib.SignalClos
probably not related, but just in case: "ll /run/user/1000/doc/ | grep 95720e22" shows "drwx------ 2 dylan dylan ..."
note: It works just fine if I save it somewhere else like ~/Desktop/
description: | updated |
summary: |
- "Save As" dialogue NullReferenceException + "Save As" dialogue default path NullReferenceException |
The `/run/` path isn't really meant to be shown to users. It appearing at all is a quirk of the design of the XDG portals being used in the Snap, and I'm imagining trying to use the portals on documents already in the portals is causing some circular logic that's causing this problem.
I'd expect that the "save" button works fine, it's exclusively "Save As" trying to create a new file over the old one, that already happens to be in the portals documents storage.
In 22.04, you'd be less likely to experience this, as the portals should identify files in $HOME and /mnt or /media as being inside the scope of the sandbox anyway, and so shouldn't treat the path specially.
And apparently in v1.18 of the portals, this is fixed entirely; the portals will automatically convert the `/run` path back into the real path automatically. Unfortunately for Ubuntu this means using 23.10 or newer.
It might be possible for Pinta to workaround this (can we force "Save As" to default to $HOME?), but in theory it's already fixed now at least if you're on a newer base distribution.