Hi there,
I suppose the topic I'm gonna raise here may require some attention from exiftool's development team or Phil himself.
I've been using for a couple of years the FastPhotoTagger on my Windows 10 station and have reported a bug related to how exiftool handles files when I update the tag base in FastPhotoTagger. Following a long correspondce with FastPhotoTagger's author and a series of debugging tests, we've uncovered an old discussion in the archive of the forum:
https://exiftool.org/forum/index.php?topic=10128.0;wap2
and the following solution
https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows
Although Oliver Betz fix for the problem ain't perfect (but apparently works for some folks)
https://www.virustotal.com/gui/file/d0a276756443c2f90541c694950c08c20782b2093170aab198d64216cd6c0639/detection
- I am still curious why Phil ignores the problem for so long and allows third-party fixes to step in.
However at this moment I am more concerned about the following discovery. I've noticed that occasional tag base crashes that I experience with FastPhotoTagger and exiftool (on which FastPhotoTagger is based) usually follow cleaning operations with Ccleaner. My theory is that CCleaner cleans C:\Users\USERNAME\AppData\Local\Temp and then exiftool reaches out for whatever files it stores in the same folder and when it doesn't find there what is required for its work it crashes.
The good news is that CCleaner also permits exclusions to be added (see attached screenshot). So I can try to add the whole folder C:\Users\USERNAME\AppData\Local\Temp or otherwise only the files that exiftool stores there.
I'd be grateful if someone knowledgeable enough could enlighten me on what files I need to put to CCcleaner's exclusion list.
Thanks in advance.
(https://ibb.co/thxCq7h)
I haven't looked closely at FastPhotoTagger but if it's using the -stay_open option (https://exiftool.org/exiftool_pod.html#stay_open-FLAG) and you're running it while using CCleaner, then your deleting the underlying Perl code and interpreter while exiftool is running.
The Windows "executable" uses Perl's PAR::Packer (https://metacpan.org/pod/PAR::Packer) to bundle the Perl code with a minimal Perl interpreter. Upon first running the program, the interpreter and code are extracted into the Temp directory and run from there. See this StackOverflow question (https://stackoverflow.com/a/18240229/3525475).
Phil does this to make it easier for Windows users to run the program, as the alternative would be to force them to install Perl and figure out how to set up exiftool to use that. Linux and Mac come with Perl as a standard, or at least Mac used to, not sure about currently.
Thanks, Stargeek.
Here is the content of my C:\Users\USERNAME\AppData\Local\Temp (see attached screenshot)
(https://i.ibb.co/MpH33kH/111.jpg) (https://ibb.co/HYykkTy)
Within that folder there is the folder par-6a62696f6e6963, which contains the following sub-folder cache-exiftool-12.42. Presumably the name of the par-6a62696f6e6963 folder is not fixed and changes at every new exiftool startup (whenever CCleaner removes it), whereas cache-exiftool-12.42 must be fixed.
1. When I update exiftool, does it create a new cache folder inside the same directory par-6a62696f6e6963, or does it create a new directory par-XXXXXXXXXX?
2. Are there any other exiftool's files or folders within C:\Users\USERNAME\AppData\Local\Temp that I shall add to the Ccleaner's exclusion list?
(https://i.ibb.co/Fh8ZN2P/222.jpg) (https://ibb.co/NFWDQ54)
Quote from: jbionic on June 28, 2022, 11:42:17 PM
Within that folder there is the folder par-6a62696f6e6963, which contains the following sub-folder cache-exiftool-12.42. Presumably the name of the par-6a62696f6e6963 folder is not fixed and changes at every new exiftool startup (whenever CCleaner removes it), whereas cache-exiftool-12.42 must be fixed.
The folder appears to be fixed. See Uninstalling Windows executable (https://exiftool.org/install.html#uninstall_Windows_exe). The extracted files will stay there until removed in some way. If you have multiple versions of exiftool, they will all appear in that directory. If you delete the directory, there will be a delay the first time you run exiftool, as it has to extract all the files into the PAR directory before it runs. Any further commands will run off the extracted files and would be quicker. This last part is mentioned in the docs someplace, but I can't find the link atm.
Quote1. When I update exiftool, does it create a new cache folder inside the same directory par-6a62696f6e6963, or does it create a new directory par-XXXXXXXXXX?
As per the link above, the directory name will be the same. It will change if you switch users.
Quote2. Are there any other exiftool's files or folders within C:\Users\USERNAME\AppData\Local\Temp that I shall add to the Ccleaner's exclusion list?
No, there shouldn't be. It should all be contained in the PAR directory.
Quote from: jbionic on June 28, 2022, 08:55:00 AM
Although Oliver Betz fix for the problem ain't perfect (but apparently works for some folks)
https://www.virustotal.com/gui/file/d0a276756443c2f90541c694950c08c20782b2093170aab198d64216cd6c0639/detection
What exactly do you consider bad about my package?
Did you read the comment on false positives on my web site? There are some stupid scanners complaining about Inno Setup components. This is a long known issue with Inno Setup.
If you feel uncomfortable because of the two false warnings, just use the ZIP archive instead of the installer. Neither Perl, ExifTool or my launcher trigger a virus warning.
Quote from: jbionic on June 28, 2022, 08:55:00 AM
- I am still curious why Phil ignores the problem for so long and allows third-party fixes to step in.
Phil and I agreed that I continue to maintain the package, because I'm familiar with the build process and testing on Windows.
What's the problem with it in your opinion?
Quote from: jbionic on June 28, 2022, 08:55:00 AM
However at this moment I am more concerned about the following discovery. I've noticed that occasional tag base crashes that I experience with FastPhotoTagger and exiftool (on which FastPhotoTagger is based) usually follow cleaning operations with Ccleaner. My theory is that CCleaner cleans C:\Users\USERNAME\AppData\Local\Temp and then exiftool reaches out for whatever files it stores in the same folder and when it doesn't find there what is required for its work it crashes.
That's exactly why I made the "native Perl" version. Please read "Purpose" on https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows
The first item is "Run Perl in a native, clean and fast way, avoiding the self-extracting Perl Packager with its resulting problems"
Oliver
Quote from: jbionic on June 28, 2022, 08:55:00 AM
- I am still curious why Phil ignores the problem for so long and allows third-party fixes to step in.
I forgot to mention that I neither consider my package a "fix" nor "third-party":
It is no fix but just a different method of bundling Perl. Of course, I consider it the cleaner method, but not a "fix".
And (besides my tiny Perl launcher), it is not "third party": It's just the ExifTool code and Strawberry Perl.
If you run ExifTool in a Mac or Linux environment, would you consider the Perl installation also "third party"?
Oliver
After updating exiftool it appears that the folder
par-XXXXXXXXXX has remained unchanged, however inside that folder a new sub-folder
cache-exiftool-12.44 has been created. So this eventually triggered the same error in FastPhotoTagger to pop up again. CCleaner had nothing to do with the latest error because my current exclusion rules for CCleaner allow a broad range of sub-folder names within
par-XXXXXXXXXX to be used
To summarize the above, it would be easier for all if upon updating exiftool didn't create a new
cache-exiftool-XX.XX folder and unpacked to precisely the same location :) Is it possible to ask for that little change to be delivered any time soon?
Quote from: StarGeek on June 29, 2022, 12:33:55 AMQuote from: jbionic on June 28, 2022, 11:42:17 PM1. When I update exiftool, does it create a new cache folder inside the same directory par-6a62696f6e6963, or does it create a new directory par-XXXXXXXXXX?
As per the link above, the directory name will be the same. It will change if you switch users.
This would cause problems for people (like me for instance) who run multiple versions of ExifTool on the same system.
- Phil
I was going to post that earlier but forgot.
I currently have 53 versions of exiftool on my computer which I'll use whenever I need to narrow down a possible bug. Plus there's a few more copies that various other programs use, such as Geosetter and Imatch. Using the same directory would cause massive problems.
Heh, I just noticed that one program I use is still on ver 9.82.
Quote from: jbionic on August 03, 2022, 01:57:22 PMAfter updating exiftool it appears that the folder par-XXXXXXXXXX has remained unchanged[...]
I'm still curious about your answer to my posting dated June 30, 2022, 05:34:14 PM.
If you (like me) don't like the behavior of the PAR/PP packer, why don't you use the "native Strawberry Perl" package?
Quote from: obetz on August 06, 2022, 02:23:37 PMQuote from: jbionic on August 03, 2022, 01:57:22 PMAfter updating exiftool it appears that the folder par-XXXXXXXXXX has remained unchanged[...]
I'm still curious about your answer to my posting dated June 30, 2022, 05:34:14 PM.
If you (like me) don't like the behavior of the PAR/PP packer, why don't you use the "native Strawberry Perl" package?
Sorry I ain't a technical person to understand the wording "native Strawberry Perl", to me it sounds almost like "cherry pie" :) All I meant to say is that the problem persists following each exiftool update and I find it a little awkward or perhaps even redundant to use your third-party solution given that 2 parties involved (FastPhotoTagger and exiftool) can fix it
Overall the situation with exiftool updates is somehow reminiscent of what used to be called the DLL hell for Windows-based computers, if I ain't mistaken ;)
It was later resolved through implementation of the side-by-side assembly by Microsoft
Quote from: jbionic on August 09, 2022, 10:51:07 AMSorry I ain't a technical person to understand the wording "native Strawberry Perl",
What this means is that you can use the pure Perl version of exiftool. Strawberry Perl (https://strawberryperl.com/) is just one version of Perl available for Windows. ActiveState (https://www.activestate.com/products/perl/)is another version.
You would then download the main exiftool program and library, the first link on the main page that currently says "Download Version 12.44" and use that. It comes as a .tar.gz archive but 7zip can extract it.
This is the code that the Windows "executable" extracts to the temp directory. Instead of using the perl executable that's extracted from the Windows version, you are using a regular Perl executable.
Quote from: StarGeek on August 16, 2022, 01:49:24 PMQuote from: jbionic on August 09, 2022, 10:51:07 AMSorry I ain't a technical person to understand the wording "native Strawberry Perl",
What this means is that you can use the pure Perl version of exiftool. Strawberry Perl (https://strawberryperl.com/) is just one version of Perl available for Windows. ActiveState (https://www.activestate.com/products/perl/)is another version.
Understood. Thanks. Apparently, I will then have to check for updates of Perl too. This is kinda curing a pain by creating another pain 8)
In case you haven't come across it, you could use Chocolatey (https://chocolatey.org/) to install and keep it (and other programs) up to date. Everyday, I run a bat file with
choco upgrade all -y
pause
Chocolatey then checks the 135 programs I have installed with it and updates them if needed. Make that 132, I just noticed there were 3 programs I needed to uninstall ;) This includes programs like Python, LibreOffice, Calibre, and DigiKam. It will also install command line programs such as cURL, FFMpeg, ImageMagick, and even Exiftool. It automatically add these programs to the PATH as well. Both versions of Perl are available, though if you went with the pure Perl version of exiftool, you'd have to update that manually.
If you do decide to try it, the first thing you should install would be the Chocolatey GUI (https://community.chocolatey.org/packages/ChocolateyGUI), which makes it a lot easier.
Quote from: StarGeek on August 16, 2022, 07:35:57 PMIn case you haven't come across it, you could use Chocolatey (https://chocolatey.org/) to install and keep it (and other programs) up to date. Everyday, I run a bat file with
choco upgrade all -y
pause
Chocolatey then checks the 135 programs I have installed with it and updates them if needed. kes it a lot easier.
Thanks. I've heard of programs like that. The only problem is that as any Russian I am naturally paranoid (actually, this can be seen from above discussion and my comments related to Oliver Betz's solution, which may be perfectly fine, but I am just too stubborn to embrace it). So I am always a little bit suspicious of what updates can be brought to my computer from behind automatically if I ain't checking them personally :D Sometimes I find it difficult to mollify my suspicions even in very simple cases like the following:
https://www.virustotal.com/gui/file/602504458a47cede9048d28753359567cc2a3a9e4df001822bfba28d294f0c1f?nocache=1
https://www.virustotal.com/gui/file/5e7e135084732109ca7ede691778a0b5d3ec23fbbaa69fc4e51c0cd28323a25b
Quote from: StarGeek on August 16, 2022, 01:49:24 PMQuote from: jbionic on August 09, 2022, 10:51:07 AMSorry I ain't a technical person to understand the wording "native Strawberry Perl",
What this means is that you can use the pure Perl version of exiftool.
By '"native Strawberry Perl" package' (jbionic stripped "package" from the quote) I meant my package.
It's up to jbionic to choose between the PAR/PP version (pretending to be monolithic) and my package. He dislikes both, the PAR/PP version for it's temp dir problems, and my version because it's "third party" (though also open source).
I can't help then.
Oliver