Serious problem with Layered Tiffs in Gimp - Locking files
Environment/Versions
- GIMP version:
- Package:
- Operating System:
Description of the bug
This is actually a Windows bug...but it is probably high time GIMP/Gnome dealt with it, and I will try my best to explain why. PLEASE stick with me through this.
I solved this problem for myself, but Gimp is really putting more users than show up on line in a difficult position with this problem, even though Windows is the nasty culprit.
GIMP does seem to be the only recent regular trigger of this Windows bug from a cursory Google search, also from the Google search...Gimp (and others) have been triggering this nasty problem for many years...and then pointing fingers over at Windows ("But its a WINDOWS bug!") which is a very valid response...but hardly a comfort when files get frozen on huge amounts of disk space...and when Windows doesn't seem remotely interested in dealing with this pretty serious problem that is over 1 decade old at least.
Quick overview of the "big problem:"
If you want to see how long Windows has been failing to address this issue, then simply do a quick Google search for "cannot delete layered tiff."
I have found cases of people dealing with the general Windows problem at least as far back as 2005. Windows is NOT fixing this. Nobody at Microsoft could give a flying flip about this, and when you do get caught by the problem? It is quite a nightmare. In my case, Gigabytes were starting to get locked up. The reason I did not come to your forums sooner? On at least one occasion I found a Gnome/Gimp tech explaining, "Well that's a Windows bug..." I did not want to go in circles. I just wanted to fix it. Yes, it's a Windows bug, a nasty one. It has been around at least 15 years, and from Google, your program is the most consistent trigger of this Windows bug recent years.
I will confirm (as best able) that this is indeed a Windows bug vis-a-vis a screenshot from the shareware that helped me solve it, "Lockhunter," following another user's suggestion as a last resort. (I do not like using shareware programs that are not widely known/recognized...)
Lockhunter looks at the file provided, examines what is locking the file, and then forces it to unlock. Please see attached screen shot. "Explorer.exe" is locking the file!
Now - Close attention: LOTS of people appear on Google with LOTS of solutions. I tried them ALL before resorting (successfully) to lockhunter as a last resort due to my aversion to shareware. Here is where it gets thorny...but also sheds a little light on how nasty the bug is. One solution I attempted (that has worked for some people but failed for me - but provides info) was to copy the file address of the file I wanted to delete to clipboard, open up Windows command prompt in Administrator Mode, Open up Task Manager to "end task" Windows Explorer, and go over and delete the file from the old DOS command prompt...to then reopen Windows Explorer from Task manager.
In my case, that solution did not work, but it did shed light on how nasty the problem is.
Once I got into Windows Command Prompt, as I attempted to delete the TIFF there? It returned a "File Not Found" error. Think hard about that. After watching Command Prompt utterly fail to even find the file, if I reopened Windows Explorer, navigated to the directory...the file still there! So yes, a WINDOWS BUG. There is a locked file, locked by Explorer, that command prompt can't even see on some systems, and that Explorer itself refuses to delete. That's nasty. I use a solid state drive, which may explain why command prompt doesn't even see it on my system. Who knows?
Now when we open Lockhunter? It shows Windows "Explorer.exe" locking the file that the same Windows Explorer.exe will not help the user to delete. Wow, that's quite a Gordian knot. The program that is supposed to delete the file is locking it and won't let go.
(See attached screenshot.)
In my case? There were dozens of these large locked files, and I had to go back and force them one by one.
How did I manage to create dozens and dozens of these nasty undeletable files with a nasty Windows bug?
Gimp...thank you very much. Nondestructive editing.
Yes, it is a Windows problem. Absolutely.
...and I LOVE Gimp, and remain forever a huge Gnome fan.
Please find a way to deal with this so that if other users wade into this problem, they at least wade into it eyes wide open.
At the bare minimum you should think about a warning. Even better go back and see if you can tell if certain file features are triggering it? (Very large files seem to consistently be a problem)
Thanks for your patience/time. You are all amazing at what you do, and I will use Gimp till I die! I've been a big Gimp user for almost 2 decades...
Reproduction
Is the bug reproducible?
Reproduction steps:
- Create a large TIFF (seems to be persistent with
…
Expected result:
Actual result:
Additional information
If you have a backtrace for a crash or a warning, paste it here.