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.
To avoid possible problems caused by race conditions, DataObject.getNodeDelegate should be changed to quietly return a value even when the object is invalid--or log some stack trace to logfile, but still return normally. This might not be trivial as the synchronization logic currently assumes a valid object (pool item).
I discussed this with Yarda some time ago. The only reason why the Item is involved in the process is that you need to pass Runnable in Children.MUTEX call in getNodeDelegate(). They decided to implement Runnable by Item instead of creating new inner class, there shouldn't be any other relationship from the point of view of node delegate construction. Jesse, if you want me to do this, just reassign it to me.
I know the Item is Runnable. It also provides a synch lock though, this needs to be replaced. I will do it.
Have a patch.
Should be fixed now: if you call getNodeDelegate and the data object is invalid, it ought to log an exception but return normally. Reused the primaryFileListener for synchronization purposes without adding an extra field etc. committed * Up-To-Date 1.63 openide/src/org/openide/loaders/DataObject.java committed * Up-To-Date 1.53 openide/src/org/openide/loaders/DataObjectPool.java committed * Up-To-Date 1.6 openide/test/unit/src/org/openide/loaders/DataObjectInvalidationTest.java
Product Version = NetBeans IDE Development Version (Build 200205070100) IDE Versioning = IDE/1 spec=2.17 impl=200205070100 Operating System = Linux version 2.4.18 running on i386 Java; VM; Vendor = 1.4.1-beta; Java HotSpot(TM) Client VM 1.4.1-beta-b10; Sun Microsystems Inc. Java Home = /usr/java/j2sdk1.4/sun/jdk1.4.1/jre System Locale; Encod. = cs_CZ; ISO-8859-2 ===================================================================== I've receive IllegalStateException when switching between Projects in the IDE. Here is a short stacktrace of ISE: *********** Exception occurred ************ at Tue May 07 13:55:45 CEST 2002 java.lang.IllegalStateException: The data object org/netbeans/modules/vcscore is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code [catch] at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:249) at org.openide.loaders.DataShadow$ShadowNode.originalChanged(DataShadow.java:929) at org.openide.loaders.DataShadow$ShadowNode.access$100(DataShadow.java:572) at org.openide.loaders.DataShadow.setOriginal(DataShadow.java:528) at org.openide.loaders.DataShadow.access$300(DataShadow.java:42) at org.openide.loaders.DataShadow$4.run(DataShadow.java:563) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
No, this bug is still fixed. As the exception message says, some *other* code is broken. Filed as issue #23225.
OK and thank you
Resolved for 3.4.x or earlier, no new info since then -> closing.
*** Issue 143681 has been marked as a duplicate of this issue. ***
reopening accidentally close issue
closing
Integrated into 'main-golden', will be available in build *200809221401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b62787709153 User: Marek Fukala <mfukala@netbeans.org> Log: #143681 - IllegalStateException: The data object /local/qa_beetle/dashboards/SatisfactionSurvayCharts/SatisfactionSurveyCharts.html is invalid; you may not call getNodeDelegate on it any more; see #17020 and pl
Integrated into 'main-golden', will be available in build *201306212301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/15860a52948f User: Marek Fukala <mfukala@netbeans.org> Log: fixed java.lang.IllegalStateException: The data object XXX is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code.