Page 1 of 2
XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Sat Aug 19, 2023 2:19 pm
by winnylinny
XnViewMP 1.5.x is crashing (segfault) when starting the program.
This happens
randomly.
This never happens if the application is opened from an image. (Only when launched directly from a menu, etc.)
This is happening on KDE Linux
and Windows 10. (Yes, even Windows exhibits this same bug.)
This never happened with 1.4.5.
I don't know where to begin to troubleshoot this bug, however, it's a continuation from a post in this thread:
viewtopic.php?p=190060#p190060
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Sat Aug 19, 2023 3:09 pm
by xnview
do you have sent crash log with crash dialog (on windows)?
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Sun Aug 20, 2023 2:43 pm
by winnylinny
Here is a dump when it crashes on Windows. (I attached the compressed .zip archive.)

The behavior is the same as with Linux.

It's random. It doesn't happen all the time.
I would estimate about 10%-20% of the time it crashes.

It only crashes like this when l
aunching the application directly. It never crashes
when opening a file.
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Mon Aug 21, 2023 9:15 am
by xnview
ok i see where, but don't understand why. Some users have this crash...
Always on jpeg file?
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Mon Aug 21, 2023 1:24 pm
by winnylinny
xnview wrote: Mon Aug 21, 2023 9:15 am
Always on jpeg file?
No. It's when launching the application directly.
If I open a file, it never crashes. The image will open in XnViewMP like normal.
If I launch XnViewMP from the menu directly (just the program, not a file), it will randomly crash like this.
Happens often. Both Linux and Windows.
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Mon Aug 21, 2023 3:10 pm
by xnview
winnylinny wrote: Mon Aug 21, 2023 1:24 pm
If I launch XnViewMP from the menu directly (just the program, not a file), it will randomly crash like this.
So launch in browser mode? no saved tabs?
The last file is selected and displayed in preview?
I send you a PM
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Mon Aug 21, 2023 7:35 pm
by winnylinny
*** UPDATE ***
This only happens if XnViewMP starts in "Viewer" mode. (No crashes occur if it starts in "Browser" mode.)
Pierre sent me a test .exe with a potential fix.
This test version appears to fix the bug of random crashes when the program starts in "Viewer" mode.

Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Mon Aug 21, 2023 7:49 pm
by xmozg
Well, before you could not say that for some reason your xnview is launched from icon in viewer mode

Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Tue Aug 22, 2023 5:28 am
by xnview
winnylinny wrote: Mon Aug 21, 2023 7:35 pm
*** UPDATE ***
This only happens if XnViewMP starts in "Viewer" mode. (No crashes occur if it starts in "Browser" mode.)
So you have saved tabs?
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Tue Aug 22, 2023 4:44 pm
by winnylinny
xnview wrote: Tue Aug 22, 2023 5:28 am
So you have saved tabs?
I don't use saved tabs. (I rarely use the Browser, only Viewer.)
I think this crash (when launching the Viewer, without opening up any files) is fixed, based on your test .exe)

Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Wed Aug 23, 2023 6:20 am
by xnview
winnylinny wrote: Tue Aug 22, 2023 4:44 pm
I think this crash (when launching the Viewer, without opening up any files) is fixed, based on your test .exe)
But how do you open the viewer without a file??
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Wed Aug 23, 2023 5:02 pm
by winnylinny
xnview wrote: Wed Aug 23, 2023 6:20 am
But how do you open the viewer without a file??
Launch it from a shortcut. From the start menu or desktop shortcut. Or even joust double-clicking the .exe.
Just like every application in existence...
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Thu Aug 24, 2023 6:29 am
by xnview
winnylinny wrote: Wed Aug 23, 2023 5:02 pm
xnview wrote: Wed Aug 23, 2023 6:20 am
But how do you open the viewer without a file??
Launch it from a shortcut. From the start menu or desktop shortcut. Or even joust double-clicking the .exe.
Just like every application in existence...
in this case XnView will start in browser not viewer. Could you send me your xnview.ini?
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Thu Aug 24, 2023 6:47 pm
by winnylinny
You have an option that let's you choose, Pierre.
Did you forget?
Re: XnViewMP 1.5.x crashes randomly on startup, Linux *and* Windows
Posted: Fri Aug 25, 2023 5:50 am
by xnview
oh right

Thanks to your detailed description I can reproduce
the problem.