You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/12/12 17:43:48 UTC
DO NOT REPLY [Bug 15320] New: -
DTMManager.getDTM(int) sometimes returns null for RTF
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15320>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15320
DTMManager.getDTM(int) sometimes returns null for RTF
Summary: DTMManager.getDTM(int) sometimes returns null for RTF
Product: XalanJ2
Version: CurrentCVS
Platform: All
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Xalan
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: mkwan@ca.ibm.com
I saw a NullPointerException in the testcase
extensions\library\libraryNodeset03.xsl when propagating the extension changes
to Xalan3. The weird thing is that this problem has nothing to do with the
changes I made. It is also intermittent. I can reproduce it on the command
line. But the problem disappeared when running inside the debugger. Adding
another unrelated command line option can also cause the problem to disappear.
I finally traced the problem down to
org.apache.xpath.objects.XRTreeFrag.finalize(), which calls the destruct()
method to release the DTM associated with the RTF. The problem is the DTM can
still be referenced after it is released, causing DTMManager.getDTM(int
nodeHandle) to return NULL. The finalize() method is called by GC, which
explains the undeterministic behavior of this bug.
I think the main branch also has this problem although I only saw it in the
xslt20 branch.