[SOLVED] XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
Moderators: XnTriq, helmut, xnview, Dreamer
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
[SOLVED] XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
SOLVED: This is an upstream bug in KDE, which will be fixed with the release of KDE Framework 5.81. Read the recent replies for more info.
If I am viewing images on a network share over KDE, once I close XnViewMP and try to disconnect / unmount the shared folder, KDE gives me an error notification that says "Target is still busy."
When I investigate to see what program still has files open from this folder, I discover it's always XnViewMP as the culprit (even though I closed the program, it's still leaves "image-name.jpg" as an open file / process.)
If I access the network share and never open anything with XnViewMP, I can unmount / disconnect the share without issues.
If at any point I open an image in this shared folder with XnViewMP, I can never unmount / disconnect the share unless I forcibly kill the stubborn process.
I can provide screenshots of this bug if that helps explain it better.
If I am viewing images on a network share over KDE, once I close XnViewMP and try to disconnect / unmount the shared folder, KDE gives me an error notification that says "Target is still busy."
When I investigate to see what program still has files open from this folder, I discover it's always XnViewMP as the culprit (even though I closed the program, it's still leaves "image-name.jpg" as an open file / process.)
If I access the network share and never open anything with XnViewMP, I can unmount / disconnect the share without issues.
If at any point I open an image in this shared folder with XnViewMP, I can never unmount / disconnect the share unless I forcibly kill the stubborn process.
I can provide screenshots of this bug if that helps explain it better.
Last edited by winnylinny on Wed Mar 31, 2021 4:58 pm, edited 1 time in total.
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
do you start XnView with file parameter?
Pierre.
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
Good catch! Looks like we're getting close!
The problem does not occur if I first open up XnViewMP and then load an image. The bug only occurs if I double-click a file to open it in XnViewMP.
Let me list out a few comparisons if it helps.
Scenario 1, connect and disconnect
- Connect a network share in KDE (KIO, Smb4K, et. al.)
- Don't open any images
- Disconnect the network share
- No problems!
Scenario 2, using GwenView (Qt5-based image viewer)
- Connect a network share in KDE (KIO, Smb4K, et. al.)
- Right-click to open an image with GwenView
- Close GwenView
- Disconnect the network share
- No problems!
Scenario 3, using GPicView (GTK-based image viewer)
- Connect a network share in KDE (KIO, Smb4K, et. al.)
- Right-click to open an image with GPicView
- Close GPicView
- Disconnect the network share
- No problems!
Scenario 4, using XnViewMP
- Connect a network share in KDE (KIO, Smb4K, et. al.)
- Right-click to open an image with XnViewMP
- Close XnViewMP
- Disconnect the network share
- Error! Target is busy! Cannot disconnect the network share!
- Must manually kill the hanging file.so process
Scenario 5, using XnViewMP, without invoking a file parameter
- Connect a network share in KDE (KIO, Smb4K, et. al.)
- Launch XnViewMP from the menu shortcut
- Click-and-drag image into XnViewMP window
- Close XnViewMP
- Disconnect the network share
- No problems!
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
And XnView is not in process list?winnylinny wrote: ↑Wed Mar 24, 2021 6:12 pm Scenario 4, using XnViewMP
- Connect a network share in KDE (KIO, Smb4K, et. al.)
- Right-click to open an image with XnViewMP
- Close XnViewMP
- Disconnect the network share
- Error! Target is busy! Cannot disconnect the network share!
- Must manually kill the hanging file.so process
Pierre.
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
Correct. Once I close XnViewMP, all such xnview processes disappear. However, the process file.so is still using the image file. For every time I open up an image with XnViewMP (from my file browser), it adds another process of file.so that will not release the file, until I kill the file.so process. Only with KDE.
This issue does not happen if I open up an image using the file paramter with other image viewers (eg, GwenView, GPicView, Ristretto). The file.so process gracefully disappears.
This issue does not happen if I first open up XnViewMP and then load an image either by click-and-drag or File > Open
This issue always happens if I open up an image with XnViewMP with my file browser (under KDE), and it doesn't matter if I am using a network shared folder. The only reason I believed this was related to network shares was because it was obvious that I cannot disconnect the share. This issue also happens when opening an image file from an external USB drive.
This issue does not happen on Cinnamon desktop (only KDE for some reason.)
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
strangewinnylinny wrote: ↑Thu Mar 25, 2021 4:31 pm This issue does not happen on Cinnamon desktop (only KDE for some reason.)
Pierre.
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
It is. But XnViewMP is the only application under KDE that does this.
No other image viewer does this. No other program of any kind does this, even when opening a file from the file manager (or file parameter).
There's something about XnViewMP + KDE that triggers this bug, when opening a file from the file manager or file parameter. It keeps the file.so process hanging onto an image that has been "closed", and thus you are unable to unmount or disconnect a USB drive or network share.
No other image viewer does this. No other program of any kind does this, even when opening a file from the file manager (or file parameter).
There's something about XnViewMP + KDE that triggers this bug, when opening a file from the file manager or file parameter. It keeps the file.so process hanging onto an image that has been "closed", and thus you are unable to unmount or disconnect a USB drive or network share.
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
Looks like this is a bug with KDE / KIO. Certain applications, when using the file parameter, cause a hanging "file.so" process that will prevent you from unmounting an external drive or network share.
I was able to reproduce this bug with: Kate text editor, Google Chrome browser, XnViewMP, and a few other programs.
XnViewMP is fine! I am afraid the KDE developers are unaware of this issue.
I was able to reproduce this bug with: Kate text editor, Google Chrome browser, XnViewMP, and a few other programs.
XnViewMP is fine! I am afraid the KDE developers are unaware of this issue.
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
Which distribution and/or version of KDE are you using?
(Having minor problems using XnViewMP only with the latest KDE versions)
MP 1.5.0 x64: Debian 12 (KDE); Manjaro (KDE); Windows 10 x64
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
That's why I no longer believe this is an issue with XnViewMP. The same thing happens with Kate, Google Chrome / Chromium, and some other applications under the latest KDE / KIO. This is also reported by other users on the Manjaro forums, and a bug report on KDE Bug Tracker. Unfortunately, they are giving poor advice on the Manjaro forums, as they inaccurately assume the problem is with Kate (text editor) or perhaps the user is "doing something incorrect." The real issue is with KDE / KIO, and it will leave a hanging "file.so" process if you open up a file from the file browser for certain applications. This is why you cannot safely eject an external USB or safely disconnect a network share. It will error out "Target is busy!"
You can get around this issue by opening the application first, then dragging a file into its window. Now you will not have a hanging "file.so" process after you close the application, and you can safely eject or disconnect the device or network share.
I'm using Manjaro with the latest stable updates.
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
Here's some system info:
Operating System: Manjaro Linux
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.10.23-1-MANJARO
Dolphin Version 20.12.3
Operating System: Manjaro Linux
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.10.23-1-MANJARO
Dolphin Version 20.12.3
- winnylinny
- Posts: 164
- Joined: Fri Apr 17, 2020 5:35 pm
Re: XnViewMP does not release opened file under Linux KDE / KIO (0.98.2)
UPDATE: The KDE developers are aware of this issue and the the bug has been fixed! The fix will be released with KDE Framework 5.81.