Open kem-a opened 3 years ago
I was not able to reproduce with your steps, but noticed an issue with metadata too.
Steps to reproduce:
io.elementary.photos '/home/davidak/Documents/theme_10_08.jpg'
PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
It is actually just a warning. The app does not crash.
Maybe the crash is related to a different problem? Maybe the same that i reported here: https://github.com/elementary/photos/issues/699
[davidak@gaming:~]$ io.elementary.photos '/home/davidak/Documents/theme_10_08.jpg'
** Message: 18:09:02.390: main.vala:347: Shotwell Photo Viewer 2.7.3
** (io.elementary.photos:3728934): WARNING **: 18:09:02.423: PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
** (io.elementary.photos:3728934): WARNING **: 18:09:02.569: PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
** (io.elementary.photos:3728934): WARNING **: 18:09:02.569: PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
** (io.elementary.photos:3728934): WARNING **: 18:09:02.575: PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
** (io.elementary.photos:3728934): WARNING **: 18:09:02.586: Page.vala:280: Page theme_10_08.jpg: Unable to locate action PrevPhoto
** (io.elementary.photos:3728934): WARNING **: 18:09:02.586: Page.vala:280: Page theme_10_08.jpg: Unable to locate action NextPhoto
** (io.elementary.photos:3728934): WARNING **: 18:09:02.586: Page.vala:280: Page theme_10_08.jpg: Unable to locate action FlipHorizontally
** (io.elementary.photos:3728934): WARNING **: 18:09:02.586: Page.vala:280: Page theme_10_08.jpg: Unable to locate action FlipVertically
** (io.elementary.photos:3728934): WARNING **: 18:09:02.586: Page.vala:280: Page theme_10_08.jpg: Unable to locate action SetBackground
** (io.elementary.photos:3728934): WARNING **: 18:09:02.602: Page.vala:280: Page theme_10_08.jpg: Unable to locate action PrevPhoto
** (io.elementary.photos:3728934): WARNING **: 18:09:02.602: Page.vala:280: Page theme_10_08.jpg: Unable to locate action NextPhoto
** (io.elementary.photos:3728934): WARNING **: 18:09:02.602: Page.vala:280: Page theme_10_08.jpg: Unable to locate action FlipHorizontally
** (io.elementary.photos:3728934): WARNING **: 18:09:02.602: Page.vala:280: Page theme_10_08.jpg: Unable to locate action FlipVertically
** (io.elementary.photos:3728934): WARNING **: 18:09:02.602: Page.vala:280: Page theme_10_08.jpg: Unable to locate action SetBackground
** (io.elementary.photos:3728934): WARNING **: 18:09:09.900: PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
** (io.elementary.photos:3728934): WARNING **: 18:09:09.901: PhotoMetadata.vala:557: Unable to read date/time Xmp.xmp.CreateDate from source theme_10_08.jpg: 2008-10-12T16:31+02:00 is not XMP format date/time
Photos 2.7.3 NixOS 21.11.334797.6979c0e49bb
I'm seeing a similar segfault during import and I'm guessing it's due to a "bad" image file, but I'm not sure how to tell which file it's accessing when it crashes?
@jjg You could try running the app from the terminal with GTK_MESSAGES_DEBUG=all io.elementary.photos
to get extra info on what the app is doing. This should give the names of any files it has problems with so the last one to appear may be the one causing the problem, Unfortunately the crash may occur before the app can generate the message.
You could also run the app under gdb
(you may need to install this) with gdb io.elementary,photos
. Enter run
to start the app then when it crashes enter bt
to get a backtrace. If you post the output here it can help pin down the cause.
I have pushed a PR #781 aimed at making the part of the code that handles photo metadata less likely to crash.
What Happened
When loading images containing Exif metadata app instantly crashes if in Preferences option
Write metadata to files
is toggled off.Expected Behavior
App should handle this without a crash. In perfect case scenario it should show error message to the user or to show at least which image caused error. There are many ways how to handle it. Going through 2k photos one by one to figure out the problem is not a very convenient way to solve errors.
One last note, it is still possible to crash app even with metadata toggle enabled. I had two photos that just did that, but I haven't narrowed down exact cause. My guess is that photos contains some non standard metadata, that Photos app can't handle.
[edit:] I dug deeper and found that two photos that caused a crash had corrupted Exif metadata. By fixing it Photos app could load it. So in summary, Photos app does not handle very well metadata issues.
Steps to Reproduce
Write metadata to files
.Logs
Platform Information
OS: elementary OS 6 Odin x86_64 Host: Aspire VX5-591G V1.08 Kernel: 5.11.0-34-generic