Boost C++ Libraries: Ticket #13400: boost::archive::xml_iarchive Exception in destructor: "input stream error-No error" https://svn.boost.org/trac10/ticket/13400 <p> The sample code: </p> <p> #include &lt;unordered_map&gt; #include &lt;boost/serialization/unordered_map.hpp&gt; #include &lt;boost/serialization/vector.hpp&gt; #include &lt;boost/serialization/nvp.hpp&gt; #include &lt;boost/archive/xml_oarchive.hpp&gt; #include &lt;boost/archive/xml_iarchive.hpp&gt; #include &lt;fstream&gt; #include &lt;iostream&gt; </p> <blockquote> <p> std::ifstream ifs("commandKeyToAction.xml"); auto newCommandKeyToAction = std::unordered_map&lt;std::string, std::unordered_map&lt;std::string, std::vector&lt;std::string&gt;&gt;&gt;(); </p> </blockquote> <p> </p> <blockquote> <p> boost::archive::xml_iarchive xmlIn(ifs); xmlIn &gt;&gt; boost::serialization::make_nvp("options", newCommandKeyToAction); </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13400 Trac 1.4.3 Andrei Bryleuski <andrey-brilevskiy@…> Tue, 16 Jan 2018 14:09:45 GMT attachment set https://svn.boost.org/trac10/ticket/13400 https://svn.boost.org/trac10/ticket/13400 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">commandKeyToAction.xml</span> </li> </ul> <p> File to deserialize </p> Ticket Andrei Bryleuski <andrey-brilevskiy@…> Tue, 16 Jan 2018 14:11:22 GMT <link>https://svn.boost.org/trac10/ticket/13400#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13400#comment:1</guid> <description> <p> The exception occurs in: boost_1_66_0\boost\serialization\throw_exception.hpp </p> <p> template&lt;class E&gt; inline void throw_exception(E const &amp; e){ </p> <blockquote> <p> throw e; </p> </blockquote> <p> } </p> </description> <category>Ticket</category> </item> <item> <author>Andrei Bryleuski <andrey-brilevskiy@…></author> <pubDate>Tue, 16 Jan 2018 14:12:17 GMT</pubDate> <title>version, component changed; owner set https://svn.boost.org/trac10/ticket/13400#comment:2 https://svn.boost.org/trac10/ticket/13400#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.63.0</span> → <span class="trac-field-new">Boost 1.66.0</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket frederic.devernay@… Sat, 17 Feb 2018 14:54:56 GMT <link>https://svn.boost.org/trac10/ticket/13400#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13400#comment:3</guid> <description> <p> probably a duplicate of <a class="new ticket" href="https://svn.boost.org/trac10/ticket/13354" title="#13354: Bugs: xml_iarchive destructor calls abort() (new)">#13354</a> </p> </description> <category>Ticket</category> </item> <item> <author>Frédéric Devernay <frederic.devernay@…></author> <pubDate>Sat, 17 Feb 2018 15:34:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13400#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13400#comment:4</guid> <description> <p> found the problem. This is actually not a bug in boost but a bug in the code that produced the xml: the &lt;/boost_serialization&gt; tag is missing. </p> <p> maybe you used a stringstream as in <a class="new ticket" href="https://svn.boost.org/trac10/ticket/13354" title="#13354: Bugs: xml_iarchive destructor calls abort() (new)">#13354</a>, and forgot to destroy the xml_oarchive before getting the string? see comment 4 in issue <a class="new ticket" href="https://svn.boost.org/trac10/ticket/13354" title="#13354: Bugs: xml_iarchive destructor calls abort() (new)">#13354</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>