Note that there are some explanatory texts on larger screens.

plurals
  1. POboost::program_options hangs on the arm "sometimes"
    primarykey
    data
    text
    <p>Currently I am using <code>boost::program_options</code> to parse a configuration file on the BeagleBoard (ARM-based processor). My program is multi-threaded and linked against the <code>boost 1.45 multithreaded</code> libraries.</p> <p>My program just seems to hang when parsing the configuration file though</p> <pre><code>namespace po = boost::program_options; po::options_description desc("Options"); uint32_t option1=0; std::vector&lt;std::string&gt; optionsString; std::cout&lt;&lt;"Before adding options"&lt;&lt;std::endl; desc.add_options() ("option1", po::value&lt;uint32_t&gt;(&amp;option1), "...") ("finaloption", po::value&lt;std::vector&lt;std::string&gt; &gt;(&amp;optionsString)-&gt;multitoken(), "string of options"); //Never gets here std::cout&lt;&lt;"After adding options"&lt;&lt;std::endl; po::variables_map vm; std::cout&lt;&lt;"Starting program"&lt;&lt;std::endl; </code></pre> <p>The program hangs before printing out "After adding options". If I run the program through gdb stop it and do a back trace it just shows that it was on the line before the "Never gets here" comment. The top of the backtrace just has it at </p> <pre><code>#0 ?? #1 __lll_lock_wait lowlevellock.c:47 #2 __pthread_mutex_lock pthread_mutex_lock.c:61 #3 in boost::shared_ptr&lt;boost::program_options::option_description&gt;* std::__uninitialized_move_a&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt;*, boost::shared_ptr&lt;boost::program_options::option_description&gt;*, std::allocator&lt;boost::shared_ptr&lt;boost::program_option::option_description&gt; &gt; &gt;(boost::shared_ptr&lt;boost::program_optionns::option_description&gt;*, boost::shared_ptr&lt;boost::program_options::option_description&gt;*, std::allocator&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt; &gt;&amp;) () from /usr/local/lib/libboost_program_options-mt.so.1.45.0 #4 in std::vector&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt;, std::allocator&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt;, std::vector&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt;, std::allocator&lt;boost::shared_ptr&lt;boost::program_options::option_description&gt; const&amp;)() from /usr/local/lib/libboost_program_options-mt.so.1.45.0 #5 in boost::program_options::options_description::add(boost::shared_ptr&lt;boost::program_options::option_description&gt;) () from /usr/local/lib/libboost_program_options-mt.so.1.45.0 </code></pre> <p>...(let me know if you want more)</p> <p>Any thoughts? This program works fine on an x86 machine</p> <p>Edit: Further information, this does not seem to happen with optimizations off (compiled with -O2 this will fairly consistently occur).</p> <p>Edit2: Further analysis reveals that this still happens with optimizations off, -O0.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload