ExifTool hang when processing many images

Started by joesphotos, March 26, 2025, 03:35:16 PM

Previous topic - Next topic

joesphotos

Windows 11, cmd.exe
ExifTool Version 13.25

Cmdline: exiftool -v0 -r -overwrite_original -RegionInfoMP= -RegionInfo= "*.jpg"

I was trying to strip Microsoft face id data from a large number of photos.
When I try, Exiftool processes some, then hangs.
Odd hang - in the windows TaskManager the exiftool.exe process shows as "suspended".
I cannot kill with Ctrl+C.
I can kill it from TaskManager, but the last image processed remains locked until I kill the parent Cmd.exe.
When run under a debugger, the debugger doesn't notice anything - no exceptions or other events.
If I then break-all, the main thread is at some point in a perl dll, it doesn't appear to be in some system blocking function.

Setup:
    mkdir test
    Copy "C:\images\*jpg" "C:\Test"
    cd test
    exiftool -v0 -r -overwrite_original -RegionInfoMP= -RegionInfo= "*.jpg"

I've reduced this down to a set of 44 images.
If I pick just a few, everything seems to work.

The attached log is the result of just 43 images -- when I delete the 44th image before running exiftool, it hangs just after listing "======== DSCN0140.JPG", without the 2 line summary at the end.

Phil Harvey

Would it be possible to zip up those 44 files and upload them to a file sharing service then send me a link?  My email is philharvey66 at gmail.com

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


Phil Harvey

I got the file, thanks.  First test on MacOS with Perl 5.18.4 ran without problems.  It will take a bit more time to first up the Windows virtual machine and test it with the .exe version.  Check back tomorrow.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

Well, I found some unexpected free time, and I ran your command with ExifTool 13.25 on Windows 10 running in a virtual machine.  I don't see the problem.  This is the end of the output of your command (17 files updated, 27 files unchanged), plus the verbose version information from ExifTool.  Are you running this exact version?

And what type of filesystem are you using?

Screen Shot 2025-03-26 at 5.35.09 PM.png

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I just thought of a possibility:  How are you capturing the RunLog files that you posted?  It could be that ExifTool is hung on blocked file i/o writing to this file.  (Although you did say it wasn't waiting in a system blocking function.)

Can you reproduce this with output to the cmd.exe console?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

joesphotos

Thanks for taking a look so quickly!

Interesting ... I captured the log just by copying the console after the tool stopped (hung).
Filesystem is NTFS, both on external USB drive and internal (C:) drives.

Version appears to match exactly as you showed above.

I downloaded "exiftool-13.25_64.zip" yesterday and unpacked it.
I moved the unpacked directory tree to C:\Bin, dropping the version from the path, so that I have

"C:\bin\exiftool\exiftool.exe"

I tried changing my PATH to "C:\Windows\system32;C:\bin\exiftool" to avoid any possibility of a stray DLL getting into the mix.


I'm not sure what to try next.
Maybe boot into safemode ... perhaps there is some driver messing things up?
The only antivirus I have is Windows Defender.


Phil Harvey

Safe mode is an idea.  Also try disabling Windows Defender.  It has caused problems in the past.  I don't remember it causing a hang, but it is worth a try.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

joesphotos

I tried on a 2nd computer.
After it processed a few images, Acronis Active Protection poppedup with "Possible ransomware detected" for exiftool.exe

I told it to trust me, then exiftool continued and completed without error.

So I will do some more investigation to see if I can figure out what is causing the problem on my 1st computer.