Ask4 Posted November 18, 2019 Share Posted November 18, 2019 (edited) Hi, as I tried to open a .pdn File I worked on before, I run into this error: Application version: paint.net 4.1.6 System.Runtime.Serialization.SerializationException: Exception thrown by worker thread ---> System.AggregateException: One or more errors occurred. ---> System.IO.InvalidDataException: Block length does not match with its complement. at System.IO.Compression.Inflater.DecodeUncompressedBlock(Boolean& end_of_block) at System.IO.Compression.Inflater.Decode() at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length) at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count) at PaintDotNet.IO.StreamExtensionsCore.Read(Stream input, Byte* pbBuffer, Int32 length) in D:\src\pdn\src\Core\IO\StreamExtensionsCore.cs:line 70 at PaintDotNet.MemoryBlock.DecompressChunk(Byte[] compressedBytes, UInt32 chunkSize, Int64 chunkOffset, DeferredFormatter deferredFormatter) in D:\src\pdn\src\Core\MemoryBlock.cs:line 615 at PaintDotNet.MemoryBlock.<>c__DisplayClass46_1.<PaintDotNet.Serialization.IDeferredSerializable.FinishDeserialization>b__0() in D:\src\pdn\src\Core\MemoryBlock.cs:line 693 at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at PaintDotNet.MemoryBlock.PaintDotNet.Serialization.IDeferredSerializable.FinishDeserialization(Stream input, DeferredFormatter formatter) in D:\src\pdn\src\Core\MemoryBlock.cs:line 646 --- End of inner exception stack trace --- at PaintDotNet.MemoryBlock.PaintDotNet.Serialization.IDeferredSerializable.FinishDeserialization(Stream input, DeferredFormatter formatter) in D:\src\pdn\src\Core\MemoryBlock.cs:line 711 at PaintDotNet.Serialization.DeferredFormatter.FinishDeserialization(Stream input) in D:\src\pdn\src\Core\Serialization\DeferredFormatter.cs:line 139 at PaintDotNet.Document.FromStream(Stream stream) in D:\src\pdn\src\Data\Document.cs:line 1443 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 496 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158 Is there a way for me, to somehow repair this? It would be really sad if I lost many hours of work Edited November 18, 2019 by Ask4 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted November 18, 2019 Share Posted November 18, 2019 Hello @Ask4 Welcome to the forum You said it yourself in the title, the file is corrupt Unfortunately, there is very little that can be done. This is why you should always make backups. If you're really desperate, upload the file and let some of the tech-heads here see if anything can be recovered. You should update paint.net to the latest version, but I don't think that's going to change the problem. My only other thought: is there any chance you've misnamed the file as a PDN? Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 19, 2019 Share Posted November 19, 2019 1 hour ago, Ego Eram Reputo said: My only other thought: is there any chance you've misnamed the file as a PDN? Unlikely ... if the app got that far into decoding, then the file is tagged as PDN3 at the start and has a valid header and .NET serialization stream. Application version: paint.net 4.1.6 Also, make sure you install the latest version, which is 4.2.5. That's very important! Quote 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 More sharing options...
Ask4 Posted November 19, 2019 Author Share Posted November 19, 2019 (edited) 2 hours ago, Ego Eram Reputo said: Hello @Ask4 Welcome to the forum Thank you! It's nice to be here 😊 2 hours ago, Ego Eram Reputo said: Unfortunately, there is very little that can be done. This is why you should always make backups. If you're really desperate, upload the file and let some of the tech-heads here see if anything can be recovered. This is the File, I thought maybe there were only a few corrupted sections, because the most of the code is still there. It would be very nice if someone could look over it. I put it in my Cloud, because the file is to large for me to upload it here: https://mega.nz/#!mdQniYpa!Pb5loYYWHHFbQSHd9KmbgZyd3Tx7tTWCfr_Y3G_shYc 2 hours ago, Ego Eram Reputo said: You should update paint.net to the latest version, but I don't think that's going to change the problem. Strangely, the latest version was already installed, I don't know why it copied the old version I also noticed that the thumbnail in the windows explorer works fine, I don't know if this has anything to do with it Edited November 19, 2019 by Ask4 Quote Link to comment Share on other sites More sharing options...
null54 Posted November 19, 2019 Share Posted November 19, 2019 1 hour ago, Ask4 said: This is the File, I thought maybe there were only a few corrupted sections, because the most of the code is still there. It would be very nice if someone could look over it. I was able to read some of the layers using Irfanview with the ImPDN plugin. I uploaded a zip file with the extracted layers: https://www.dropbox.com/s/afgnmcjnl3plcoe/Extracted%20PDN%20layers.zip?dl=1 1 hour ago, Ask4 said: I also noticed that the thumbnail in the windows explorer works fine, I don't know if this has anything to do with it The thumbnail is a PNG image that is located in a different part of the file than the layer data. 2 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint 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 More sharing options...
Ask4 Posted November 20, 2019 Author Share Posted November 20, 2019 On 11/19/2019 at 4:54 AM, null54 said: I was able to read some of the layers using Irfanview with the ImPDN plugin. Thank you so much!!! Because of your tip with IrfanView and a little program I wrote myself, I was able to fully recreate my layers! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.