cornercorner
FeaturesPluginsPlatformDocs & SupportCommunityPartners

Bug 17020 - Restore sloppy behavior of DataObject.getNodeDelegate
: Restore sloppy behavior of DataObject.getNodeDelegate
Status: RESOLVED FIXED
: platform
Data Systems
: 3.3
: PC Linux
: P2 (vote)
: 3.3
Assigned To:
:
:
:
:
:
: 16378
  Show dependency treegraph
 
Reported: 2001-10-26 11:22 by
Modified: 2008-12-22 09:50 (History)
Issue Type: ENHANCEMENT
:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2001-10-26 11:22:00
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).
------- Comment #1 From 2001-10-26 13:36:16 -------
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.
------- Comment #2 From 2001-10-26 20:20:45 -------
I know the Item is Runnable. It also provides a synch lock though,
this needs to be replaced. I will do it.
------- Comment #3 From 2001-10-30 20:33:41 -------
Have a patch.
------- Comment #4 From 2001-10-30 20:46:43 -------
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
------- Comment #5 From 2002-05-07 13:05:10 -------
  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)
------- Comment #6 From 2002-05-07 18:28:28 -------
No, this bug is still fixed. As the exception message says, some
*other* code is broken. Filed as issue #23225.
------- Comment #7 From 2002-05-09 11:49:49 -------
OK and thank you
------- Comment #8 From 2003-07-01 16:18:58 -------
Resolved for 3.4.x or earlier, no new info since then -> closing.
------- Comment #9 From 2008-09-08 10:35:26 -------
*** Issue 143681 has been marked as a duplicate of this issue. ***
------- Comment #10 From 2008-09-08 10:36:04 -------
reopening accidentally close issue 
------- Comment #11 From 2008-09-08 10:37:08 -------
closing
------- Comment #12 From 2008-09-22 17:26:33 -------
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