This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 153008

Summary: IllegalStateException: The data object /home/nigel/src/DC/Makefile is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
Product: platform Reporter: nleck <nleck>
Component: Data SystemsAssignee: Jiri Skrivanek <jskrivanek>
Status: RESOLVED FIXED    
Severity: blocker CC: asmotrich, carlosmx, dhayalan, didgeridoo, glag, johnsonlau, jskrivanek, jtulach, kenashkov, matthies, misterm, nicoliniyo, oopman, setdosa, slowhog, stefanv
Priority: P2 Keywords: RANDOM, THREAD
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=1232
Issue Type: DEFECT Exception Reporter: 1232
Attachments: stacktrace
stacktrace

Description nleck 2008-11-12 05:52:06 UTC
Build: NetBeans IDE 6.5 RC2 (Build 200810270001)
VM: Java HotSpot(TM) Client VM, 1.5.0_14-b03, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_14-b03
OS: Linux, 2.6.18-1.2798.fc6, i386

User Comments:
nleck: opening the source file tree.

novakm: I had Mercurial versioned project, created new NewInterface.java in package aa.bb and then tried to move it (refactor) from package aa.bb to package aa.

samaresh: 1. Created a new xml document inside a NB module.
2. Deleted the xml document and then I got this exception.

nleck: opening the source file tree.



Stacktrace: 
java.lang.IllegalStateException: The data object /home/nigel/src/DC/Makefile is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.openide.loaders.DataObject.getClonedNodeDelegate(DataObject.java:306)
        at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:200)
        at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:66)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1596)
        at org.openide.nodes.EntrySupport$Lazy$EntryInfo.getNode(EntrySupport.java:1554)
Comment 1 Jaroslav Tulach 2008-11-13 10:34:52 UTC
OK, thanks for the report.
Comment 2 Antonin Nebuzelsky 2008-11-13 13:35:29 UTC
Reassigning all openide/data systems issues to the new owner jskrivanek.
Comment 3 misterm 2008-11-27 10:16:13 UTC
Build: NetBeans IDE 6.5 RC1 (Build 200810171318)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.IllegalStateException: The data object C:\projetos\rio_branco\cotacao\producao\app\aspectwerkz-jdk14-2.0.1__V152.jar is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.openide.loaders.DataObject.getClonedNodeDelegate(DataObject.java:306)
        at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:200)
        at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:66)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1596)
        at org.openide.nodes.EntrySupport$Lazy$EntryInfo.getNode(EntrySupport.java:1554)
Comment 4 misterm 2008-11-27 10:16:23 UTC
Created attachment 74221 [details]
stacktrace
Comment 5 Jiri Skrivanek 2009-02-12 09:31:55 UTC
Fixed.
http://hg.netbeans.org/core-main/rev/e09ee540e865
Comment 6 Jiri Skrivanek 2009-02-12 09:32:23 UTC
*** Issue 153214 has been marked as a duplicate of this issue. ***
Comment 7 Quality Engineering 2009-02-13 09:27:51 UTC
Integrated into 'main-golden', will be available in build *200902130336* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e09ee540e865
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #153008 - Do not call getNodeDelegate() for invalid DataObject.
Comment 8 Jiri Skrivanek 2009-05-05 14:50:04 UTC
*** Issue 163797 has been marked as a duplicate of this issue. ***
Comment 9 Jiri Skrivanek 2009-05-05 14:50:54 UTC
*** Issue 162058 has been marked as a duplicate of this issue. ***
Comment 10 Jiri Skrivanek 2009-05-07 10:34:29 UTC
*** Issue 164642 has been marked as a duplicate of this issue. ***
Comment 11 Jiri Skrivanek 2009-05-07 10:38:45 UTC
Still happens. See also issue 156864.
Comment 12 matthies 2009-07-16 22:02:12 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 
After starting the IDE, hwile projects are being scanned.

Stacktrace: 
java.lang.IllegalStateException: The data object C:\Home\nm\Devel\pencom\PenCom\PenCom.war\build is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code<br/>
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)<br/>
        at org.openide.loaders.DataFolder.getClonedNodeDelegate(DataFolder.java:424)<br/>
        at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:205)<br/>
        at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:66)<br/>
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1609)<br/>
        at org.openide.nodes.EntrySupport$Lazy$EntryInfo.getNode(EntrySupport.java:1552)<br/>
Comment 13 matthies 2009-07-16 22:02:17 UTC
Created attachment 84862 [details]
stacktrace
Comment 14 Exceptions Reporter 2009-07-16 22:02:25 UTC
This issue already has 51 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=1232
Comment 15 Jiri Skrivanek 2009-07-28 15:10:00 UTC
*** Issue 156864 has been marked as a duplicate of this issue. ***
Comment 16 Jiri Skrivanek 2009-07-28 15:15:57 UTC
I added some debug message to be able to detect why DataObject is invalid.
Comment 17 Quality Engineering 2009-07-29 05:58:29 UTC
Integrated into 'main-golden', will be available in build *200907290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/35747781ddaf
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #153008 - Added debug message.
Comment 18 Jiri Skrivanek 2009-08-25 09:55:16 UTC
As this record proves http://statistics.netbeans.org/exceptions/exception.do?id=248376, DataObject is invalid because
its primary file is no more valid. Also DataObjectPool.getPOOL().find(getPrimaryFile()) returns null which means
DataObject is already unregistered. This can happen if primary file is deleted by other thread between
myDataObject.isValid() and myDataObject.getNodeDelegate().
We can't prevent such situation. That's why I changed message level to INFO and added one more isValid() check to
FolderChildren.createNodes().

core-main #7ff94fe22bc8
Comment 19 Quality Engineering 2009-08-26 06:40:03 UTC
Integrated into 'main-golden', will be available in build *200908260201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7ff94fe22bc8
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #153008 - Decrease level to INFO because DataObject can become invalid between isValid() and getNodeDelegate(). Also added one more validity check to FolderChildren.createNodes().