readlong': undefined method
unpack' for nil:NilClass (NoMethodError)
#20
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EXIFR::TIFF::Data#readlong throws exception for this image file.
http://dl.dropbox.com/u/4289117/2011-01-02%2016.24.57%5B1%5D.jpg
This photo was taken by Galaxy S camera in consinuous shooting mode.
backtrace is below.
readlong (and also readshort) try to access data out of range.
self[pos..(pos + 3)] returns nil, so nil.unpack called and NoMethodError thrown.
https://github.com/remvee/exifr/blob/master/lib/exifr/tiff.rb#L572
In my case, I wrote wrapper method and catched all exception from readlong.
https://gist.github.com/1096796
I'm using rails, so I put these code in config/environment.rb.
my envrionment: ruby version 1.8.6, exifr version 1.0.5 (newest)
The text was updated successfully, but these errors were encountered: