Haerion

File Corrupted after saving with latest Version 4.1

Recommended Posts

I have a multilayer-file (25+ Layers) where I added some more and hit Ctrl-S

 

Some time later I tried to re-open it and paint.net gives me this DivisionByZero-Exception:

System.DivideByZeroException: Es wurde versucht, durch 0 (null) zu teilen.
   bei PaintDotNet.MemoryBlock.PaintDotNet.Serialization.IDeferredSerializable.FinishDeserialization(Stream input, DeferredFormatter formatter) in D:\src\pdn\src\Core\MemoryBlock.cs:Zeile 643.
   bei PaintDotNet.Serialization.DeferredFormatter.FinishDeserialization(Stream input) in D:\src\pdn\src\Core\Serialization\DeferredFormatter.cs:Zeile 141.
   bei PaintDotNet.Document.FromStream(Stream stream) in D:\src\pdn\src\Data\Document.cs:Zeile 1443.
   bei PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:Zeile 495.
   bei PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:Zeile 158.

 

 

The file is no secret, it just contains android and apple logos - we compose avatars for our testing system out of them, so I attached it here to make it easier for you to reproduce.

Unfortunately this forum does not allow to attach .pdn files... wtf? 🙂

I renamed it to .pdn.txt and I hope you can get it binary correctly. You have to change the extension back to .pdn

 

 

device-avatars.pdn.txt

Edited by Haerion

Share this post


Link to post
Share on other sites

When viewing this file in a hex editor, everything looks pretty normal ... except there's a bit block of zero's in the middle of it. I can't get it to load in any version of Paint.NET, even 3.5.

 

Do you have the previous version of this file? One that worked? If so, does opening that and resaving it also cause it to break? (make sure to do that with a copy, of course)

 

Where did you save the file? Was it on a local hard drive, a network share, or maybe a USB flash drive? The image data is clearly invalid/corrupt, maybe the device itself bungled the data transfer.

Share this post


Link to post
Share on other sites

Fortunately our admin had a backup of the file, so yes, I have the previous version.

It was saved on my personal user-share (domain folder), so behind the scenes a NFS synced drive. Saved locally in first place but synced to the domain.

 

I just did some of yesterday's changes again, saved it, and now I can open it again...

Seems it was a one-time effect but nonetheless scary that this can happen...

Never had this before and I use paint.net for many many MANY years now.

 

I attached the original file and the modified (correct) file here again for now, maybe you can find in a diff what happened.

Are there any log files I could send you? somewhere in the appdata folder or so?

original.pdn.txt

modified-working.pdn.txt

Edited by Haerion

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now