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 15603 - NPE when deleting directories
Summary: NPE when deleting directories
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Nodes (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P1 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords:
: 15597 15614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-09-18 17:41 UTC by _ gtzabari
Modified: 2008-12-22 23:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
not suggested patch (453 bytes, patch)
2001-09-19 18:02 UTC, Petr Hrebejk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2001-09-18 17:41:08 UTC
dev build 200109180940
Sun JDK 1.3.1

Set to P1 because this is basic (vital) functionality.

When I delete a directory off a CVS filesystem I get:

Tue Sep 18 12:38:11 EDT 2001: java.lang.NullPointerException: Posted StackTrace
Annotation: Exception occurred in Request Processor
org.openide.util.RequestProcessor$Holder: Posted StackTrace(task 
org.openide.loaders.FolderChildren$Addition@1cb0f1 [-1713, 1, -1])
        at org.openide.util.RequestProcessor$Task.createHolder
(RequestProcessor.java:322)
        at org.openide.util.RequestProcessor$Task.schedule
(RequestProcessor.java:346)
        at org.openide.loaders.FolderChildren$Addition.refreshKeys
(FolderChildren.java:349)
        at org.openide.loaders.FolderChildren$Addition.finished
(FolderChildren.java:312)
        at org.openide.loaders.FolderList.createObjects(FolderList.java:516)
        at org.openide.loaders.FolderList.getObjects(FolderList.java:393)
        at org.openide.loaders.FolderList.access$200(FolderList.java:42)
        at org.openide.loaders.FolderList$ListTask.run(FolderList.java:735)
        at org.openide.util.Task.run(Task.java:152)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcessor.java:611)
 
Tue Sep 18 12:38:11 EDT 2001: java.lang.NullPointerException: null
java.lang.NullPointerException
        at org.openide.nodes.Children.updateRemove(Children.java:542)
        at org.openide.nodes.Children.setEntries(Children.java:514)
        at org.openide.nodes.Children$3.run(Children.java:1713)
        at org.openide.util.Mutex.postRequest(Mutex.java:825)
        at org.openide.util.Mutex.postWriteRequest(Mutex.java:353)
        at org.openide.nodes.Children$Keys.applyKeys(Children.java:1721)
        at org.openide.nodes.Children$Keys.setKeys(Children.java:1703)
        at org.openide.nodes.FilterNode$ChildrenAdapter.run(FilterNode.java:937)
        at org.openide.nodes.FilterNode$Children.updateKeys(FilterNode.java:907)
        at org.openide.nodes.FilterNode$Children.filterChildrenRemoved
(FilterNode.java:887)
        at org.openide.nodes.FilterNode$ChildrenAdapter.childrenRemoved
(FilterNode.java:964)
        at org.openide.nodes.Node.fireSubNodesChange(Node.java:565)
        at org.openide.nodes.Children.notifyRemove(Children.java:591)
        at org.openide.nodes.Children$Keys.notifyRemove(Children.java:1772)
        at org.openide.nodes.Children.updateRemove(Children.java:560)
        at org.openide.nodes.Children.setEntries(Children.java:514)
        at org.openide.nodes.Children$3.run(Children.java:1713)
        at org.openide.util.Mutex.postRequest(Mutex.java:815)
        at org.openide.util.Mutex.postWriteRequest(Mutex.java:353)
        at org.openide.nodes.Children$Keys.applyKeys(Children.java:1721)
        at org.openide.nodes.Children$Keys.setKeys(Children.java:1680)
        at org.openide.loaders.FolderChildren.setKeys0(FolderChildren.java:221)
        at org.openide.loaders.FolderChildren.access$300(FolderChildren.java:35)
        at org.openide.loaders.FolderChildren$Addition.run
(FolderChildren.java:367)
        at org.openide.util.Task.run(Task.java:152)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcessor.java:611)
Comment 1 Jan Zajicek 2001-09-19 12:41:03 UTC
I have reproduced this when mounted some java cvs filesystem, then
created a directory in the root of this filesystem and delete it.

Genarally it have to be the toplevel directory in some filesystem.

Assigning.
Comment 2 Jan Becicka 2001-09-19 12:48:27 UTC
*** Issue 15597 has been marked as a duplicate of this issue. ***
Comment 3 Jan Becicka 2001-09-19 12:49:44 UTC
*** Issue 15597 has been marked as a duplicate of this issue. ***
Comment 4 Jan Zajicek 2001-09-19 13:10:42 UTC
*** Issue 15614 has been marked as a duplicate of this issue. ***
Comment 5 Jan Zajicek 2001-09-19 13:26:27 UTC
x
Comment 6 Petr Hrebejk 2001-09-19 18:02:57 UTC
Created attachment 2609 [details]
not suggested patch
Comment 7 Petr Hrebejk 2001-09-19 18:08:17 UTC
Jesse added to CC. It seems that this bug is caused by following checkin:

http://www.netbeans.org/source/browse/openide/src/org/openide/loaders/DataFolder.java.diff?r1=1.111&r2=1

Children probably don't like the hashCode to be changed. I'm not sure
where to fix the bug. (i.e. Children - dangerous, invalidating the
dataobject later??, or not changing the hashCode) attached patch seems
to solve the problem but it is seems to be more hack than fix

Comment 8 Jesse Glick 2001-09-19 18:38:14 UTC
I would suggest reverting my patch if needed--agree with your
explanation of why it broke Children (wish the error message were a
little more helpful though!). If you want to try your patch, I think
it is OK; would suggest that if the hashCode is once computed, don't
compute it again (i.e. if non-0 then return it at once).

BTW for the future please use diff -u, it is way easier to read...
Comment 9 Petr Hrebejk 2001-09-20 12:35:35 UTC
The patch applied. Changing hash code is illegal anyway.
Comment 10 Jan Zajicek 2001-09-21 08:16:33 UTC
Seems to be ok in dev #20010921.
Comment 11 Quality Engineering 2003-07-01 16:21:06 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.