0.96.4: crash when invoked from file manager (Thunar)

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

Moderator: Dreamer

Post Reply
xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Fri Jul 31, 2020 10:26 am

XnView: MP 0.96.4 - 64 bit
OS: Arch Linux 64bit
Thunar: 1.8.15

XnviewMP crashes after 2-5 seconds after you open a file from the file manager "thunar". It happens regardless of file system, number/type of files, directory, etc. Other programs work as expected from thunar. And XnviewMP works as expected when started directly and navigating into the same directory with the built-in file browser and opening files.
It only happens when you open a file with xnview from thunar.
EDIT: the same happens with other file managers: konqueror, dolphin, PCmanFM

Effect: the program crashes

To reproduce:
1. install thunar, xnviewmp (https://aur.archlinux.org/packages/xnviewmp/)
2. open thunar, navigate to directory with images
3. right click open with xnview
4. wait a few seconds
Actual behaviour (bug): XnviewMP opens and displays the file properly and works normally otherwise (scroll to next file, open browser, zoom) but crashes after 2-5 seconds. EDIT: it seems going to the next image in the directory (i.e. pgdown or scrolling) makes it crash earlier.

Expected behaviour: XnviewMP does not crash

User avatar
winnylinny
Posts: 10
Joined: Fri Apr 17, 2020 5:35 pm

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by winnylinny » Sat Aug 01, 2020 2:29 am

Did this recently start happening? I'm on Thunar 1.8.9 (Linux Mint 19.3). It never crashes for me. What if you make XnViewMP the default application for images, and then inside directory run xdg-open file.jpg from the terminal?

xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Sat Aug 01, 2020 12:03 pm

It's a fresh install so I never used an older version of Thunar. As it's the same with other file managers, even with different toolkits, I can't imagine that it'd be different for me with 1.8.9. running xdg-open from terminal works perfectly fine. no crashes.

User avatar
winnylinny
Posts: 10
Joined: Fri Apr 17, 2020 5:35 pm

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by winnylinny » Sat Aug 01, 2020 2:55 pm

With an up-to-date Manjaro (based on Arch), I can open images from Dolphin browser, as I've always been able to. I wonder if it has something to do with the theme being used by XnViewMP?

Can you try this quick test:

From a GTK-based desktop (e.g., Xfce): qt5ct > Style > Fusion (or Windows), then logoff and logon to your session again. Now try it. Try navigating through images as well.

Ignore the fact that the colors / appearance might seem off. It's just to rule a possible culprit.

From a Plasma desktop: Try one of the other themes, changing the window decoration theme and application theme.
Last edited by winnylinny on Sat Aug 01, 2020 5:09 pm, edited 1 time in total.

xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Sat Aug 01, 2020 3:14 pm

I don't have any DE installed. Just wayland and sway/wlroots. Is there another way to test this? The settings>Integration panel is empty in xnview.

EDIT: I tried uninstalling (incl. deleting config files) and using the system lib package instead (https://aur.archlinux.org/packages/xnvi ... stem-libs/). Same problem.

qt5-webkit version is 5.212.0alpha4-6.

User avatar
winnylinny
Posts: 10
Joined: Fri Apr 17, 2020 5:35 pm

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by winnylinny » Sat Aug 01, 2020 5:07 pm

Try this since you're not running a DE.

Code: Select all

cp -v /usr/share/applications/xnviewmp.desktop $HOME/.local/share/applications/

nano $HOME/.local/share/applications/xnviewmp.desktop
Change the Exec line to:

Code: Select all

Exec=/usr/bin/xnviewmp -style Windows %F
Save it, and finally refresh with root privileges.

Code: Select all

sudo update-desktop-database
I'm going from memory, as the paths and names are different between distros.

You likely won't need to logout for the changes to take effect. Open an image from within a file browser, and see if the style of the tabs and buttons looks different (classic Windows style). If so, use the viewer as you normally would and see if it crashes the same way.

xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Sun Aug 02, 2020 6:48 am

They do look different. Still crashes after a few seconds as before. Is there a way I can generate a crash log? like change the exec line to output to a file?

Some additional observation: It does work when invoked from the TUI file browser 'nnn'.

User avatar
winnylinny
Posts: 10
Joined: Fri Apr 17, 2020 5:35 pm

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by winnylinny » Mon Aug 03, 2020 12:48 am

xcl wrote:
Sun Aug 02, 2020 6:48 am
Is there a way I can generate a crash log? like change the exec line to output to a file?
Should be able to like this. No need to change the style, since it's already been rule out.

Code: Select all

Exec=/usr/bin/xnviewmp %F >> $HOME/xnviewmp-dump.log
Don't forget to refresh with this before continuing:

Code: Select all

sudo update-desktop-database
Keep in mind this logfile will likely contain file names and directory names.

xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Mon Aug 03, 2020 8:34 am

log stayed empty. However I tried starting thunar from command line and check its output when I open an image with xnview. As it turns out, there is no crash then. So it might be unrelated to Xnview and thunar after all. Currently I suspect an issue with the application launcher having trouble with spawning child processes or something to that effect. I will investigate further.

xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Mon Aug 03, 2020 9:51 am

So normally, I would run a program with a launcher like dmenu/wofi/rofi:

Code: Select all

wofi --show=run | xargs swaymsg exec --
or

Code: Select all

dmenu_path | dmenu | xargs swaymsg exec --
via a keyboard shortcut.

doing that (and open thunar, etc...), xnviewmp crashes reliably.
when I run it without the pipe to xargs swaymsg, it doesn't crash.

running it from command line with xargs as written above, it crashes a lot less reliably. However I get the following error:

Code: Select all

xargs: unmatched double quote; by default quotes are special to xargs unless you use the -0 option
Error: Unknown/invalid command '03:26:54)'
and

Code: Select all

QObject::connect: No such slot AbstractViewWindow::onPagePrevious()
QObject::connect: No such slot AbstractViewWindow::onPageNext()
QObject::connect: No such slot AbstractViewWindow::onPageFirst()
QObject::connect: No such slot AbstractViewWindow::onPageLast()
QObject::connect: No such slot AbstractViewWindow::onNormalize2()
QObject::connect: No such slot AbstractViewWindow::onAlign()
For completeness sake: with xargs -0 I get

Code: Select all

xargs: argument line too long

xcl
Posts: 7
Joined: Fri Jul 31, 2020 10:10 am

Re: 0.96.4: crash when invoked from file manager (Thunar)

Post by xcl » Tue Aug 04, 2020 4:07 pm

I found another program that crashes and produces the same error code as well: avidemux. Both avidemux and xnview use qt (right?) so I think this is probably an issue with qt or xargs or thunar, but likely not with xnview.

I suggest to close this issue unless I find some more info in the future.

Post Reply