From: Michael Burbidge (mburbidg_at_[hidden])
Date: 2003-03-10 23:17:14
I've been trying to get the xml samples to work on Mac OS X, CW 8.3
today with no success. I get the following assertion in range_run.ipp:
Assertion (r.is_valid()) failed in "range_run.ipp", function "set",
This assertion is the result of the following call in the
The problem seems to be some sort of sign extension problem, or two
byte versus four byte characters. If I do a memory dump on the constant
wide character string in the above line of code I get the following:
00000009 0000000A 0000000D 00000020
0000002D FFFFD7FF FFFFE000 0000002D
The assertion happens because of the sign extension, causing the end of
the range to be less than the beginning of the range.
First off, I don't understand why these characters are four bytes? I
thought the L"" made them two byte characters. Second, they appear to
be being treated as signed characters as you can see from the sign
extension. I've looked for options to control the code generation
aspects of characters. In the C++ language options panel I have enabled
"Use Unsigned Chars", "Multi-Byte Aware", and "Enable wchar_t Support".
I've actually tried different combinations of these but nothing seems
to change the way the code is generated for these constant wide
I know that some of you are able to build and run the XML samples
successfully on Mac OS X.
One more note. I'm building a Mach-o binary, console application using
the MSL Mach-o libraries.
On Saturday, March 8, 2003, at 05:27 PM, Joel de Guzman wrote:
> Michael Burbidge wrote:
>> I've been trying to use the XML samples in
>> libs/example/application/xml. They build fine, but get a runtime
>> when given even the simplest xml file. Are these samples kept up to
>> date? Here's the assert that I get:
>> Assertion (r.is_valid()) failed in "range_run.ipp", function "set",
>> line 132
>> This is on Mac OS X using CodeWarrior 8.
> I assume this is a Spirit related question.
> Before anything else, please post Spirit support related questions to:
> Also, it would be best to write a more descriptive title. Otherwise,
> your post might probably be easy to miss.
> Ok, nuff said...
> The XML stuff has been tested and works with no problems on Windows
> and Linux. I come from the Mac but unfortunately I do not have access
> a Mac and CW8 right now. Fortunately Paul Snively volunteered to check
> Spirit on CW8 on the Mac. You can also help out by giving us a more
> account. For instance, what is the current state of the range (r) when
> assertion fired?
> Please post subsequent messages to Spirit's mailing lits. Let's
> this thread there.
> Thank you.
> Joel de Guzman
> joel at boost-consulting.com
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk