Boost C++ Libraries: Ticket #1587: [program_options] crashes if value part missing in external configuration file https://svn.boost.org/trac10/ticket/1587 <p> NOTE: boost::program_options has a serious bug, so it'll crash if the value part of a setting is missing. E.g. the below snippet at the end of my settings.ini file crashes if I uncomment the last line. </p> <hr /> <p> log_fname_info = info.log log_fname_problems = problems.log log_fname_status = status.log #log_fname_verbose = </p> <hr /> <p> I want to use a blank setting to mean "no verbose log file" in the above code. I've flagged it showstopper for this reason. </p> <p> It crashes on windows XP, in both debug and release versions, and normal and static link builds. Not tested on linux yet. </p> <p> Specifically, it seems to be happening in po.store(), and (on windows at least) it is caught as an 'other exception' in the below code. e.what() just outputs '!'. The exception is arising in kernel32.dll apparently. </p> <pre class="wiki">try{ po::store(po::parse_config_file(config_file,config_options), config_map); }catch(boost::program_options::invalid_option_value e){ std::cerr&lt;&lt;"invalid_option_value exception thrown parsing config file:"&lt;&lt;e.what()&lt;&lt;"\n"; return -2; }catch(std::exception e){ std::cerr&lt;&lt;"Other exception thrown parsing config file:"&lt;&lt;e.what()&lt;&lt;"\n!"; return -2; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1587 Trac 1.4.3 Douglas Gregor Fri, 16 May 2008 19:09:24 GMT description changed https://svn.boost.org/trac10/ticket/1587#comment:1 https://svn.boost.org/trac10/ticket/1587#comment:1 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/1587?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket Vladimir Prus Sat, 17 May 2008 05:36:00 GMT severity changed https://svn.boost.org/trac10/ticket/1587#comment:2 https://svn.boost.org/trac10/ticket/1587#comment:2 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> I cannot reproduce this crash on Linux. Please provide a complete testcase reproducing this behaviour, together with stacktrace at the point of crash. </p> Ticket Vladimir Prus Sat, 30 May 2009 10:19:33 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1587#comment:3 https://svn.boost.org/trac10/ticket/1587#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Based on failure to reproduce, and lack on further comments, I declare this fixed. </p> Ticket