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 182605 - Cannot open NB project
Summary: Cannot open NB project
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Directory Chooser (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: David Simonek
URL:
Keywords:
Depends on:
Blocks: 179124
  Show dependency tree
 
Reported: 2010-03-23 17:36 UTC by Alexander Simon
Modified: 2010-03-27 09:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (12.94 KB, text/plain)
2010-03-23 17:36 UTC, Alexander Simon
Details
screen shot (95.40 KB, image/png)
2010-03-23 17:43 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2010-03-23 17:36:22 UTC
Created attachment 95623 [details]
Thread dump

Open NB project shows "wait cursor" and do not allow open project.
Comment 1 Jesse Glick 2010-03-23 17:41:23 UTC
Working fine for me. No recent changes that I know of. Thread dump does not show IDE doing anything, just sitting there with a dialog open waiting for you to do something.
Comment 2 Alexander Simon 2010-03-23 17:43:23 UTC
Created attachment 95625 [details]
screen shot

- wait cursor
- scroll do not work
- only close dialog (by [x]) works
Comment 3 Alexander Simon 2010-03-23 17:45:14 UTC
do not working for me
Comment 4 Jesse Glick 2010-03-23 17:50:10 UTC
Don't know what to say. Something is broken on your machine, I guess. When you figure out what, let me know. Or if you can confirm that other people with recent builds on unrelated machines are having the same problem (but not with older builds), find the problematic change using bisection.
Comment 5 Alexander Simon 2010-03-23 18:16:57 UTC
I also don't know what to say.
Today I fetch last changes from cnd-main, build Netbeans, and start netbeans.exe from nbbuild/netbeabs/bin on Windows XP.

>Log Session: Tuesday, March 23, 2010 8:58:12 PM MSK
>System Info:
  Product Version         = NetBeans IDE Dev (Build 100323-5ccc53b5e404) (#5ccc53b5e404)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_18-b07
  Java Home               = D:\Program Files\Java\jdk1.6.0_18\jre
  System Locale; Encoding = ru_RU (nb); Cp1251
  Home Directory          = C:\Documents and Settings\Alex
  Current Directory       = D:\Program Files\NetBeans 6.9\bin
  User Directory          = C:\Documents and Settings\Alex\.netbeans\dev

I am trying to open project from NB hg repository.
Netbeabs open dialog and:
- infinite waiting cursor
- scrolling does not works
- keyboard input is working

Are your sure that open dialog does not have a bug?
My advice:
- check why cursor is in "waiting" state.
It cannot be in "waiting" state infinite time.
It is a bug.
Comment 6 Alexander Simon 2010-03-23 19:02:26 UTC
P2 because keyboard is working
Comment 7 Alexander Simon 2010-03-23 19:18:36 UTC
Bug is reproduced on second a and next open project.
Comment 8 Jesse Glick 2010-03-23 19:33:36 UTC
(In reply to comment #5)
> Are you sure that open dialog does not have a bug?

I can't be sure of anything until I know how to reproduce the problem. But I am unaware of any recent changes in clearly related areas like dirchooser or projectui.

Again, if you can confirm that builds from a few days ago are OK, then it would be possible to bisect history and find the problem, but the problem could just as well be in some environmental change rather than in the NB codebase.

> check why cursor is in "waiting" state.

If you can reproduce in a debugger, try to set a breakpoint on Component.setCursor and see what is going on.
Comment 9 Alexander Simon 2010-03-23 20:10:03 UTC
Definitely break point on Component.setCursor() is a bad idea.
Any other breakpoint?
May be override setCursor() of IDE file chooser and set break point on it?
Comment 10 Jesse Glick 2010-03-23 20:27:52 UTC
(In reply to comment #9)
> May be override setCursor() of IDE file chooser and set break point on it?

Maybe. Or look for usages of the wait cursor.
Comment 11 Alexander Simon 2010-03-23 21:43:21 UTC
Wait cursor is set:
java.lang.Exception: set cursor type 3
        at org.netbeans.swing.dirchooser.DirectoryChooserUI.setCursor(DirectoryChooserUI.java:1659)
        at org.netbeans.swing.dirchooser.DirectoryChooserUI.access$1700(DirectoryChooserUI.java:108)
        at org.netbeans.swing.dirchooser.DirectoryChooserUI$UpdateWorker.run(DirectoryChooserUI.java:2495)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1356)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1894)
Comment 12 Alexander Simon 2010-03-23 22:17:54 UTC
Is stack good enough reason to fix bug?
In stack you can see violation of thread model (use EDT method in non-EDT thread).
Please, do not close issue before fix (I can verify fix on my environment).
Comment 13 David Simonek 2010-03-24 10:43:37 UTC
Eh, pardon my ignorance, but are there any steps to reproduce? Everything is working OK on my Ubuntu, so is this OS specific?
Yes I did some recent changes in order to fix some nasty bug and setCursor is called from non-EDT thread, but such a call was there for several years and didn't cause any troubles, so what's going on? Thanks.
Comment 14 Alexander Simon 2010-03-24 10:57:45 UTC
IMHO it is a computer-performance specific.
Bug is easy (in 95%) reproduced on computer with 1 core with Windows XP.
My test case:
- invoke open project 
- point to NB hg sources
- click [x] to close dialog
- invoke open project again and see infinite wait cursor and unresponsive scroll bar and buttons (only keyboard input works)
Comment 15 Alexander Simon 2010-03-24 11:05:45 UTC
Sorry, in test case you should select project first time to store folder.
Comment 16 David Simonek 2010-03-24 16:04:17 UTC
Although I couldn't reproduce with production code, I was able to simulate thread slowness and confirm that there is an error - under certain circumstances, update of directory tree is skipped and there was missing call to restore regular cursor. Ugly time-thread related issue.

Anyway, fixed, Alexandr Simon please verify once my commit will find a way through build process into daily build, thank you.

fixed: 776729433cd0
Comment 17 Alexander Simon 2010-03-25 11:04:12 UTC
Cannot verify due to exception (see Bug#182729).
Comment 18 Alexander Simon 2010-03-27 09:08:50 UTC
It seems bug fixed.