Home : Exceptions/Errors : Ionic.ZlibException Encountered When Using DotImage
Q10410 - ERRMSG: Ionic.ZlibException Encountered When Using DotImage

Deprecation NOTICE

Atalasoft shipped AnyCPU libs with older versions (pre 10.7) that were part of certain SharePoint related web components. These limited DLLs were NOT an indication of an intent to move to full AnyCPU support, as our main SDK has huge amounts of unmanaged code which can not easily convert. This article is provided only as an archival reference to help solve this specific issue for customers who might have been using these DLLs in a very special case deployment.

Main Article Content

Customers using our AnyCPU dlls have reported an Ionic.ZlibException when attempting to open Png files using our AnyCPU assemblies ***.

{Ionic.Zlib.ZlibException: Bad state (incorrect data check)
   at Ionic.Zlib.InflateManager.Inflate(FlushType flush)
   at Ionic.Zlib.ZlibCodec.Inflate(FlushType flush)
   at Ionic.Zlib.ZlibBaseStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Ionic.Zlib.ZlibStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Atalasoft.Imaging.Codec.Png.PngReader.g()
   at Atalasoft.Imaging.Codec.Png.PngReader.DecodeImage()
...

The issue is caused because the AnyCPU dlls shipped with DotImage are only meant for a very limited subset of use cases, involving ShrePoint web parts.

With those exceptions, you must either target "x86" or "x64" as Atalasoft components rely upon "unmanaged code" which can not be run in an "AnyCPU" context.

The fix is to target either x86 (most common as x86 apps run on both x86 and x64 systems) or x64 and use the correct Atalasoft DLLs for your "bitness" and framework (use our 2.0 dlls for .NET framework 2.0, 3.0, and 3.5, and use our 4.0 DLLs for framework 4.0, and 4.5)

 

*** NOTE:
Atalasoft stopped shipping the AnyCPU libraries in 10.7 due to these assemblies only being usable in a tiny fraction of use cases and having caused a great deal of confusion for customers.  If you'd like an option for AnyCPU support, please see our GitHub article on the subject.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2019. InstantASP Ltd. All Rights Reserved