-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Release file handle when opening new file #272
Comments
I assume this is on windows, right? |
Yes, Windows 10 |
I just tested on Windows 8.1 and it works there.
Is this the same as you did? |
Just reproduced with:
|
It seems it doesn't reproduce every time... |
Reproduce it again with a ~3h video with 18 segments reduced to ~1h30m |
When delete gives an error, maybe you could check which process is holding the file open |
LosslessCut.exe has the file handle blocking delete. |
I tried again now with the newest version and I'm still not able to reproduce this problem on Windows 8.1. I can even trash the file while it is open in LosslessCut. Could it be some stricter settings in your operating system configuration? |
Forgot to check what version I'm using. It's 3.13.0.0. |
With 3.19.0, the file handle remains open in ffprobe.exe, but it gets released after some time. |
Also managed to reproduce stuck file handle in LoselessCut that doesn't get released. |
How long do you try to wait before checking the file handle? Does it get released after some time? I know that Windows has a lot of issue with file locking in general compared to MacOS/Linux which doesn't have a concept of locking files. |
If it's locked by ffprobe.exe it gets released after some time (not much, ~1min). |
Ok. Do you see any other patterns? Like did it ever happen from just opening a file and then closing it? Or do you have to cut first for this to happen? Does it happen with only some file types? |
Just reproduced file handle stuck temporary by ffprobe.exe and also permanently by LoselessCut 3.19.0 with:
So the editing has nothing to do with file handle getting stuck. |
I am experiencing the same issue consistently. Windows 10 Enterprise Clicking the trash icon after editing file of size 433,373 KB displays the following messages in 'Developer Tools' view (I replaced some file path values with a string enclosed with <> for privacy): react_devtools_backend.js:4049 Command failed: C:\Users<acsii_string>\AppData\Local\Temp\7dd5c8b8-fe4c-41ff-bda7-7f7313e0caad.tmp.exe D:<ascii_string><ascii_string> 2021-10-12 15_04-cap.mp4
A dialog appears with message: "Unable to move file to trash. Do you want to permanently delete it? User then selects button labeled "Permanently delete" and receives the following exceptions: Error: ENOENT: no such file or directory, unlink ' D:<ascii_string><ascii_string> 2021-10-12 15_04-cap-proj.llc' react_devtools_backend.js:4049 Error: EBUSY: resource busy or locked, unlink ' D:<ascii_string><ascii_string> 2021-10-12 15_04-cap.mp4' |
I think it may be related to this chromium bug: i suspect that it happens when first opening a natively supported file (which creates a Update: And I don't think it's what's causing it because |
Same issue with Windows 11, Lossles Cut v3.4.3 "Trash Can" function also does not work for deleting original file maybe we can have some hack to "restart" the program when the trash can button is hit... |
@aCuria do you see which program is locking the file? Is it losslesscut.exe or is it ffprobe.exe ? and if you wait for a few minutes, will it resolve? |
Error message windows gives is "The action can't be completed because the file is open in LosslessCut"
ffprobe process does not appear to be running in the task manager
Not after 5min, and losslesscut cpu usage is at 0% all the way
converted |
I did some improvements to the Canvas player (unsupported files player) that will hopefully resolve this in the next version |
Would be nice to see whether the newest version has improved this situation |
No change in v3.44... The bug seems to be related to not closing the original file after proxy generation |
Is it still LosslessCut.exe holding the file handle, or is it ffmpeg.exe or ffprobe.exe? And does the handle get released after some seconds/minutes? |
Yes, LosslessCut is holding the file handle according to windows.
…On Fri, Mar 18, 2022 at 1:23 PM Mikael Finstad ***@***.***> wrote:
Is it still LosslessCut.exe holding the file handle, or is it ffmpeg.exe
or ffprobe.exe?
—
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIOVH2LSR3KYYZC3L3WGLWDVAQHN5ANCNFSM4LFEOLWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you. Then I honestly don’t know what’s causing it but hopefully after upgrading Electron to the latest version it will be solved. |
I've been using release 3.44.0 and still run into this issue. The way I find myself running into it either exporting + deleting videos in a large batch, or exporting videos that are large in size. My typical workflow might be: Large batch:
Large videos:
It seems extra likely for deleting to fail if you leave lossless cut open in the background for a while, and then come back to it. This may or may not be true. |
What's useful to observe in order for me to fix this:
If 2 is true, it might be possible to workaround this issue by having losslesscut continuously retrying to delete the file in a while-try-catch loop for a few minutes after the delete button is pressed, to remedy these issues on windows. |
|
If it never gets released and it's LosslessCut.exe that's holding the file handle (and you see no ffmpeg.exe or ffprobe.exe processes in Task Manager), then that's probably an electron bug and nothing I can do about it, but it might be fixed once we upgrade electron to the newest version #714 |
Writing to confirm that there are no ffmpeg or ffprobe processes in task manager, and it never gets released. And for clarification, I try to delete the file from within LosslessCut (the |
Even after opening a new file, llc still holds the handle to the old file indefinitely? I hope this will be fixed when we upgrade electron |
Yes it does. I need to close LosslessCut before I'm able to delete the file. |
Update: seems to be a problem also on MacOS, although less visible #1179 |
I have a similar problem in Win10 and version 3.46.2 . After exporting a cut version with embedded JPEG, and closing the file with Ctrl+W (or File->Close) I'm regularly unable to delete the original file unless I close LosslessCut. I if use ResMon or Process Explorer to search for the blocking handler, both report LosslessCut.exe twice (!). |
If you can try again with the newest version that'd be great. now upgraded to electron 21. |
I tried some larger files with 3.48.2 beta and closing them with Ctrl-W after exporting seems to release the file handle immediately and I can e.g. delete the original file -> seems to work for me. Thanks! |
great! I'll close this and we can reopen if it's still a problem |
Open file, open new file, try to delete old file => file is till opened in LoselessCut
The text was updated successfully, but these errors were encountered: