0.85 Linux: crash after file(s) are deleted

*** Please report new bugs here! ***

Moderator: Dreamer

User avatar
pangwolin
Posts: 29
Joined: Sun Sep 25, 2016 7:53 pm

0.85 Linux: crash after file(s) are deleted

Postby pangwolin » Thu Apr 20, 2017 11:29 pm

XnView: MP 0.85 - 64 bit
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 one or more 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.
Last edited by pangwolin on Fri Apr 21, 2017 12:53 am, edited 3 times in total.

User avatar
pangwolin
Posts: 29
Joined: Sun Sep 25, 2016 7:53 pm

Re: 0.85 Linux: crash after file(s) are deleted

Postby pangwolin » Fri Apr 21, 2017 12:23 am

I just deleted 46 files that way, P115.jpg to P160.jpg from a directory called /diskB/2016-04/No.13/ and it crashed.

I used strace to inspect what happened, attached is the end of the log around the part where I was dealing with these files.
Also attached the corresponding syslog for that particular crash as well.
Better use an strace highlight syntax to inspect that (there is a decent one for Sublime Text 3 for example).

I hope it helps.
Attachments
xnviewmp_170421b_sylog.log.zip
(2.14 KiB) Not downloaded yet
xnviewmp_170421b_cut.strace.zip
(289.79 KiB) Not downloaded yet

User avatar
helmut
Posts: 8084
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.85 Linux: crash after file(s) are deleted

Postby helmut » Fri Apr 21, 2017 7:00 am

Thank you very much, pangwolin, for the detailed bug report and the log and trace files. This will help Pierre to track down and solve the problem.

Depending on frequency and probability of the problem (crash) this should handled as a must fix for the next release.
Are your PNG files normal or rather special? Does the problem occur on some or on most PNG files?

User avatar
pangwolin
Posts: 29
Joined: Sun Sep 25, 2016 7:53 pm

Re: 0.85 Linux: crash after file(s) are deleted

Postby pangwolin » Wed Apr 26, 2017 9:28 pm

The crash happens with any file really. Tested with PNG and JPG files, both colors, greyscale, various sizes.

Edit: I should also point out that if I wait a few seconds after deleting files in browser mode, and only THEN click on another file in the list, it doesn't crash.


Return to “New”

Who is online

Users browsing this forum: No registered users and 3 guests