Xnview 1.82.4 crashes when opening an image with an UNC path

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, xnview

Micha

Xnview 1.82.4 crashes when opening an image with an UNC path

Post by Micha »

everytime on one computer with long path like
\\servername\path\path\path\image.jpg

and "only" sometimes on another computer
User avatar
xnview
Author of XnView
Posts: 37547
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Xnview 1.82.4 crashes when opening an image with an UNC

Post by xnview »

Micha wrote:everytime on one computer with long path like
\\servername\path\path\path\image.jpg

and "only" sometimes on another computer
How do you open it?
Pierre.
darkfader
Posts: 28
Joined: Tue Jul 25, 2006 4:38 pm
Location: Netherlands

Post by darkfader »

I think the limit for windows is around 2048 characters or so. Several times explorer.exe crashed because my Linux server had files with too long paths and Windows could not handle it.
Anyway, I tried it (starting from command-line otherwise explorer won't open anything) like this:
"c:\Program Files\XnView\xnview.exe" "z:\akusho\download\this is a very long pathname oaewjc5rlw4atliae tiuya wicty43lc5ryw wicty43lc5ryw4ac5yla7iwbt587bactw5ctbawl784kbt54ckw6bta54ckbawt457cbtw4aunakw4b5c4ac5yla7iwbt587bactw5ctbawl784kbt54ckw6bta54ckbawt457cbtw4aunakw4b5c\al
so a very long filename.jpg"
First it gives a warning dialog that it cannot open the file. It also shows a truncated filename with some garbage characters at the end because it's not null-terminated. When closing the dialog, it generates a unhandled access violation exception.
From the dr.watson logs, it seems like it corrupts the stack.