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

App crash when opening file from specific directory #699

Open
davidak opened this issue Dec 29, 2021 · 0 comments
Open

App crash when opening file from specific directory #699

davidak opened this issue Dec 29, 2021 · 0 comments

Comments

@davidak
Copy link

davidak commented Dec 29, 2021

What Happened?

When i open an image from /home/davidak/code/webseite/files/images, the app crash after 2 seconds. When i open the same file from a different directory. e.g. /home/davidak/Documents, the app does not crash. It is not related to the file i choose.

Steps to Reproduce

You could try to get the directory: https://codeberg.org/davidak/webseite

Expected Behavior

App not crash

OS Version

NixOS 21.11.334797.6979c0e49bb

Software Version

Photos 2.7.3

Log Output

Opening any file from here crash the app

[davidak@gaming:~]$ io.elementary.photos /home/davidak/code/webseite/files/images/Identität-Modell.png
** Message: 17:47:44.080: main.vala:347: Shotwell Photo Viewer 2.7.3

** (io.elementary.photos:3727593): WARNING **: 17:47:44.295: Page.vala:280: Page Identität-Modell.png: Unable to locate action PrevPhoto

** (io.elementary.photos:3727593): WARNING **: 17:47:44.295: Page.vala:280: Page Identität-Modell.png: Unable to locate action NextPhoto

** (io.elementary.photos:3727593): WARNING **: 17:47:44.295: Page.vala:280: Page Identität-Modell.png: Unable to locate action FlipHorizontally

** (io.elementary.photos:3727593): WARNING **: 17:47:44.295: Page.vala:280: Page Identität-Modell.png: Unable to locate action FlipVertically

** (io.elementary.photos:3727593): WARNING **: 17:47:44.295: Page.vala:280: Page Identität-Modell.png: Unable to locate action SetBackground

** (io.elementary.photos:3727593): WARNING **: 17:47:44.517: 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:3727593): CRITICAL **: 17:47:44.536: Directory NikonPreview with 8224 entries considered invalid; not read.
Segmentation fault (core dumped)

Opening the same file from here does not crash the app

[davidak@gaming:~]$ io.elementary.photos '/home/davidak/Documents/Identität-Modell.png' 
** Message: 17:47:59.110: main.vala:347: Shotwell Photo Viewer 2.7.3

** (io.elementary.photos:3727617): WARNING **: 17:47:59.323: Page.vala:280: Page Identität-Modell.png: Unable to locate action PrevPhoto

** (io.elementary.photos:3727617): WARNING **: 17:47:59.323: Page.vala:280: Page Identität-Modell.png: Unable to locate action NextPhoto

** (io.elementary.photos:3727617): WARNING **: 17:47:59.323: Page.vala:280: Page Identität-Modell.png: Unable to locate action FlipHorizontally

** (io.elementary.photos:3727617): WARNING **: 17:47:59.323: Page.vala:280: Page Identität-Modell.png: Unable to locate action FlipVertically

** (io.elementary.photos:3727617): WARNING **: 17:47:59.323: Page.vala:280: Page Identität-Modell.png: Unable to locate action SetBackground

dmesg -T

[Wed Dec 29 17:49:38 2021] .io.elementary.[3727671]: segfault at 7d8 ip 00007ff226b37ed2 sp 00007ffd392dcb80 error 6 in libc-2.33.so[7ff226b02000+143000]
[Wed Dec 29 17:49:38 2021] Code: 0f 85 22 25 00 00 8b 8d 58 fa ff ff 83 f9 2f 0f 87 ab 18 00 00 89 ca 83 c1 08 48 03 95 68 fa ff ff 89 8d 58 fa ff ff 48 8b 12 <89> 02 e9 2e d6 ff ff f7 85 bc f9 ff ff 00 20 00 00 b8 ff ff ff ff

coredumpctl gdb

