|
Boost : |
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",
line 132
This assertion is the result of the following call in the
xml_grammar::definition constructor:
chset_t Char(L"\x9\xA\xD\x20-\xD7FF\xE000-\xFFFD");
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
FFFFFFFD
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
character arrays.
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.
Thanks,
Michael-
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
>> assert
>> 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:
> Spirit-general_at_[hidden]
> https://lists.sourceforge.net/lists/listinfo/spirit-general
>
> 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
> to
> 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
> detailed
> account. For instance, what is the current state of the range (r) when
> the
> assertion fired?
>
> Please post subsequent messages to Spirit's mailing lits. Let's
> continue
> this thread there.
>
> Thank you.
> --
> Joel de Guzman
> joel at boost-consulting.com
> http://www.boost-consulting.com
> http://spirit.sf.net
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk