Boost logo

Boost Users :

From: Leon Mergen (leon_at_[hidden])
Date: 2005-08-20 12:02:43


Hello,

I'm trying to integrate the boost::program_options library into my
application, but am running into some strange problems.

 For some reason, when calling the boost::program_options::store()
function, the program enters an endless loop running processor usage too
100%.

I've created a test-case which generates this error for me (see
attachment). This is the output of the application:

=======================================================================
lmergen_at_solatis3:~/Projects/Tsukku Client/src2 $ ./TsukkuNode
1
2
3
4
5
6
=======================================================================

And here it enters the endless loop. When I lookup the process id and do
a kill -11 to easily generate a core dump, it looks like it's messing
around with mutexes:

=======================================================================
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d6325b in __lll_mutex_lock_wait ()
from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb7d60690 in _L_mutex_lock_26 ()
from /lib/tls/i686/cmov/libpthread.so.0
#3 0xbffff598 in ?? ()
#4 0xb7ff6730 in _dl_map_object_deps () from /lib/ld-linux.so.2
#5 0x080604dd in scoped_lock (this=0x80b4bc4, m=@0x1) at
lwm_pthreads.hpp:72
#6 0x080604dd in scoped_lock (this=0xbffff5c0, m=@0x80b4bc4) at
lwm_pthreads.hpp:72
#7 0x0805faed in boost::detail::sp_counted_base::release
(this=0x80b4bb8) at shared_count.hpp:140
#8 0x0805f0c7 in ~shared_count (this=0xbffff6a4) at
shared_count.hpp:378
#9 0xb7f0e700 in
boost::program_options::common_command_line_parser::run ()
from /usr/lib/libboost_program_options-gcc-1_32.so.1.32.0
#10 0x0805d969 in
boost::program_options::basic_command_line_parser<char>::run
(this=0xbffff7d0) at parsers.hpp:84
#11 0x0805d8b3 in boost::program_options::parse_command_line<char>
(argc=1, argv=0xbffffa94, desc=@0xbffff9c0, style=0, ext=Cannot access
memory at address 0xfffffff5
) at parsers.hpp:97
#12 0x0805d514 in main (argc=1, argv=0xbffffa94) at Main.cpp:28
=======================================================================

Line number 28 at Main.cpp is "boost::program_options::store
( boost::program_options::parse_command_line ( argc, argv, desc ),
vm );". I've tested this, and it does the same when parsing the config
file before the command line.

Anyone has any idea what's causing this problem ?

Thanks in advance!

Regards,

Leon Mergen




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net