0.96.4: crash when invoked from file manager (Thunar)
Moderators: helmut, XnTriq, xnview, Dreamer
0.96.4: crash when invoked from file manager (Thunar)
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
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
- winnylinny
- Posts: 167
- Joined: Fri Apr 17, 2020 5:35 pm
Re: 0.96.4: crash when invoked from file manager (Thunar)
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?
Re: 0.96.4: crash when invoked from file manager (Thunar)
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.
- winnylinny
- Posts: 167
- Joined: Fri Apr 17, 2020 5:35 pm
Re: 0.96.4: crash when invoked from file manager (Thunar)
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.
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.
Re: 0.96.4: crash when invoked from file manager (Thunar)
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.
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.
- winnylinny
- Posts: 167
- Joined: Fri Apr 17, 2020 5:35 pm
Re: 0.96.4: crash when invoked from file manager (Thunar)
Try this since you're not running a DE.
Change the Exec line to:
Save it, and finally refresh with root privileges.
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.
Code: Select all
cp -v /usr/share/applications/xnviewmp.desktop $HOME/.local/share/applications/
nano $HOME/.local/share/applications/xnviewmp.desktop
Code: Select all
Exec=/usr/bin/xnviewmp -style Windows %F
Code: Select all
sudo update-desktop-database
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.
Re: 0.96.4: crash when invoked from file manager (Thunar)
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'.
Some additional observation: It does work when invoked from the TUI file browser 'nnn'.
- winnylinny
- Posts: 167
- Joined: Fri Apr 17, 2020 5:35 pm
Re: 0.96.4: crash when invoked from file manager (Thunar)
Should be able to like this. No need to change the style, since it's already been rule out.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?
Code: Select all
Exec=/usr/bin/xnviewmp %F >> $HOME/xnviewmp-dump.log
Code: Select all
sudo update-desktop-database
Re: 0.96.4: crash when invoked from file manager (Thunar)
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.
Re: 0.96.4: crash when invoked from file manager (Thunar)
So normally, I would run a program with a launcher like dmenu/wofi/rofi:
or
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:
and
For completeness sake: with xargs -0 I get
Code: Select all
wofi --show=run | xargs swaymsg exec --
Code: Select all
dmenu_path | dmenu | xargs swaymsg exec --
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)'
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()
Code: Select all
xargs: argument line too long
Re: 0.96.4: crash when invoked from file manager (Thunar)
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.
I suggest to close this issue unless I find some more info in the future.
Re: 0.96.4: crash when invoked from file manager (Thunar)
I cannot reproduce this anymore with 0.98 and thunar 1.8.16. This can be closed.