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 207116 - NPE when deleting a directory in remote browser
Summary: NPE when deleting a directory in remote browser
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 7.0.1
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 10:56 UTC by Vladimir Kvashin
Modified: 2012-05-14 13:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Possible fix for 7.0.1 (2.62 KB, patch)
2012-01-13 14:48 UTC, Vladimir Kvashin
Details | Diff
Another way of fixing (4.40 KB, patch)
2012-01-19 08:25 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2012-01-10 10:56:24 UTC
From Bugster:

1) create remote host
2) open Open Remote C/C++ project dialog use the remote host
3) In the dialog, right-click a folder and choose Delete

The impression is that the IDE is now frozen. It actually isn't completely frozen: buttons do not work, but you can close the window with the mouse or press escape.

As I understand this was caused by the NPE:

SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.swing.dirchooser.DirectoryChooserUI$11
java.lang.NullPointerException
	at org.netbeans.swing.dirchooser.DirectoryChooserUI$11.run(DirectoryChooserUI.java:977)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:425)
	at org.netbeans.swing.dirchooser.DirectoryChooserUI.deleteAction(DirectoryChooserUI.java:961)
	at org.netbeans.swing.dirchooser.DirectoryChooserUI.access$1400(DirectoryChooserUI.java:111)
	at org.netbeans.swing.dirchooser.DirectoryChooserUI$TreeKeyHandler.keyPressed(DirectoryChooserUI.java:814)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:233)
	at java.awt.Component.processKeyEvent(Component.java:6225)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2801)
	at java.awt.Component.processEvent(Component.java:6044)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
*** (#2 of 2): 2012-01-10 13:54:37 MSK vladimir.kvashin@oracle.com
Comment 1 Vladimir Kvashin 2012-01-13 14:48:08 UTC
Created attachment 114876 [details]
Possible fix for 7.0.1
Comment 2 Vladimir Kvashin 2012-01-19 08:25:57 UTC
Created attachment 115063 [details]
Another way of fixing

I'm attached this fix just for information. 
It failed because of

java.lang.IllegalArgumentException: URI has an authority component
	at java.io.File.<init>(File.java:368)
	at org.openide.filesystems.FileUtil.normalizeFileOnUnixAlike(FileUtil.java:1762)
	at org.openide.filesystems.FileUtil.normalizeFileImpl(FileUtil.java:1749)
	at org.openide.filesystems.FileUtil.normalizeFile(FileUtil.java:1727)
	at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:1013)
	at org.netbeans.swing.dirchooser.DirectoryChooserUI$11.run(DirectoryChooserUI.java:976)
Comment 3 Vladimir Kvashin 2012-01-19 09:45:09 UTC
Fixed in
cnd-main:
http://hg.netbeans.org/cnd-main/rev/85dfd046f812
http://hg.netbeans.org/cnd-main/rev/ad5cd7c7fa53
blacktie:
rev/33fad87fe292
rev/f6ebf6d04d58
Comment 4 Quality Engineering 2012-01-25 16:37:46 UTC
Integrated into 'main-golden', will be available in build *201201250600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/85dfd046f812
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: #207116 - NPE when deleting a directory in remote browser
(transplanted from f6ebf6d04d58827fd5867b3400ca3ee43c7c65d4)
Comment 5 Alexander Pepin 2012-02-07 15:32:39 UTC
Verified in OSS IDE being built on NB trunk.
Comment 6 Vladimir Kvashin 2012-02-08 20:09:00 UTC
Integrated into release71_fixes:
http://hg.netbeans.org/releases/rev/4ff669561706
http://hg.netbeans.org/releases/rev/18f4d6c27acc
Comment 7 Quality Engineering 2012-02-09 02:37:06 UTC
Integrated into 'releases', will be available in build *201202082200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/4ff669561706
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: #207116 - NPE when deleting a directory in remote browser
(transplanted from f6ebf6d04d58827fd5867b3400ca3ee43c7c65d4)
(transplanted from 85dfd046f812c6088c07ed0ae44c563ead4bbb70)
Comment 8 Alexander Pepin 2012-02-27 13:52:18 UTC
verified in 7.1.1 rc1 build (20120214)
Comment 9 Alexander Pepin 2012-05-14 13:19:08 UTC
verified in NB 7.0.1 patch3 candidate (build 201205021427)