Page 1 of 1

GPF or unstable when opening files with long name

Posted: Fri Aug 13, 2004 1:34 pm
by LKraven
I came across this bizarre behaviour:

When XnView is given a file to open from the command line that is missing an extension, XnView can become unstable or crash.

The problem seems to be worse as the path/filename given to XnView is longer.

For example:

c:\> ren c:\longpath\longpath\longpath\test.jpg c:\longpath\longpath\longpath\test.

c:\> xnview c:\longpath\longpath\longpath\test

This wil either crash xnview immediately after it renders the image, or will freeze it once you close the active window.

Strangely, it seems not to crash if the path is short.

c:\> xnview test.

Doesn't crash.

Normally, this shouldn't be a problem for anybody but I am attempting to write a Firefox extension which will call XnView to read exif information quickly.

I'm giving XnView the filename of the cached image, in my case:

C:\Documents and Settings\L. Kraven\Application Data\Mozilla\Firefox\Profiles\default.76x\Cache>

The cache files do not have proper extensions and are named things like: AC1A40B4d01

In my example, the full commandline would be:

c:\program files\xnview\xnview.exe C:\Documents and Settings\L. Kraven\Application Data\Mozilla\Firefox\Profiles\default.76x\Cache\AC1A40B4d01

This crashes immediately after the image is rendered.

I am running xnView 1.70.4 under Windows XP.

Posted: Sat Aug 14, 2004 9:05 am
by helmut
Neil, I could not reproduce your problem. Opening an image with the command line

Code: Select all

c:\programme\xnview1.70.4\xnview.exe "C:\Temp\XnView\deep path\deep1\deep2\deep3\deep4\deep5\IMG_0068"
worked fine for me - the image is a JPG file.

Please note that in the above command line the file name is quoted, otherwise XnView will consider the space in "deep path" as delimiter for the arguments and try to open two images ("C:\Temp\XnView\deep" and "path\deep1\deep2\deep3\deep4\deep5\IMG_0068") and display an error message "Error opening the file <C:\Temp\XnView\deep>".