Jump to content

4.2.11 error reading some JPG files

Recommended Posts

Hi. Paint.Net just updated for me to 4.2.11. The first bunch of JPG files I tried to open (using any method) all failed with the below error. It even gave an error if I pasted the image into a new Paint.Net image and saved that; that image wouldn't open either curiously. I did find later some JPG images that did open fine.


Here's the error, and I've attached one of the images that gives an error. I've rebooted my computer and such. Uninstalled and reinstalled Paint.NET. No difference.

Is there a way to back out the upgrade? I couldn't find a list of older builds.


Application version: paint.net 4.2.11

System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at PaintDotNet.IO.StreamExtensions.ProperRead(Stream input, Byte[] buffer, Int32 offset, Int32 count) in D:\src\pdn\src\Base\IO\StreamExtensions.cs:line 42
   at PaintDotNet.IO.StreamExtensions.AreNextBytesEqualTo(Stream stream, Byte[] nextBytes, Func`3 comparer) in D:\src\pdn\src\Base\IO\StreamExtensions.cs:line 346
   at PaintDotNet.Imaging.XmpPacket.TryMovePastXmpApp1Header(Stream stream) in D:\src\pdn\src\Core\Imaging\XmpPacket.cs:line 477
   at PaintDotNet.Imaging.XmpPacket.TryLoadFromApp1Block(Stream stream, LoadOptions xmlLoadOptions) in D:\src\pdn\src\Core\Imaging\XmpPacket.cs:line 427
   at PaintDotNet.Imaging.XmpPacket.TryLoadFromApp1Block(Byte[] app1Block, Int32 startIndex, Int32 length, LoadOptions xmlLoadOptions) in D:\src\pdn\src\Core\Imaging\XmpPacket.cs:line 418
   at PaintDotNet.Imaging.XmpPacket.TryLoad(IMetadataWriter writer, LoadOptions xmlLoadOptions) in D:\src\pdn\src\Core\Imaging\XmpPacket.cs:line 346
   at PaintDotNet.Imaging.XmpPacket.TryLoad(IMetadataReader reader, LoadOptions xmlLoadOptions) in D:\src\pdn\src\Core\Imaging\XmpPacket.cs:line 306
   at PaintDotNet.Data.JpegXmpDecoder.TryGetXmpPacket() in D:\src\pdn\src\PaintDotNet\Data\JpegXmpDecoder.cs:line 58
   at PaintDotNet.Data.WicFileTypeHelpers.Load(Stream input, Nullable`1 forcedContainerFormat, Nullable`1 preferredVendor, IMetadataTranscoder metadataTranscoder) in D:\src\pdn\src\PaintDotNet\Data\WicFileTypeHelpers.cs:line 84
   at PaintDotNet.Data.JpegFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\JpegFileType.cs:line 102
   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 527
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

Reading error - Copy.jpg

Link to comment
Share on other sites

This appears to be an issue with the XMP support that was added in Paint.NET 4.2.11.


Can you attach (or upload and post a link to) one of the JPEG files that causes this issue?


Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait


Link to comment
Share on other sites

You can install this build which has @null54's fix for this: https://www.getpaint.net/files/zip/test/paint.net.4.212.7448.30753.install.zip 


(The only difference between 4.2.11 and this 4.2.12 build is the fix for this issue.)

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...