corrupted image when switch to Browser mode while saving

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

Moderators: XnTriq, helmut, xnview

bucky
Posts: 34
Joined: Thu Mar 19, 2009 6:22 am

corrupted image when switch to Browser mode while saving

Post by bucky »

I found a reproducible bug. It seems that if you switch to Browser mode while saving an image, it corrupts the image. I did not notice this issue before, but now that I am using an SLR camera with larger image size, maybe saving is taking longer, so this issue is more noticeable. I think XnView should not allow any actions while the image is saving.

Steps to reproduce:
1. view image in Viewer mode (I only tested for jpeg).
2. save image (ctrl+s, overwite existing)
3. press Enter to switch to Browser mode
4. image did not finish saving and is now corrupted

original image: http://imgur.com/rNzdC.jpg
corrupted image: http://i.imgur.com/Fi0a5.jpg

xnview 1.97.4 (also occurs in 1.96)
Windows XP SP3
User avatar
xnview
Author of XnView
Posts: 44470
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: corrupted image when switch to Browser mode while saving

Post by xnview »

You can press ENTER while saving the picture????
Pierre.
bucky
Posts: 34
Joined: Thu Mar 19, 2009 6:22 am

Re: corrupted image when switch to Browser mode while saving

Post by bucky »

Yes, I can press Enter while XnView is still saving the image. It does not allow me to press "Page Down" though, until the image is done saving.

I don't think this matters, but I did change my xnview.ini to ShowSaveDlg=130. The reason I don't think it matters is even if I change back to ShowSaveDlg=2, it will ask me additional dialog about saving the file, but then after that the image is still corrupted.
bucky
Posts: 34
Joined: Thu Mar 19, 2009 6:22 am

Re: corrupted image when switch to Browser mode while saving

Post by bucky »

Anyone able to reproduce? This is more evident if you are using a large image (10+ megapixel) because it takes longer to save. Basically, as soon as you click Yes to overwrite current image, press Enter to switch to Browser mode. Check the saved image, it will be corrupted.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: corrupted image when switch to Browser mode while saving

Post by marsh »

Yes, and it can produce error dialog by:
1. Save image with <ctrl s>
2. Answer "yes" to overwrite query.
3. Quickly press enter while save is in progress.
4. Dialog appears while browser is in view asking if 'you want to save image'.
5. Answer "no".
bucky
Posts: 34
Joined: Thu Mar 19, 2009 6:22 am

Re: corrupted image when switch to Browser mode while saving

Post by bucky »

I upgraded to 1.97.6, hoping this was fixed, but it's not. In fact, I lost an image due to this bug!

Can we please make this a high priority fix as it results in permanent data loss? XnView is by far my favorite image viewer/editor, but I don't think I can continue using it if I keep losing data.
User avatar
xnview
Author of XnView
Posts: 44470
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: corrupted image when switch to Browser mode while saving

Post by xnview »

Pierre.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: corrupted image when switch to Browser mode while saving

Post by marsh »

The fix in v.1.98b1 prevents switching to browser mode while save is in progress.