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

[Issue]: Thousands of "Error reading image tag" #8869

Closed
1 task done
jgoerzen opened this issue Dec 7, 2022 · 6 comments
Closed
1 task done

[Issue]: Thousands of "Error reading image tag" #8869

jgoerzen opened this issue Dec 7, 2022 · 6 comments
Labels
bug Something isn't working stale Stale and will be closed if no activity occurs upstream The issue is due to a upstream library or project

Comments

@jgoerzen
Copy link

jgoerzen commented Dec 7, 2022

Please describe your bug

While scanning my photos library, I get thousands of errors like this one:

[2022-12-07 18:20:34.978 +00:00] [ERR] [39] Emby.Photos.PhotoProvider: Image Provider - Error reading image tag for "/Pictures/2010s/2011/09/water-splashing/IMG_1592.JPG"
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at TagLib.IFD.IFDReader.StartIFDLoopDetect()
   at TagLib.IFD.IFDReader.Read(Int32 count)
   at TagLib.Jpeg.File.ReadAPP1Segment(UInt16 length)
   at TagLib.Jpeg.File.ReadMetadata()
   at TagLib.Jpeg.File.Read(ReadStyle propertiesStyle)   at TagLib.File.Create(IFileAbstraction abstraction, String mimetype, ReadStyle propertiesStyle)
   at Emby.Photos.PhotoProvider.FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken)

What's more, it appears that these items are never actually indexed, as it does this lengthy scan again and again (taking hours each time).

I would be happy to send a sample image to someone privately.

The image tags, if they exist, would have been written by digikam.

This is Jellyfin 10.8.8

Jellyfin Version

10.8.0

if other:

No response

Environment

- OS: Debian
- Virtualization: Docker (official image)
- Clients: Firefox
- Browser: Firefox
- FFmpeg Version: 
- Playback Method: n/a
- Hardware Acceleration: n/a
- Plugins: default only
- Reverse Proxy: n/a
- Base URL:
- Networking: n/a
- Storage:

Jellyfin logs

See above.  That message is repeated thousands of times due to the number of photos in my library.

FFmpeg logs

n/a

Please attach any browser or client logs here

n/a

Please attach any screenshots here

n/a

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jgoerzen jgoerzen added the bug Something isn't working label Dec 7, 2022
@Bond-009 Bond-009 added the upstream The issue is due to a upstream library or project label Mar 27, 2023
@Bond-009
Copy link
Member

Looks like a TagLib issue

@jellyfin-bot
Copy link
Contributor

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@jellyfin-bot jellyfin-bot added the stale Stale and will be closed if no activity occurs label Jul 27, 2023
@jellyfin-bot jellyfin-bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2023
@chicagobuss
Copy link

this issue is affecting me with version 10.8.13 running on windows 11 pro

slightly different error though:

[2024-02-27 13:46:02.415 -06:00] [ERR] [14] Emby.Photos.PhotoProvider: Image Provider - Error reading image tag for "F:\Pictures\DSC03069.JPG"
System.NotImplementedException: Unknown type/count 8/0 (128)
   at TagLib.IFD.IFDReader.CreateIFDEntry(UInt16 tag, UInt16 type, UInt32 count, Int64 baseOffset, ByteVector offsetData, UInt32 maxOffset)
   at TagLib.IFD.IFDReader.ReadIFD(Int64 baseOffset, UInt32 offset, UInt32 maxOffset)
   at TagLib.IFD.IFDReader.ParseMakernote(UInt16 tag, UInt16 type, UInt32 count, Int64 baseOffset, UInt32 offset)
   at TagLib.IFD.IFDReader.CreateIFDEntry(UInt16 tag, UInt16 type, UInt32 count, Int64 baseOffset, ByteVector offsetData, UInt32 maxOffset)
   at TagLib.IFD.IFDReader.ReadIFD(Int64 baseOffset, UInt32 offset, UInt32 maxOffset)
   at TagLib.IFD.IFDReader.Read(Int32 count)
   at TagLib.IFD.IFDReader.ParseIFDEntry(UInt16 tag, UInt16 type, UInt32 count, Int64 baseOffset, UInt32 offset)
   at TagLib.IFD.IFDReader.CreateIFDEntry(UInt16 tag, UInt16 type, UInt32 count, Int64 baseOffset, ByteVector offsetData, UInt32 maxOffset)
   at TagLib.IFD.IFDReader.ReadIFD(Int64 baseOffset, UInt32 offset, UInt32 maxOffset)
   at TagLib.IFD.IFDReader.Read(Int32 count)
   at TagLib.Jpeg.File.ReadAPP1Segment(UInt16 length)
   at TagLib.Jpeg.File.ReadMetadata()
   at TagLib.Jpeg.File.Read(ReadStyle propertiesStyle)   at TagLib.File.Create(IFileAbstraction abstraction, String mimetype, ReadStyle propertiesStyle)
   at Emby.Photos.PhotoProvider.FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken)

@dschrempf
Copy link

I also have this problem. I get the same error as original poster.

@divStar
Copy link

divStar commented Jul 21, 2024

I am also having this issue with supposed JPEG files (at least they do work as JPEG files on my system).

It seems, that Jellyfin uses the most recent version TagLibSharp (v2.3.0). It in turn uses ImageSharp v1.0.4 (see https://github.com/mono/taglib-sharp/blob/main/src/TaglibSharp.Tests/TaglibSharp.Tests.csproj). Now while I am not sure if it's e.g. a WebP file, before I got here, I found https://stackoverflow.com/questions/70792715/getting-missing-soi-marker-from-jpegdecoderr and SixLabors/ImageSharp#121, which contain some info about missing SOI markers.

I also found, that ImageSharp's newest version is v3.1.4 (not v1.0.4), meaning, that TagLibSharp is old.

Therefore they should introduce a fix if possible, though seeing as major versions have changed, I'd expect breaking changes. Perhaps someone can make a PR over there and then perhaps over here, but sadly I don't have the time necessary to do this properly.

@gnattu
Copy link
Member

gnattu commented Jul 21, 2024

We are moving away from the unmaintained taglib: #11879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Stale and will be closed if no activity occurs upstream The issue is due to a upstream library or project
Projects
None yet
Development

No branches or pull requests

7 participants