You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by xa...@xml.apache.org on 2004/09/05 08:50:36 UTC

[jira] Updated: (XALANJ-1352) DTMManager.getDTM(int) sometimes returns null for RTF

The following issue has been updated:

    Updater: Brian Minchau (mailto:minchau@ca.ibm.com)
       Date: Sat, 4 Sep 2004 11:49 PM
    Changes:
             assignee changed from Xalan Developers Mailing List
             description changed from 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. to 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.
             environment changed from Operating System: Windows NT/2K
Platform: All to Operating System: Windows NT/2K
Platform: All
             priority changed to Blocker
             Component changed to DTM
             Component changed from Xalan
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XALANJ-1352?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1352

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1352
    Summary: DTMManager.getDTM(int) sometimes returns null for RTF
       Type: Bug

     Status: Unassigned
   Priority: Blocker

    Project: XalanJ2
 Components: 
             DTM
   Versions:
             CurrentCVS

   Assignee: 
   Reporter: Morris Kwan

    Created: Thu, 12 Dec 2002 4:43 PM
    Updated: Sat, 4 Sep 2004 11:49 PM
Environment: Operating System: Windows NT/2K
Platform: All

Description:
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.


---------------------------------------------------------------------
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org