{"id":2677,"date":"2016-03-18T11:38:50","date_gmt":"2016-03-18T11:38:50","guid":{"rendered":"http:\/\/www.ericwhite.com\/home2\/bm8qcmjy\/public_html\/blog\/?page_id=2677"},"modified":"2016-03-18T11:40:45","modified_gmt":"2016-03-18T11:40:45","slug":"announcing-the-release-of-a-new-system-io-packaging-implementation","status":"publish","type":"page","link":"https:\/\/www.ericwhite.com\/blog\/announcing-the-release-of-a-new-system-io-packaging-implementation\/","title":{"rendered":"Announcing the Release of a New System.IO.Packaging Implementation"},"content":{"rendered":"<p>The Open XML SDK is based on the classes in the System.IO.Packaging namespace, so if there is a bug in System.IO.Packaging, then that bug is also in the Open XML SDK.<\/p>\n<p>Well, there is a bad bug in System.IO.Packaging, which causes it in some cases to throw spurious ObjectDisposedException and NullReferenceException when used in a Web front end with Open XML functionality implemented using the Open XML SDK. &nbsp;The gist of this bug is that if internal memory usage of System.IO.Packaging goes above a threshold of 10MB, then System.IO.Packaging uses System.IO.IsolatedStorage, which malfunctions if two executables or threads simultaneously attempt to access it. &nbsp;This occurs when IsolatedStorage is used from multiple exes with the same strong name (as we will have with multiple web front end applications) or from a high-performance multi-threaded Open XML applications.<\/p>\n<p>To solve this issue, I have developed a new implementation of System.IO.Packaging, which is based on System.IO.Compression, and which does not use System.IO.IsolatedStorage. &nbsp;This new module, open sourced under the MIT license, is becoming part of COREFX, the awesome, new open source implementation of the .NET framework. &nbsp;I have included it in the Open XML SDK, and provided a Visual Studio solution that enables you to build the Open XML SDK along with this new module.<\/p>\n<p>The following screen-cast explains the bug and the fix, shows how to git and use the Open XML SDK that includes the new System.IO.Packaging, and discusses how I developed it.<\/p>\n<p><iframe loading=\"lazy\" title=\"New SystemIOPackaging\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/ic7eP4qq1NM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Open XML SDK is based on the classes in the System.IO.Packaging namespace, so if there is a bug in System.IO.Packaging, then that bug is also in the Open XML SDK. Well, there is a bad bug in System.IO.Packaging, which causes it in some cases to throw spurious ObjectDisposedException and NullReferenceException when used in a [&hellip;]<\/p>\n","protected":false},"author":10567,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_s2mail":"","footnotes":""},"class_list":["post-2677","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/users\/10567"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/comments?post=2677"}],"version-history":[{"count":2,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2677\/revisions"}],"predecessor-version":[{"id":2681,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2677\/revisions\/2681"}],"wp:attachment":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/media?parent=2677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}