Bug 498255 - kiod6 exits prematurely, after first save operation
Summary: kiod6 exits prematurely, after first save operation
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.8.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-04 17:47 UTC by Dmitry Shachnev
Modified: 2025-01-08 11:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Stack traces from gdb (5.05 KB, text/plain)
2025-01-04 17:47 UTC, Dmitry Shachnev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Shachnev 2025-01-04 17:47:18 UTC
Created attachment 177110 [details]
Stack traces from gdb

SUMMARY
When you open a file using kioexec in a third-party application, after first save from that application the temporary directory is deleted, and saving the file second time is impossible.

STEPS TO REPRODUCE
1. Connect an Android phone as MTP device. Maybe the same will happen with other protocols, but I have not tested.
2. Create an empty file named test.txt on that device.
3. Open that file in a non-KDE editor from Dophin (I tested with ReText and Geany).
4. Edit the file, click Save.
5. In the "File Changed" dialog, click Upload.
6. In the "File Already Exists" dialog, click "Overwrite".

OBSERVED RESULT
- The editor displays a warning that the file ~/.cache/kioexec/run/<pid>_0/test.txt does not exist anymore.
- The kiod6 process is no longer running.
- The temporary directory ~/.cache/kioexec/run/<pid>_0 does not exist anymore, saving the file second time is not possible.

EXPECTED RESULT
It should be possible to save the file from the editor second time.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
It looks like the temporary directory is deleted by kiod6, which exits after the copy job is completed. I connected to a running kiod6 process with gdb, put a breakpoint on QDir::rmdir and confirmed that.

Then I put a breakpoint on QCoreApplicationPrivate::quitAutomatically, to find out why the process exits. Both stack traces are in the attached file.