|
Boost Users : |
From: Matt Schuckmann (matt_at_[hidden])
Date: 2006-09-14 13:43:09
Vladimir Prus wrote:
> Matt Schuckmann wrote:
>
>> At some point many of my applications that use the boost.program_options
>> libraries started crashing when they attempt to print the options
>> descriptions
>> i.e.
>> cout << opt_desc;
>>
>> I believe the problem started when we upgraded to boost 1.33.1 from
>> 1.32.0 and were using MSVC 7.1.
>> I'm not trying to figure out the problem using boost 1.33.1 using MSVC
>> 8.0.
>>
>> Here is the deal if I run the debug version of one of my apps with the
>> standard --help option it runs fine. If I run the release version part
>> of the help message is displayed but then the application crashes
>>
>> If I attempt to debug the problem by launching the debug version of
>> application from the MS debugger I get a debug assertion failed in
>> xstring in a _SCL_SECURE_VALIDATE_RANGE check on operator += (basically
>> the new secure checked iterators MS had introduced are complaining about
>> an out of range iterator). Looking at the call stack the problem
>> stemmed from line 361 of options_description.cpp (the format_paragraph
>> function).
>
> That specific issue is fixed in CVS HEAD (and RC_1_34_0) quite some time
> ago. Can you try that version and let me know if the problem is gone?
>
> - Volodya
I got boost rc 1.34 built it and tested and it does now work with the
code I provided above. I can't just upgrade to rc 1.34, I think I'd be
shot by my co workers and boss. Is there a patch or fix I can apply to
our 1.33.1 build?
Thanks
Matt S.
PS
I did run into another problem with an other command line program, the
description for one of the parameters has multiple lines and some of
those lines have 2 or more tabs to produce output like this
-C [--compress] arg Compress input file to output file.
Compression Types are
0 - No Compression
1 - little bit
2 - lots
The option description looks like this in my code
("compress,C", po::value< int >(), "Compress input file to output file.\n"
"\tCompression Types are\n."
"\t\t0 - No compression\n"
"\t\t1 - little bit\n"
"\t\t2 - lots\n" )
The multiple tabs on the argument types lines are producing an exception
with the description "Only one tab per paragraph is allowed"
What is the reason for not allowing multiple tabs, and if multiple tabs
truly can't be used how should one produce output with multiple levels
of indentation?
Thanks
Matt S.
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