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 246276 - Incorrect path in Open Project dialog causes full UI freeze
Summary: Incorrect path in Open Project dialog causes full UI freeze
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Directory Chooser (show other bugs)
Version: 8.0.1
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 13:01 UTC by Alexander Pepin
Modified: 2014-08-06 11:56 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Java Stack Trace taken when IDE is frozen (27.73 KB, application/octet-stream)
2014-08-05 13:01 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2014-08-05 13:01:59 UTC
Created attachment 148557 [details]
Java Stack Trace taken when IDE is frozen

Steps to reproduce:
- run IDE
- call Open Project dialog
- type incorrect NFS path in File Name field (insert /net/xyz before any existing path)
- press Open Project
Result: IDE is completely frozen for long long time (probably forever). The only way is to kill IDE process with possible data loss.
Comment 1 Jaroslav Havlin 2014-08-06 07:22:25 UTC
I'm sorry, but this cannot be fixed in NetBeans.
See JDK bug http://bugs.java.com/view_bug.do?bug_id=6488355.
File chooser needs to perform some I/O in EDT, and changing this would require significant API changes.

Maybe specifying some timeout in AutoFS settings would fix this problem.
Comment 2 Alexander Simon 2014-08-06 08:56:52 UTC
Platform can extend JFileChooser and BasicFileChooserUI to solve the problem.
See how it was implemented for remote FS in CND.
Comment 3 Ondrej Vrabec 2014-08-06 09:08:21 UTC

*** This bug has been marked as a duplicate of bug 225277 ***
Comment 4 Alexander Simon 2014-08-06 09:11:18 UTC
Reopen because it can be fixed in NB platform without JDK fix.
Comment 5 Ondrej Vrabec 2014-08-06 09:33:03 UTC
(In reply to Alexander Simon from comment #4)
> Reopen because it can be fixed in NB platform without JDK fix.
i see. Then you can provide a patch since you already implemented it.
Comment 6 Alexander Pepin 2014-08-06 09:46:46 UTC
Guys, we are talking not about any slowness we're talking about FULL IDE FREEZE! It's a very serious bug that should be fixed ASAP.
Comment 7 Ondrej Vrabec 2014-08-06 09:51:43 UTC
(In reply to Alexander Pepin from comment #6)
> Guys, we are talking not about any slowness we're talking about FULL IDE
> FREEZE! It's a very serious bug that should be fixed ASAP.
Then you should have been noisy in the JDK bug or in bug 225277 which is the same but over one and half a year old - and nobody from the cnd team actually cared.
Comment 8 Alexander Pepin 2014-08-06 09:59:16 UTC
Bug #225277 was filed by CND dev team and the solution was proposed half an year ago. While testing 8.0.1 we've faced once again with the problem described above.
Comment 9 Ondrej Vrabec 2014-08-06 10:03:55 UTC
the stack comes from directory chooser after all, so it may be easier to handle the workaround there (of course only for folders, file chooser in IDE opening files will not be fixed) because it already overrides BasicFileChooserUI.
Comment 10 Alexander Simon 2014-08-06 10:26:48 UTC
(In reply to Ondrej Vrabec from comment #9)
> the stack comes from directory chooser after all, so it may be easier to
> handle the workaround there (of course only for folders, file chooser in IDE
> opening files will not be fixed) because it already overrides
> BasicFileChooserUI.
You can reuse File/Directory UI from:
dlight.remote/src/org/netbeans/modules/remote/api/ui/FileChooserUIImpl.java
Class FileChooserUIImpl performs all IO operations out of EDT.
Comment 11 Ondrej Vrabec 2014-08-06 11:21:17 UTC
(In reply to Alexander Simon from comment #10)
> You can reuse File/Directory UI from:
> dlight.remote/src/org/netbeans/modules/remote/api/ui/FileChooserUIImpl.java
> Class FileChooserUIImpl performs all IO operations out of EDT.
Nonsense. That implementation does not help anything because the I/O calls to File.exists run in EDT anyway (cnd's ApproveSelectionFinisher is scheduled for EDT and actually does the same call to java.io.File.exists as JDK's implementation), see the stacktrace:
"AWT-EventQueue-0" #47 prio=6 os_prio=0 tid=0x00007f699c7c7000 nid=0x1462 runnable [0x00007f698dd6f000]
   java.lang.Thread.State: RUNNABLE
        at java.io.File.exists(File.java:812)
        at org.netbeans.swing.dirchooser.DirectoryChooserUI$ApproveSelectionFinisher.run(DirectoryChooserUI.java:2971)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
        at java.awt.EventQueue.access$400(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:697)
        at java.awt.EventQueue$3.run(EventQueue.java:691)
-- happens when changing platform's dir chooser to do the same as cnd's.

Secondly, cnd imports sun.awt.shell.ShellFolder and sun.swing.FilePane which is forbidden.
Comment 12 Ondrej Vrabec 2014-08-06 11:25:07 UTC
1) the alternative impl does not help
2) filed after cut-off
=> i am not fixing it in 8.0.1 anyway
Comment 13 Alexander Simon 2014-08-06 11:27:15 UTC
(In reply to Ondrej Vrabec from comment #11)
> Nonsense. That implementation does not help anything because the I/O calls
> to File.exists run in EDT anyway (cnd's ApproveSelectionFinisher is
> scheduled for EDT and actually does the same call to java.io.File.exists as
> JDK's implementation)
fixed in the bug #246296
Comment 14 Antonin Nebuzelsky 2014-08-06 11:56:40 UTC
(In reply to Ondrej Vrabec from comment #12)
> => i am not fixing it in 8.0.1 anyway

Agreed with Ondrej.