DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27555>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27555 DOM call via JNI Invocation can crash calling program Summary: DOM call via JNI Invocation can crash calling program Product: Xerces2-J Version: 2.6.2 Platform: PC OS/Version: Windows XP Status: NEW Severity: Major Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]