Using host libthread_db library "/nix/store/vjq3q7dq8vmc13c3py97v27qwizvq7fd-glibc-2.33-59/lib/libthread_db.so.1".
Core was generated by `/run/current-system/sw/bin/io.elementary.photos /home/davidak/code/webseite/fil'.
tProgram terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff226b37ed2 in __vfscanf_internal (s=s@entry=0x7ffd392dd270, format=format@entry=0x64c8ac "%4d%2d%2d%2d%2d%2d", argptr=argptr@entry=0x7ffd392dd258, mode_flags=mode_flags@entry=2)
    at vfscanf-internal.c:1896
1896	vfscanf-internal.c: No such file or directory.
[Current thread is 1 (Thread 0x7ff222accb40 (LWP 3727671))]
(gdb) bt
#0  0x00007ff226b37ed2 in __vfscanf_internal (s=s@entry=0x7ffd392dd270, format=format@entry=0x64c8ac "%4d%2d%2d%2d%2d%2d", argptr=argptr@entry=0x7ffd392dd258, mode_flags=mode_flags@entry=2)
    at vfscanf-internal.c:1896
#1  0x00007ff226b33fea in __GI___isoc99_sscanf (s=0x2898fe0 "2008 01 03 02 55 28  0100", format=0x64c8ac "%4d%2d%2d%2d%2d%2d") at isoc99_sscanf.c:31
#2  0x00000000004ca4c3 in metadata_date_time_construct_from_exif ()
#3  0x00000000005a811b in photo_metadata_get_date_time ()
#4  0x00000000005a822f in photo_metadata_get_first_date_time ()
#5  0x00000000004dfc64 in photo_create_pre_import ()
#6  0x000000000057466c in direct_photo_internal_import ()
#7  0x000000000057519d in direct_photo_source_collection_fetch ()
#8  0x00000000005752bc in _direct_photo_source_collection_on_file_discovered_directory_monitor_file_discovered ()
#9  0x00007ff22809164f in g_closure_invoke (closure=0x22a4690, return_value=return_value@entry=0x0, n_param_values=3, param_values=param_values@entry=0x7ffd392dd7e0, 
    invocation_hint=invocation_hint@entry=0x7ffd392dd760) at ../gobject/gclosure.c:830
#10 0x00007ff2280a337b in signal_emit_unlocked_R (node=node@entry=0x227d9c0, detail=detail@entry=0, instance=instance@entry=0x216ad70, emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0x7ffd392dd7e0) at ../gobject/gsignal.c:3742
#11 0x00007ff2280a9a5f in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffd392dd990) at ../gobject/gsignal.c:3497
#12 0x00007ff2280a9fbf in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3553
#13 0x00000000004acbc9 in directory_monitor_notify_directory_files_co ()
#14 0x00007ff22830b9af in g_main_dispatch (context=0x2097420) at ../glib/gmain.c:3381
#15 g_main_context_dispatch (context=0x2097420) at ../glib/gmain.c:4099
#16 0x00007ff22830bd58 in g_main_context_iterate (context=context@entry=0x2097420, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#17 0x00007ff22830be0f in g_main_context_iteration (context=context@entry=0x2097420, may_block=may_block@entry=1) at ../glib/gmain.c:4240
#18 0x00007ff2281b9485 in g_application_run (application=0x227a1d0, argc=959306628, argv=<optimized out>) at ../gio/gapplication.c:2569
#19 0x0000000000476d85 in photos_application_start ()
#20 0x00000000004c1178 in editing_exec ()
#21 0x0000000000474e54 in main ()

strace -ff io.elementary.photos '/home/davidak/code/webseite/files/images/theme_10_08.jpg'

...
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/20q.jpg", O_RDONLY) = 11
[pid 3730541] statx(11, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=48878, ...}) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\2\0\0d\0d\0\0\377\354\0\21Ducky\0\1\0"..., 8192) = 8192
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid 3730541] close(11)                 = 0
[pid 3730541] readlink("/etc/localtime", "/etc/zoneinfo/Europe/Berlin", 256) = 27
[pid 3730541] recvmsg(8, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 3730541] recvmsg(8, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 3730541] poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
[pid 3730541] readlink("/etc/localtime", "/etc/zoneinfo/Europe/Berlin", 256) = 27
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] statx(11, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=26189, ...}) = 0
[pid 3730541] read(11, "\377", 1)       = 1
[pid 3730541] read(11, "\330", 1)       = 1
[pid 3730541] close(11)                 = 0
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] newfstatat(11, "", {st_mode=S_IFREG|0644, st_size=26189, ...}, AT_EMPTY_PATH) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\1\1\0\267\0\267\0\0\377\355\0@Photosho"..., 4096) = 4096
[pid 3730541] lseek(11, -4094, SEEK_CUR) = 2
[pid 3730541] lseek(11, 0, SEEK_SET)    = 0
[pid 3730541] close(11)                 = 0
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] newfstatat(11, "", {st_mode=S_IFREG|0644, st_size=26189, ...}, AT_EMPTY_PATH) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\1\1\0\267\0\267\0\0\377\355\0@Photosho"..., 4096) = 4096
[pid 3730541] lseek(11, -4094, SEEK_CUR) = 2
[pid 3730541] lseek(11, 0, SEEK_SET)    = 0
[pid 3730541] close(11)                 = 0
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] newfstatat(11, "", {st_mode=S_IFREG|0644, st_size=26189, ...}, AT_EMPTY_PATH) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\1\1\0\267\0\267\0\0\377\355\0@Photosho"..., 4096) = 4096
[pid 3730541] lseek(11, -4094, SEEK_CUR) = 2
[pid 3730541] lseek(11, 0, SEEK_SET)    = 0
[pid 3730541] close(11)                 = 0
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] newfstatat(11, "", {st_mode=S_IFREG|0644, st_size=26189, ...}, AT_EMPTY_PATH) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\1\1\0\267\0\267\0\0\377\355\0@Photosho"..., 4096) = 4096
[pid 3730541] close(11)                 = 0
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] newfstatat(11, "", {st_mode=S_IFREG|0644, st_size=26189, ...}, AT_EMPTY_PATH) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\1\1\0\267\0\267\0\0\377\355\0@Photosho"..., 4096) = 4096
[pid 3730541] close(11)                 = 0
[pid 3730541] openat(AT_FDCWD, "/home/davidak/code/webseite/files/images/24c3_logo.jpg", O_RDONLY) = 11
[pid 3730541] statx(11, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=26189, ...}) = 0
[pid 3730541] read(11, "\377\330\377\340\0\20JFIF\0\1\1\1\0\267\0\267\0\0\377\355\0@Photosho"..., 8192) = 8192
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 3730541] close(11)                 = 0
[pid 3730541] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7d8} ---
[pid 3730545] <... futex resumed>)      = ?
[pid 3730544] <... poll resumed> <unfinished ...>) = ?
[pid 3730542] <... poll resumed> <unfinished ...>) = ?
[pid 3730543] <... poll resumed> <unfinished ...>) = ?
[pid 3730545] +++ killed by SIGSEGV (core dumped) +++
[pid 3730544] +++ killed by SIGSEGV (core dumped) +++
[pid 3730543] +++ killed by SIGSEGV (core dumped) +++
[pid 3730542] +++ killed by SIGSEGV (core dumped) +++
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

The Xmp.xmp.CreateDate warning is a red herring. It is not the cause of the crash.

This critical error might be a clue: Directory NikonPreview with 8224 entries considered invalid; not read.

There is no directory NikonPreview in my home directory.

[davidak@gaming:~]$ find . -type d -name NikonPreview

It seem also not in any file.

[nix-shell:~/code/webseite]$ grep NikonPreview . -R

nix run nixpkgs.imagemagic
for image in *; do echo $image && identify -verbose "$image" | grep NikonPreview; done
...

I think the issue is caused by some file in that directory, but i don't know how to find out which.

Anything else i can do to find the reason for the crash?

Hardware Info

pretty sure it's a software issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant