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 Vinay Kumar <wi...@yahoo.com> on 2011/12/13 15:27:11 UTC

Xerces Parse Function Crashing

Hi All,

I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string of length
of 
to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with Segmentation fault as follows:



Program received signal SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400000000283dde0 in <unknown_procedure> ()
(gdb) bt
#0  0x400000000283dde0 in <unknown_procedure> ()
warning: Attempting to unwind past bad PC 0x400000000283dde0
#1  0x40000000010ed990:0 in xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
#2  0x40000000010d7760:0 in xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
#3 
 0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short const*)+0xc90 ()
#4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
   +0x80 ()
#5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
   +0x1c0 ()


Please let me know the reason for getting this error. What are the changes needed to fix this error?

Thanks & Regards,
Vinay

Re: Xerces Parse Function Crashing

Posted by sh...@e-z.net.
Vinay,

Check to see what needs to be initialized in the Xerces environment for
   IGXMLScanner::scanReset
to succeed.  The stack trace indicates a dependency problem in scanReset.

Steven J. Hathaway

> Hi All,
>
> I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a
> string of length
> of
> to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with
> Segmentation fault as follows:
>
>
>
> Program received signal SIGSEGV, Segmentation fault
>   si_code: 1 - SEGV_MAPERR - Address not mapped to object.
> 0x400000000283dde0 in <unknown_procedure> ()
> (gdb) bt
> #0  0x400000000283dde0 in <unknown_procedure> ()
> warning: Attempting to unwind past bad PC 0x400000000283dde0
> #1  0x40000000010ed990:0 in
> xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource
> const&)+0x690 ()
> #2  0x40000000010d7760:0 in
> xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource
> const&)+0xb0 ()
> #3 
>  0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned
> short const*)+0xc90 ()
> #4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char
> const*)
>    +0x80 ()
> #5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char
> const*)
>    +0x1c0 ()
>
>
> Please let me know the reason for getting this error. What are the changes
> needed to fix this error?
>
> Thanks & Regards,
> Vinay
>



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


Re: Xerces Parse Function Crashing

Posted by Alberto Massari <Al...@progress.com>.
Please include the source code of your application; the stack trace is 
not enough to understand what you are trying to do.

Alberto

Il 13/12/2011 15:27, Vinay Kumar ha scritto:
> Hi All,
>
> I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string of length
> of
> to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with Segmentation fault as follows:
>
>
>
> Program received signal SIGSEGV, Segmentation fault
>    si_code: 1 - SEGV_MAPERR - Address not mapped to object.
> 0x400000000283dde0 in<unknown_procedure>  ()
> (gdb) bt
> #0  0x400000000283dde0 in<unknown_procedure>  ()
> warning: Attempting to unwind past bad PC 0x400000000283dde0
> #1  0x40000000010ed990:0 in xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
> #2  0x40000000010d7760:0 in xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
> #3 
>   0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short const*)+0xc90 ()
> #4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
>     +0x80 ()
> #5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
>     +0x1c0 ()
>
>
> Please let me know the reason for getting this error. What are the changes needed to fix this error?
>
> Thanks&  Regards,
> Vinay
> .
>


Re: Xerces Parse Function Crashing

Posted by Vinay Kumar <wi...@yahoo.com>.
Resending with proper Code Snippet:

