The following comment has been added to this issue:

     Author: Michael Good
    Created: Mon, 18 Oct 2004 3:18 PM
       Body:
I took another look at this with Java 5.0 on Windows XP SP2. We added an 

  -XX:+ShowMessageBoxOnError

flag to our JNI invocation. This causes the JVM to crash with the message:

  EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x04d30758, pid=2268, tid=3760

where the pc, pid, and tid change each invocation. Since this is not a null pointer 
exception, it doesn't seem to be a duplicate of 27454. This is again a crash during 
NodeList.getLength() after doing a node.getElementsByTagName() call.

If you need more data from the crash, please let me know what to do, 
especially if the Java 5.0 serviceability improvements can help.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESJ-912?page=comments#action_54317

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-912

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-912
    Summary: DOM call via JNI Invocation can crash calling program
       Type: Bug

     Status: Resolved
 Resolution: DUPLICATE

    Project: Xerces2-J
 Components: 
             DOM
   Versions:
             2.6.2

   Assignee: Xerces-J Developers Mailing List
   Reporter: Michael Good

    Created: Wed, 10 Mar 2004 3:07 AM
    Updated: Mon, 18 Oct 2004 3:18 PM
Environment: Operating System: Windows XP
Platform: PC

Description:
We have an XML parsing program that is a plug-in for another program. Our main 
plug-in is written in C++, calling Java via the JNI Invocation interface. We 
then make Xerces-J calls from the Java portion of our plug-in. The Java 
portion then calls back into the C++ portion via JNI.

There are some places where Xerces DOM calls are surrounding the container 
program. That is, we do not get an exception or a throwable in our Java try-
catch block. Instead, the exception is sometimes picked up in the C++ try-
catch block, and sometimes crashes the whole application without any exception 
handler anywhere.

The two calls where we have seen this are in NodeList.getLength() - possibly 
related to bug 27454? - and DomImplementation.createDocumentType. When we 
upgraded from 2.6.1 to 2.6.2, the bug in our test case moved from 
createDocumentType to getLength.

It is currently 100% reproducible here with a test file and our specific 
source / machine environment. But it does seem timing-dependent. If we pop up 
a log of debug dialogs, the bug goes away. It also goes away if we run the C++ 
portion from a debugger. If we run another part of our plug-in first before 
this part, it also goes away. This getLength() call is used all the time - in 
this case, following a node.getElementsByTagName() call - and usually works 
fine. 

I haven't tested on other Windows OSes, but we don't see this behavior on Mac 
OS X.

Thanks for any assistance you can offer. With this type of bug it's usually 
something in our JNI that causes the problem, but we have narrowed it down to 
the Xerces nodeList.getLength() call in this situation.

Michael Good
Recordare LLC


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to