[BUG] Linux flatpak application hangs during export after import

Version ⁨26.05 (e64c6b1a)⁩
Python 3.13.14 Qt 6.10.3 Chromium 134
System:
Kernel: 6.8.0-124-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33
wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy

  1. Create a new deck

  2. Import to deck from tab delimited text .tsv file to newly created deck (above) with type Basic (and reversed card)

  3. Export new deck to .apkg file using gear icon menu to right of deck

  4. Note that default location is temp directory that I’m guessing was used as part of import process.

  5. If blindly accept default location then application hangs and process must be killed (simple kill, no -9 required)

  6. If location is changed to valid directory then application does not hang and export completes normally.

Are you only seeing it with this note type? Or is that just an example?

Is it important that it has been imported from a text file? Does that mean if you import from a .apkg instead in step 2, the issue does not occur?

This only happens when you choose .apkg? Or also with .colpkg or .txt?

What if you deliberatly try to save the file to the tmp folder? I mean: is it not working in general, even if you navigate to a valid folder (one where the export worked) and then (without actually exporting) navigate to the tmp directory instead (and now export)?

Also, regarding the folder where is just hangs: does that folder have any unusually restrictive permissions or attributes set?

Generally I would note that I was not implying that any of the particular details in the steps were necessary to reproduce. I was just trying to document exactly what I did, because I understand how frustrating it is to try to reproduce a defect without knowing exactly what was done.

However, taking some more stabs at it I find that it can be reproduced by also starting import with an apkg file. Also I can reproduce without doing the import at all by navigating to the directory in question, which I probably should have called a working directory rather than a temp. The directory for me is /run/user/1000/doc/9c9b2fc4/

The web gods say the purpose of /run/user/$UID/doc/ is

Document portals often used by sandboxed flatpak applications.

Anki was installed as a flatpak package, so that tracks.

Furthermore it can be reproduced after starting the app and doing nothing but navigating to said directory and exporting in apkg or any other format.

Of course it would be strange for a user to try to use this directory in the first place, so the main defect is that the working directory seems to have been left by the code logic in the place where it was temporarily working.

Once in that directory I don’t know exactly what is happening, but it might be hard to detect that it should not try to save there. It is likely a deadlock involving a thread or something. So just setting the working directory (or whatever controls the file box) back to where the user last had it is probably sufficient to address the issue.