Effect Corrupts Jpeg File

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

Moderators: XnTriq, helmut, xnview

User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

xnview wrote:are you able to reproduce?
I'm able to reproduce some of it some of the time, …
  • Mixed thumbnail sizes in browser
  • Hex in preview
  • Misc. weirdness (see attached screenshot)
p130215.png
… but none of the JPEGs were corrupted during my tests.
xnview wrote:could you send me the sample file?
Does Br. Gabriel-Marie have your e-mail address?
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Effect Corrupts Jpeg File

Post by Brother Gabriel-Marie »

Pierre, I don't know if I do. It's been a long time.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

xnview wrote:could you send me the sample file?
Alright, this seems to be the address in question:
I believe there's a faulty line in the [Text] section of the configuration you posted earlier, Br. Gabriel-Marie:

Code: Select all

CharSet=electedShowAgain=1
I don't know how XnView handles errors or if this causes any hiccups. Either way, you might want to delete the whole section (which holds the settings for Image » Add Text...). Please remember to quit XnView prior to editing the INI.
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Effect Corrupts Jpeg File

Post by Brother Gabriel-Marie »

Okay, I removed the entire section as you advised.

However, I am still able to corrupt those photos.

I went to the directory with the photos
made a copy of one in XnView's browser
then opened it XnView
set the saturation to 0
double-clicked to return to the browser (which would auto-save)
and voila! Corrupted image again.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

XnTriq wrote:With your configuration, the overlay icon isn't displayed although Use Embedded thumbnail is activated.
Tools » Options... » Thumbnails » Icon info » Embedded thumbnail was deactivated.
I'm about to run out of ideas here :-|
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Effect Corrupts Jpeg File

Post by Brother Gabriel-Marie »

No, I think we were onto something with the bits out of whack. That's not something that can be fixed with an ini setting - it's something in the way that XnView writes changes to jpeg files.
However, it seems like an obscure problem, but I think it *is* an issue with photos created by certain cameras, seeing how they can use different standards and seeing how XnView has to deal with the likelyhood of any/all of them simultaneously.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

Brother Gabriel-Marie wrote:No, I think we were onto something with the bits out of whack. That's not something that can be fixed with an ini setting […]
What I meant to say: My observation that “XnView has either trouble finding the embedded thumbnail or it can't decide which one (Composite:ThumbnailImage vs. Composite:PreviewImage) to use” won't “help Pierre find out what's going on” because it turned out to be a false lead.

Did Pierre get the samples? (I didn't want to forward them without having asked for your permission to do so.) Can he confirm that any of them are indeed corrupted?
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Effect Corrupts Jpeg File

Post by Brother Gabriel-Marie »

You may certainly forward the samples.

I have enabled the "Embedded Thumbnail" setting to no avail.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

Brother Gabriel-Marie wrote:You may certainly forward the samples.
Thanks. Sent.

Look-a-here what the cat dragged in:
bucky ([url=http://newsgroup.xnview.com/viewtopic.php?p=84314#p84314]corrupted image when switch to Browser mode while saving[/url]) wrote: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
It's an undead (?) bug from 2010 that's supposed to be gone since v1.98 (WhatsNew.txt: “ENTER & saving”).
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

@Pierre: Did you get the samples?
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Effect Corrupts Jpeg File

Post by xnview »

XnTriq wrote:@Pierre: Did you get the samples?
yes but now i need to be able to reproduce...
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

I analyzed the sample which is supposed to be damaged (DSCN1971 Copy Copy.JPG) with a whole slew of other specialized tools, …
… but all of these utilities confirmed JPEGsnoop's diagnosis: Everything seems to be in perfect order.

As mentioned earlier, I've been “able to reproduce some of it some of the time”, but I never ended up with a corrupted JPEG, even though I've tried to reproduce the problem on several different computers over & over again, which makes me wonder if this phenomenon only occurs on machines with the horsepower of Br. Gabriel-Marie's PC (“30GB RAM and an Intel Core i7-2600”).

@ Br. Gabriel Marie: If I understood correctly, …
Brother Gabriel-Marie wrote:I went to the directory with the photos
made a copy of one in XnView's browser
then opened it XnView
set the saturation to 0
double-clicked to return to the browser (which would auto-save)
and voila! Corrupted image again.
the edited JPEG is displayed as hex in the preview pane, and the thumbnail in the browser is distorted. What happens if you then…
  1. Point the browser to a different folder
  2. Deactivate Keep current image in cache in Tools » Options... » View » Misc. » Cache
  3. Remove the directory with the corrupted file from the list in Tools » Options... » Thumbnails » Cache » Cache maintenace
  4. Return to the original folder
  5. Try to open the corrupted photo
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Effect Corrupts Jpeg File

Post by Brother Gabriel-Marie »

Well, as I've said, it doesn't happen with every jpeg file. Just certain ones (but consistently for those files).

The only other thing I can think of is that I am running Intel Smart Response Technology (ISRT) and have used an SSD to accelerate my C drive HDD. I've also put my pagefile onto that SSD. Those two things provide my system with 15-20 more responsiveness.

So I applied the settings you indicate and I am still able to corrupt the jpeg.
And I can still corrupt the jpeg even if I move the file to another folder on another partition.
If I try to open the corrupted jpeg, I get a popup from XnView saying, "Error opening the file <myfile.jpg>"
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Effect Corrupts Jpeg File

Post by xnview »

XnTriq wrote:@ Pierre: Do you think it makes sense to install any of the following hotfixes for Windowscodecs.dll and/or Gdiplus.dll?
i don't know, but i don't think that it's the problem...
Pierre.
Post Reply