Jump to content

File Corrupted after saving with latest Version 4.1


Haerion

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
Link to comment
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.

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

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

forumSig_bmwE60.jpg

Link to comment
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
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.

Guest
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...