question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EOFException reading TIFFfile

See original GitHub issue

Hi,

I’m getting an EOFException when trying to read the attached tiff (note the extension has been changed to txt so it can be uploaded here).

Stack trace produced is

java.io.EOFException: Unexpected end of PackBits stream
	at com.twelvemonkeys.io.enc.PackBitsDecoder.readFully(PackBitsDecoder.java:200) ~[common-io-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.io.enc.PackBitsDecoder.decode(PackBitsDecoder.java:156) ~[common-io-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.io.enc.DecoderStream.fill(DecoderStream.java:178) ~[common-io-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.io.enc.DecoderStream.read(DecoderStream.java:122) ~[common-io-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.io.LittleEndianDataInputStream.readFully(LittleEndianDataInputStream.java:423) ~[common-io-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.io.LittleEndianDataInputStream.readFully(LittleEndianDataInputStream.java:396) ~[common-io-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReader.readStripTileData(TIFFImageReader.java:1508) ~[imageio-tiff-3.3.2.jar:3.3.2]
	at com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:934) ~[imageio-tiff-3.3.2.jar:3.3.2]

sample.txt

I can read similar TIFF images that are in portrait orientation but cannot read ones like the one attached that is in landscape orientation. Don’t know if that’s got anything to do with the problem though.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
piranhajcommented, Jan 12, 2018

Hi @haraldk, I’ve tested this now and can confirm it’s working perfectly. Thanks for fixing this.

1reaction
piranhajcommented, Feb 17, 2017

Hi Harold,

The one I attached is landscape. A similar one that works is attached and is portrait. It is FillOrder 2 but is compressed with CCITT Group 4 rather than PackBits.

portraitSample.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting java.io.EOFException while reading a SQLite file from ...
I am seeing an EOFException exception while reading a SQLite file from temp directory. Following is the code for reading the file.
Read more >
Exception reading tiff - Usage & Issues - Image.sc Forum
From the stack trace, you are opening the TIFF file using the SCIFIO library. Firstly, as a workaround, you can try to disable...
Read more >
ArrayIndexOutOfBoundsException when reading G4 compressed ...
The TIFF file displays with IrfanView, and reads with java 7. The problem itself appeared in our current decoder too (which is an...
Read more >
[SCIFIO] opening tiff files with ImageJ2
EOFException : Attempting to read >> beyond end of file" >> >> The image contains some metadata I can´t read when opening with...
Read more >
TIFFFile
public class TIFFFile extends java.lang.Object ... int, read(byte[] b, int off, int len). int, read(float[] f) ... EOFException, java.io.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found