You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by David Reitter <r8...@davids-welt.de> on 2002/11/04 17:40:38 UTC

OSX: crash in setEncoding() ?

Hi there,

using a XercesLib.framework 2.1.0 built with gcc3 and Project Builder
(project files as supplied), my project crashes during setEncoding().

The encoding of that document is "uft-8" or "UTF-8".

Am I doing something wrong? How can I create the library without the Carbon
flag to use it only with Darwin/OS X ? I know there's a flag, but how do I
go about setting that?

Thanks
david

Here's my call stack

---
(gdb) backtrace
#0  0x6f2465a8 in CFStringSetExternalCharactersNoCopy (string=0x656f00,
chars=0xbfffdba0, length=5, capacity=0) at
String.subproj/CFString.c:3097/SourceCache/CF/CF-263/
#1  0x6f246470 in CFStringCreateMutableWithExternalCharactersNoCopy
(alloc=0x0, chars=0xbfffdba0, numChars=5, capacity=0,
externalCharactersAllocator=0x6f33d46c) at
String.subproj/CFString.c:1644/SourceCache/CF/CF-263/
#2  0x018ab49c in MacOSUnicodeConverter::upperCase(unsigned short*) const
(this=0x640450, toUpperCase=0xbfffdba0) at
../../../../src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeC
onverter.cpp:465/Users/dr/Prog/xerces-c-src2_1_0/Projects/MacOS/ProjectBuild
er/XercesLib/
#3  0x018b5014 in XMLString::upperCase(unsigned short*)
(toUpperCase=0xbfffdba0) at
../../../../src/xercesc/util/XMLString.cpp:1437/Users/dr/Prog/xerces-c-src2_
1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#4  0x018ad210 in XMLTransService::makeNewTranscoderFor(unsigned short
const*, XMLTransService::Codes&, unsigned) (this=0x640450,
encodingName=0x648380, resValue=@0xbfffec14, blockSize=16384) at
../../../../src/xercesc/util/TransService.cpp:175/Users/dr/Prog/xerces-c-src
2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#5  0x018869a0 in XMLReader::setEncoding(unsigned short const*)
(this=0x8d7000, newEncoding=0x64c230) at
../../../../src/xercesc/internal/XMLReader.cpp:1238/Users/dr/Prog/xerces-c-s
rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#6  0x01890f94 in XMLScanner::scanXMLDecl(XMLScanner::DeclTypes)
(this=0x641920, type=Decl_XML) at
../../../../src/xercesc/internal/XMLScanner.cpp:4058/Users/dr/Prog/xerces-c-
src2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#7  0x0188cec8 in XMLScanner::scanProlog() (this=0x641920) at
../../../../src/xercesc/internal/XMLScanner.cpp:2244/Users/dr/Prog/xerces-c-
src2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#8  0x01888efc in XMLScanner::scanDocument(InputSource const&)
(this=0x641920, src=@0x646d60) at
../../../../src/xercesc/internal/XMLScanner.cpp:446/Users/dr/Prog/xerces-c-s
rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#9  0x01888da4 in XMLScanner::scanDocument(unsigned short const*)
(this=0x641920, systemId=0x646d00) at
../../../../src/xercesc/internal/XMLScanner.cpp:407/Users/dr/Prog/xerces-c-s
rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#10 0x01888e30 in XMLScanner::scanDocument(char const*) (this=0x641920,
systemId=0x646cd0 "/Users/dr/Documents/RST/corpus/part.xml") at
../../../../src/xercesc/internal/XMLScanner.cpp:415/Users/dr/Prog/xerces-c-s
rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#11 0x01975c34 in AbstractDOMParser::parse(char const*) (this=0x641000,
systemId=0x646cd0 "/Users/dr/Documents/RST/corpus/part.xml") at
../../../../src/xercesc/parsers/AbstractDOMParser.cpp:379/Users/dr/Prog/xerc
es-c-src2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
#12 0x00005d24 in Docs::readXML(char const*, XercesDOMParser*&)
(this=0xbffff7d8, input_file=0x63ee7c
"/Users/dr/Documents/RST/corpus/part.xml", parser=@0xbffff85c) at
Docs.cpp:121/Users/dr/Prog/rst/

---
Standard I/O says:

InitCarbonCore: assertion build

DebugAssert: InternationalCache: MakeSureToLoad( handle )
LoadIntlCacheData_ResourceNULL [line 503, file
ScriptMgr/Source/InternationalCache.c]

DebugAssert: InternationalCache: status == 0  [-192] IntlGetCache_LoadFailed
[line 190, file ScriptMgr/Source/InternationalCache.c]

DebugAssert: CarbonCore/ScriptMgr: status == 0  [-192]  [line 549, file
ScriptMgr/Source/ScriptMgrGetSetUtils.c]

2002-11-04 14:13:13.702 Debug[5564] CFLog (15):
CFStringSetExternalCharactersNoCopy(): Invalid args: characters 0xbfffdba0
length 5 capacity 0
---


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: OSX: crash in setEncoding() ?

Posted by David Reitter <r8...@davids-welt.de>.
James -

I will glady file a bug report as soon as I'm sure it's not my mistake.

I believe it's a debugging issue. Maybe gdb just catches a thrown exception
that is supposed to be caught by Xerces. (I had the same issue debugging a
Xerces based application in BCB on Windows.)

How do I turn this behavior off, i.e. make gdb ignore exceptions (in the
library)?

Dave



---
James Berry wrote:

David,

Will you report a bug along with sufficient steps to reproduce?

Can you get it to fail with the DOMPrint example program? Is there a
particular XML input file you're parsing that causes the crash?

-jdb


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: OSX: crash in setEncoding() ?