{
    XercesDOMParser parser;
    ErrorReporter errReporter;
    parser.setErrorHandler(&errReporter);
    char *p="/home/local/share/project";
    parser.parse(p); /* Here it is crashing */
    if (!errReporter.sawErrors()) {
        DOMDocument* doc = parser.getDocument();
        if (doc != 0)
            loadDocument(doc);
    }


--- On Tue, 12/13/11, Vinay Kumar <wi...@yahoo.com> wrote:

From: Vinay Kumar <wi...@yahoo.com>
Subject: Re: Xerces Parse Function Crashing
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Date: Tuesday, December 13, 2011, 7:49 AM

The Code Snippet is as follows:

{
XercesDOMParser parser;
    ErrorReporter errReporter;
    parser.setErrorHandler(&errReporter);

        std::cout <<  "---!Inside the load!---" << configFile.c_str() << std::endl;
    parser.parse(configFile.c_str());
    if (!errReporter.sawErrors()) {
        DOMDocument* doc = parser.getDocument();
        if (doc != 0)
            loadDocument(doc);
    }


--- On Tue, 12/13/11, Vinay Kumar <wi...@yahoo.com> wrote:

From: Vinay Kumar <wi...@yahoo.com>
Subject: Xerces Parse Function Crashing
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Date: Tuesday, December 13, 2011, 6:27 AM

Hi All,

I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string of length
of 
to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with Segmentation fault as follows:



Program received signal
 SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400000000283dde0 in <unknown_procedure> ()
(gdb) bt
#0  0x400000000283dde0 in <unknown_procedure> ()
warning: Attempting to unwind past
 bad PC 0x400000000283dde0
#1  0x40000000010ed990:0 in xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
#2  0x40000000010d7760:0 in xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
#3 
 0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short const*)+0xc90 ()
#4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
   +0x80 ()
#5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
   +0x1c0 ()


Please let me know the reason for getting this error. What are the changes needed to fix this error?

Thanks & Regards,
Vinay

Re: Xerces Parse Function Crashing

Posted by Vinay Kumar <wi...@yahoo.com>.
Resending with proper Code Snippet:

{
    XercesDOMParser parser;
    ErrorReporter errReporter;
    parser.setErrorHandler(&errReporter);
    char *p="/home/local/share/project";
    parser.parse(p); /* Here it is crashing */
    if (!errReporter.sawErrors()) {
        DOMDocument* doc = parser.getDocument();
        if (doc != 0)
            loadDocument(doc);
    }


--- On Tue, 12/13/11, Vinay Kumar <wi...@yahoo.com> wrote:

From: Vinay Kumar <wi...@yahoo.com>
Subject: Re: Xerces Parse Function Crashing
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Date: Tuesday, December 13, 2011, 7:49 AM

The Code Snippet is as follows:

{
XercesDOMParser parser;
    ErrorReporter errReporter;
    parser.setErrorHandler(&errReporter);

        std::cout <<  "---!Inside the load!---" << configFile.c_str() << std::endl;
    parser.parse(configFile.c_str());
    if (!errReporter.sawErrors()) {
        DOMDocument* doc = parser.getDocument();
        if (doc != 0)
            loadDocument(doc);
    }


--- On Tue, 12/13/11, Vinay Kumar <wi...@yahoo.com> wrote:

From: Vinay Kumar <wi...@yahoo.com>
Subject: Xerces Parse Function Crashing
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Date: Tuesday, December 13, 2011, 6:27 AM

Hi All,

I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string of length
of 
to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with Segmentation fault as follows:



Program received signal
 SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400000000283dde0 in <unknown_procedure> ()
(gdb) bt
#0  0x400000000283dde0 in <unknown_procedure> ()
warning: Attempting to unwind past
 bad PC 0x400000000283dde0
#1  0x40000000010ed990:0 in xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
#2  0x40000000010d7760:0 in xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
#3 
 0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short const*)+0xc90 ()
#4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
   +0x80 ()
#5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
   +0x1c0 ()


Please let me know the reason for getting this error. What are the changes needed to fix this error?

Thanks & Regards,
Vinay

Re: Xerces Parse Function Crashing

Posted by Vinay Kumar <wi...@yahoo.com>.
The Code Snippet is as follows:

{
XercesDOMParser parser;
    ErrorReporter errReporter;
    parser.setErrorHandler(&errReporter);

        std::cout <<  "---!Inside the load!---" << configFile.c_str() << std::endl;
    parser.parse(configFile.c_str());
    if (!errReporter.sawErrors()) {
        DOMDocument* doc = parser.getDocument();
        if (doc != 0)
            loadDocument(doc);
    }


--- On Tue, 12/13/11, Vinay Kumar <wi...@yahoo.com> wrote:

From: Vinay Kumar <wi...@yahoo.com>
Subject: Xerces Parse Function Crashing
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Date: Tuesday, December 13, 2011, 6:27 AM

Hi All,

I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string of length
of 
to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with Segmentation fault as follows:



Program received signal SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400000000283dde0 in <unknown_procedure> ()
(gdb) bt
#0  0x400000000283dde0 in <unknown_procedure> ()
warning: Attempting to unwind past
 bad PC 0x400000000283dde0
#1  0x40000000010ed990:0 in xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
#2  0x40000000010d7760:0 in xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
#3 
 0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short const*)+0xc90 ()
#4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
   +0x80 ()
#5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
   +0x1c0 ()


Please let me know the reason for getting this error. What are the changes needed to fix this error?

Thanks & Regards,
Vinay

Re: Xerces Parse Function Crashing

Posted by Vinay Kumar <wi...@yahoo.com>.
The Code Snippet is as follows:

{
XercesDOMParser parser;
    ErrorReporter errReporter;
    parser.setErrorHandler(&errReporter);

        std::cout <<  "---!Inside the load!---" << configFile.c_str() << std::endl;
    parser.parse(configFile.c_str());
    if (!errReporter.sawErrors()) {
        DOMDocument* doc = parser.getDocument();
        if (doc != 0)
            loadDocument(doc);
    }


--- On Tue, 12/13/11, Vinay Kumar <wi...@yahoo.com> wrote:

From: Vinay Kumar <wi...@yahoo.com>
Subject: Xerces Parse Function Crashing
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Date: Tuesday, December 13, 2011, 6:27 AM

Hi All,

I am using Xerces-2.8.0 on HP-UX itanium machine. I am trying to pass a string of length
of 
to xercesc_2_8::AbstractDOMParser::parse function. The code crashes with Segmentation fault as follows:



Program received signal SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400000000283dde0 in <unknown_procedure> ()
(gdb) bt
#0  0x400000000283dde0 in <unknown_procedure> ()
warning: Attempting to unwind past
 bad PC 0x400000000283dde0
#1  0x40000000010ed990:0 in xercesc_2_8::IGXMLScanner::scanReset(xercesc_2_8::InputSource const&)+0x690 ()
#2  0x40000000010d7760:0 in xercesc_2_8::IGXMLScanner::scanDocument(xercesc_2_8::InputSource const&)+0xb0 ()
#3 
 0x4000000000fec140:0 in xercesc_2_8::XMLScanner::scanDocument(unsigned short const*)+0xc90 ()
#4  0x4000000000fec240:0 in xercesc_2_8::XMLScanner::scanDocument(char const*)
   +0x80 ()
#5  0x4000000000f29650:0 in xercesc_2_8::AbstractDOMParser::parse(char const*)
   +0x1c0 ()


Please let me know the reason for getting this error. What are the changes needed to fix this error?

Thanks & Regards,
Vinay