OS: Linux 64bit
Description:
XnViewMP crashes when a file is deleted (via shortcut) in the browser mode. It crashes also while in viewer mode when immediately reading the other files in working directory very quickly after a file has been deleted (using mouse wheel helps reproduce the bug).
Effect: Program crashes and quits, core dumped. Files are properly deleted/moved to trash in gvfs (no problem there).
To reproduce:
1. [Optional?] Be in viewer mode, double click to switch to browser mode.
2. Select multiple files in browser mode.
3. Press the delete shortcut key.
4. [Optional?] Immediatly click on another file in the browser file listing.
5. Crash!
Actual behaviour (bug):
While in browser mode, immediately after deleting one or more files, click on another file in the file listing, it will most certainly crash.
It seems that XnViewMP keeps some locks on the files which are being deleted and crashes or something. Could be a race condition of sorts?
Probably related to how it's trying to read ahead the next file in directory and trying to generate the thumbnail? No idea.
In view mode, using the mouse wheel to very quickly jump to the next files help crashing. It doesn't crash all the time, could be depending on the file types?
Here's the core dump from the journalctl (system) logs:
Apr 21 01:11:35 clevo XnView[32559]: qt5ct: using qt5ct plugin
Apr 21 01:11:35 clevo XnView[32559]: qt5ct: palette support is disabled
Apr 21 01:11:35 clevo XnView[32559]: qt5ct: custom style sheet is disabled
Apr 21 01:11:35 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:11:35 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:11:35 clevo XnView[32559]: QObject::connect: No such slot AbstractViewWindow::onPagePrevious()
Apr 21 01:11:35 clevo XnView[32559]: QObject::connect: No such slot AbstractViewWindow::onPageNext()
Apr 21 01:11:35 clevo XnView[32559]: QObject::connect: No such slot AbstractViewWindow::onPageFirst()
Apr 21 01:11:35 clevo XnView[32559]: QObject::connect: No such slot AbstractViewWindow::onPageLast()
Apr 21 01:11:35 clevo XnView[32559]: QObject::connect: No such slot AbstractViewWindow::onNormalize2()
Apr 21 01:11:35 clevo XnView[32559]: QObject::connect: No such slot AbstractViewWindow::onAlign()
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:15:58 clevo XnView[32559]: libpng warning: iCCP: known incorrect sRGB profile
Apr 21 01:16:04 clevo kernel: traps: ThumbLoaderThre[32569] general protection ip:7f0b97f7d11b sp:7f0b824ed1f0 error:0
Apr 21 01:16:04 clevo kernel: in libQt5Core.so.5.8.0[7f0b97dce000+4cc000]
Apr 21 01:16:04 clevo systemd[1]: Started Process Core Dump (PID 2325/UID 0).
Apr 21 01:16:05 clevo systemd-coredump[2326]: Process 32559 (XnView) of user 1000 dumped core.
Stack trace of thread 32569:
#0 0x00007f0b97f7d11b _ZNK9QFileInfo4pathEv (libQt5Core.so.5)
#1 0x0000000000711106 n/a (XnView)
#2 0x000000000082ff5a n/a (XnView)
#3 0x000000000083100f n/a (XnView)
#4 0x00007f0b97e7b6d8 n/a (libQt5Core.so.5)
#5 0x00007f0b97bb72e7 start_thread (libpthread.so.0)
#6 0x00007f0b962f754f __clone (libc.so.6)
Stack trace of thread 32565:
#0 0x00007f0b962ed67d poll (libc.so.6)
#1 0x00007f0b90d9c8e0 n/a (libxcb.so.1)
#2 0x00007f0b90d9e679 xcb_wait_for_event (libxcb.so.1)
#3 0x00007f0b87833239 n/a (libQt5XcbQpa.so.5)
#4 0x00007f0b97e7b6d8 n/a (libQt5Core.so.5)
#5 0x00007f0b97bb72e7 start_thread (libpthread.so.0)
#6 0x00007f0b962f754f __clone (libc.so.6)
Stack trace of thread 32559:
#0 0x00007f0b96305d2b __fprintf_chk (libc.so.6)
#1 0x0000000000710eed n/a (XnView)
#2 0x0000000000828cd8 n/a (XnView)
#3 0x00007f0b98082ba9 _ZN7QObject5eventEP6QEvent (libQt5Core.so.5)
#4 0x00007f0b990c334c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5)
#5 0x00007f0b990cab61 _ZN12QApplication6notifyEP7QObjectP6QEvent (libQt5Widgets.so.5)
#6 0x00007f0b98056440 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5)
#7 0x00007f0b98058bcd _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData (libQt5Core.so.5)
#8 0x00007f0b980aac43 n/a (libQt5Core.so.5)
#9 0x00007f0b938685a7 g_main_context_dispatch (libglib-2.0.so.0)
#10 0x00007f0b93868810 n/a (libglib-2.0.so.0)
#11 0x00007f0b938688bc g_main_context_iteration (libglib-2.0.so.0)
#12 0x00007f0b980ab04f _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5)
Expected behaviour: files is deleted, next file is read but XnView doesn't crash.
Note: this has happened to me since 0.82, this bug has been around for a long time, but it's much more frequent and consistent since 0.85.