elementary / photos

Photo viewer and organizer designed for elementary OS
https://elementary.io
GNU Lesser General Public License v2.1
107 stars 39 forks source link

Photos crashes while interpreting corrupt JPEG #734

Open yetimaan opened 1 year ago

yetimaan commented 1 year ago

What Happened?

When a JPEG with no image data is interpreted, Photos crashes.

Steps to Reproduce

  1. Introduce a corrupted JPEG in Photos library
  2. Import into library
  3. Photos crashes upon import of corrupted photo

Expected Behavior

Photos should silently ignore corrupted photo and place in an "ignored/bad import log" within GUI. Then show a popup or notification that some files did not import.

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

Photo.vala:1112: Unable to interrogate photo file /home/username/Pictures/corrupted.jpg: Error interpreting JPEG image file (JPEG datastream contains no image)
[1]    73000 segmentation fault  io.elementary.photos

Hardware Info

No response

wout commented 10 months ago

Same here. Here's the backtrace:

Aug 22 19:47:33 Framey io.elementary.p[78031]: Directory OlympusCs, entry 0x0101: Strip 0 is outside of the data area; ignored.
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Photo.DateTimeOriginal from source P1010795.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Photo.DateTimeDigitized from source P1010795.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Image.DateTime from source P1010795.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Photo.DateTimeOriginal from source P1010720.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Photo.DateTimeDigitized from source P1010720.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Image.DateTime from source P1010720.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: Invalid JPEG preview image.
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Photo.DateTimeOriginal from source P1011648.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Photo.DateTimeDigitized from source P1011648.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey io.elementary.p[78031]: PhotoMetadata.vala:557: Unable to read date/time Exif.Image.DateTime from source P1011648.JPG: 0000:00:00 00:00:00 is not EXIF format date/time
Aug 22 19:47:33 Framey kernel: [ 9560.077863] pool-io.element[78107]: segfault at 0 ip 00007fac9a8671c9 sp 00007fac3a7faea0 error 6 in libc.so.6[7fac9a828000+195000] likely on CPU 14 (core 26, socket 0)
Aug 22 19:47:33 Framey kernel: [ 9560.077885] Code: 0f 85 3e 1c 00 00 8b 8d 58 fa ff ff 83 f9 2f 0f 87 47 0d 00 00 89 c8 83 c1 08 48 03 85 68 fa ff ff 89 8d 58 fa ff ff 48 8b 00 <89> 10 e9 18 d0 ff ff 4c 89 ff e8 e8 68 02 00 41 89 c5 83 f8 ff 0f