Posted by James Berry <jb...@criticalpath.com>.
David,

Will you report a bug along with sufficient steps to reproduce?

Can you get it to fail with the DOMPrint example program? Is there a
particular XML input file you're parsing that causes the crash?

-jdb

On 11/4/02 8:40 AM, "David Reitter" <r8...@davids-welt.de> wrote:

> Hi there,
> 
> using a XercesLib.framework 2.1.0 built with gcc3 and Project Builder
> (project files as supplied), my project crashes during setEncoding().
> 
> The encoding of that document is "uft-8" or "UTF-8".
> 
> Am I doing something wrong? How can I create the library without the Carbon
> flag to use it only with Darwin/OS X ? I know there's a flag, but how do I
> go about setting that?
> 
> Thanks
> david
> 
> Here's my call stack
> 
> ---
> (gdb) backtrace
> #0  0x6f2465a8 in CFStringSetExternalCharactersNoCopy (string=0x656f00,
> chars=0xbfffdba0, length=5, capacity=0) at
> String.subproj/CFString.c:3097/SourceCache/CF/CF-263/
> #1  0x6f246470 in CFStringCreateMutableWithExternalCharactersNoCopy
> (alloc=0x0, chars=0xbfffdba0, numChars=5, capacity=0,
> externalCharactersAllocator=0x6f33d46c) at
> String.subproj/CFString.c:1644/SourceCache/CF/CF-263/
> #2  0x018ab49c in MacOSUnicodeConverter::upperCase(unsigned short*) const
> (this=0x640450, toUpperCase=0xbfffdba0) at
> ../../../../src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeC
> onverter.cpp:465/Users/dr/Prog/xerces-c-src2_1_0/Projects/MacOS/ProjectBuild
> er/XercesLib/
> #3  0x018b5014 in XMLString::upperCase(unsigned short*)
> (toUpperCase=0xbfffdba0) at
> ../../../../src/xercesc/util/XMLString.cpp:1437/Users/dr/Prog/xerces-c-src2_
> 1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #4  0x018ad210 in XMLTransService::makeNewTranscoderFor(unsigned short
> const*, XMLTransService::Codes&, unsigned) (this=0x640450,
> encodingName=0x648380, resValue=@0xbfffec14, blockSize=16384) at
> ../../../../src/xercesc/util/TransService.cpp:175/Users/dr/Prog/xerces-c-src
> 2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #5  0x018869a0 in XMLReader::setEncoding(unsigned short const*)
> (this=0x8d7000, newEncoding=0x64c230) at
> ../../../../src/xercesc/internal/XMLReader.cpp:1238/Users/dr/Prog/xerces-c-s
> rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #6  0x01890f94 in XMLScanner::scanXMLDecl(XMLScanner::DeclTypes)
> (this=0x641920, type=Decl_XML) at
> ../../../../src/xercesc/internal/XMLScanner.cpp:4058/Users/dr/Prog/xerces-c-
> src2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #7  0x0188cec8 in XMLScanner::scanProlog() (this=0x641920) at
> ../../../../src/xercesc/internal/XMLScanner.cpp:2244/Users/dr/Prog/xerces-c-
> src2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #8  0x01888efc in XMLScanner::scanDocument(InputSource const&)
> (this=0x641920, src=@0x646d60) at
> ../../../../src/xercesc/internal/XMLScanner.cpp:446/Users/dr/Prog/xerces-c-s
> rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #9  0x01888da4 in XMLScanner::scanDocument(unsigned short const*)
> (this=0x641920, systemId=0x646d00) at
> ../../../../src/xercesc/internal/XMLScanner.cpp:407/Users/dr/Prog/xerces-c-s
> rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #10 0x01888e30 in XMLScanner::scanDocument(char const*) (this=0x641920,
> systemId=0x646cd0 "/Users/dr/Documents/RST/corpus/part.xml") at
> ../../../../src/xercesc/internal/XMLScanner.cpp:415/Users/dr/Prog/xerces-c-s
> rc2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #11 0x01975c34 in AbstractDOMParser::parse(char const*) (this=0x641000,
> systemId=0x646cd0 "/Users/dr/Documents/RST/corpus/part.xml") at
> ../../../../src/xercesc/parsers/AbstractDOMParser.cpp:379/Users/dr/Prog/xerc
> es-c-src2_1_0/Projects/MacOS/ProjectBuilder/XercesLib/
> #12 0x00005d24 in Docs::readXML(char const*, XercesDOMParser*&)
> (this=0xbffff7d8, input_file=0x63ee7c
> "/Users/dr/Documents/RST/corpus/part.xml", parser=@0xbffff85c) at
> Docs.cpp:121/Users/dr/Prog/rst/
> 
> ---
> Standard I/O says:
> 
> InitCarbonCore: assertion build
> 
> DebugAssert: InternationalCache: MakeSureToLoad( handle )
> LoadIntlCacheData_ResourceNULL [line 503, file
> ScriptMgr/Source/InternationalCache.c]
> 
> DebugAssert: InternationalCache: status == 0  [-192] IntlGetCache_LoadFailed
> [line 190, file ScriptMgr/Source/InternationalCache.c]
> 
> DebugAssert: CarbonCore/ScriptMgr: status == 0  [-192]  [line 549, file
> ScriptMgr/Source/ScriptMgrGetSetUtils.c]
> 
> 2002-11-04 14:13:13.702 Debug[5564] CFLog (15):
> CFStringSetExternalCharactersNoCopy(): Invalid args: characters 0xbfffdba0
> length 5 capacity 0
> ---
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 

--
/**********************************
 James D. Berry
 mailto:jberry@criticalpath.com
 vox:503.265.1213 fax:503.222.3020
 **********************************/



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org