Skip to content
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

Encountering 'bad' file stalls file loading indefinitely #60

Closed
MartinPC opened this issue Aug 28, 2020 · 7 comments
Closed

Encountering 'bad' file stalls file loading indefinitely #60

MartinPC opened this issue Aug 28, 2020 · 7 comments

Comments

@MartinPC
Copy link

I'm working with jExifToolGUI 1.5.2 and ExifTool 12.05 in Windows 10 1909.

Working with jExifToolGUI for the first time (and with the ExifTool backend for the first time, as well), I attempted to load my personal "wallpaper" directory. (All of the files in that directory are JPGs that load properly in IrfanView, and IrfanView hadn't flagged any of them as being a different filetype with the wrong file extension.)

Unfortunately, two of my files wouldn't load in jExifToolGUI. Whether I tried Load Directory or Load Images, as soon as the listing of loaded files reached one of the "bad" files, the loading process stalled indefinitely, with the progress indicator continuing to bounce back and forth.

Would there be a way for jExifToolGUI to skip recalcitrant files and continue with the rest of the load, compiling a separate list of files that couldn't be loaded along the way? That would be very helpful.

As for my "bad" files, I managed to fix them in IrfanView, one by adding an IPTC caption and resaving it, the other by saving it as a TIF and then resaving the TIF as a JPG. But I don't really understand what was wrong with them in the first place. Maybe some of their undisplayed or empty metadata placeholders were corrupted or something.

Still, today is the first time I've dipped my toes in the water with IPTC metadata and tags, and I gotta tell ya: I never would have done it without a GUI. My eyesight and typing accuracy just aren't good enough for the command line anymore. What I'm saying is: Pretty cool frontend! Many thanks to the developer!

@hvdwolf
Copy link
Owner

hvdwolf commented Aug 29, 2020

As for my "bad" files, I managed to fix them in IrfanView, one by adding an IPTC caption and resaving it, the other by saving it as a TIF and then resaving the TIF as a JPG. But I don't really understand what was wrong with them in the first place. Maybe some of their undisplayed or empty metadata placeholders were corrupted or something.

Both exiftool looks at file extensions AND file contents. It "should" work, but it obviously doesn't for you.

With regard to the iptc caption: that is a weird one. When encountering an incorrect tag it should simply skip it. If the entire metadata structure has encountered major damage, we might have an issue.

Do you still have the 2 original images? If you could attach them to a post, I would really like to have a look at it and test with them.
I will also try myself to rename a few tiff, jpg, png, etcetera files and give them other extensions and see what exiftool and my program do.

Edit: I just renamed a .tif to .jpg, a .jpg to .tif, a .pgm to .jpg and a .png to .bmp. It still works fine and exiftool does indeed recognize the internal correct original format.
Please send me those 2 original files.

@MartinPC
Copy link
Author

Thanks for getting back to me so quickly!

Do you still have the 2 original images?

Yes! I prepended "PARTIALLY CORRUPTED - " to one filename but hadn't gotten around to the other file. Apart from that one edit, I think they have the original filenames and should have the original non-date metadata they had on the wallpaper sites from which I downloaded them. I just tested them in jExifToolGUI and they still won't load, so whatever caused my problem is still there.

If you could attach them to a post, I would really like to have a look at it and test with them.

I'm going to try to attach them now.

I will also try myself to rename a few tiff, jpg, png, etcetera files and give them other extensions and see what exiftool and my program do.

Edit: I just renamed a .tif to .jpg, a .jpg to .tif, a .pgm to .jpg and a .png to .bmp. It still works fine and exiftool does indeed recognize the internal correct original format.

Just to be clear, I didn't just change the extension of the "Printemps Hausseman" file, I used IrfanView's "Save As" command to save it as a TIF and then resave it as a JPG, so the actual internal format should have changed along the way. Also, the "Caracal" file is the one I added an IPTC caption to and then resaved in its original JPG format, without transiting via TIF.

Please send me those 2 original files.

Here goes nothing! Thanks again for getting back to me so quickly. I am curious to know what might have been wrong with the files. This is all very new to me...

PARTIALLY CORRUPTED - Printemps Haussmann Wholesale store in France 3840х2400
Caracal Caracal caracal English pronunciation k AER ə k æ l is a medium sized wild cat that lives in Africa the Middle East Persia and the Indian subcontinent

@hvdwolf
Copy link
Owner

hvdwolf commented Aug 31, 2020

Sorry. Took a bit longer (working hard on new functionality)
I tested on two different Linux distributions, on Win10 and on MacOS, but don't get your behavior. The files simply load.

Also when using exiftool directly on the images, I do not get errors or warnings in the images.
I am a bit stuck now.

@MartinPC
Copy link
Author

And I'm more stuck than you are. I've checked the "bad" files' permissions on my system, I've checked my Events logs -- which I'm not sure jExifToolGUI posts to, but no other events popped up around the time I last ran it and encountered a stall -- and I've checked my jExifToolGUI logs. I didn't find anything suspect.

Hopefully, what I experienced is just a bizarre idiosyncrasy limited to my computer. If so, I regret taking up your time with a one-off problem, especially since I now have a general idea of how to work around it. If not, it could be worth adding an image-loading "stall handler" to jExifToolGUI somewhere down the line.

By the way, I use SUMo to keep my various apps up to date and it recently flagged an available update to the OpenJDK Platform binary bundled with jExifToolGUI. (Installed version: 11.0.8.0; Update version 14.0.2.0.) I have no idea whether the updated version offers anything new and better for jExifToolGUI's purposes or whether it might be problematic on some platforms, but I thought I'd point it out just in case. (It's not like there aren't plenty of updates that cause more problems than they solve...)

Thanks very much for taking the time to follow up on my issue. I'm sorry it wasn't reproducible and didn't lead to a useful program improvement (except, maybe, a stall handler in some future release). Best of luck with your new functionality work! All the best.

@hvdwolf
Copy link
Owner

hvdwolf commented Aug 31, 2020

The java OpenJDK version 14 works just as well.
I test myself with 8, 11 and 14.

@hvdwolf
Copy link
Owner

hvdwolf commented Sep 6, 2020

I am almost 100% sure I fixed the isse with hanging on loading a file.
I request structured metadata from exiftool, and I get structured metadata from exiftool.
I have error checking to check if exiftool delivers data or not.
However, when exiftool encounters faulty metadata, the first line of output is not structured, but a line like "Warning - Encountered invalid metadata data in .....", or a likewise Error message. I now check for that, reformat the line, so I can display it in one table row (3 cells).
So hopefully it is fixed.

To be released in V 1.6 (most probably next weekend)

@MartinPC
Copy link
Author

MartinPC commented Sep 9, 2020

I am almost 100% sure I fixed the isse with hanging on loading a file.

To be released in V 1.6 (most probably next weekend)

Very cool, hvdwolf. Thanks for your work on it. I look forward to trying it out.

@hvdwolf hvdwolf closed this as completed Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants