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 170711 - Projects initializing forever
Summary: Projects initializing forever
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2009-08-20 15:23 UTC by Egor Ushakov
Modified: 2009-09-18 22:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (16.72 KB, text/plain)
2009-08-21 09:32 UTC, Egor Ushakov
Details
messages1 (295.55 KB, text/plain)
2009-08-21 12:26 UTC, Egor Ushakov
Details
new log (2.69 MB, text/plain)
2009-08-21 13:41 UTC, Egor Ushakov
Details
Just opening these projects seem to work (1.00 KB, text/plain)
2009-09-16 11:52 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2009-08-20 15:23:42 UTC
I experience such behavior quite often:
after restart of the IDE some projects stays in the "initializing..." state,
I can not do anything with them except close and open them again.
Comment 1 Jiri Prox 2009-08-21 08:06:37 UTC
Can you please capture thread dump?
Comment 2 Egor Ushakov 2009-08-21 09:32:17 UTC
Created attachment 86518 [details]
stacktrace
Comment 3 Egor Ushakov 2009-08-21 09:33:10 UTC
sure, I attached the stacktrace
Comment 4 Egor Ushakov 2009-08-21 09:35:21 UTC
I'm not sure but I experienced this behavior after I tried context menu on some projects right after the IDE start,
the menu contained only "intitializing" and "close" items and never changed to the regular type after that.
Comment 5 Tomas Zezula 2009-08-21 09:43:31 UTC
Seems to be a race condition in Jarda's lazy projects.
Reassigning to Jarda
Comment 6 Jaroslav Tulach 2009-08-21 10:39:25 UTC
The stack trace is not really useful. I guess I need $userdir/var/log/messages.log file. Please attach it when you 
experience the problem again.
Comment 7 Egor Ushakov 2009-08-21 12:25:57 UTC
it is easy because I experience it every day! Please raise the priority back.
Comment 8 Egor Ushakov 2009-08-21 12:26:39 UTC
Created attachment 86526 [details]
messages1
Comment 9 Jaroslav Tulach 2009-08-21 13:34:31 UTC
The messages.log contains tons of messages and exceptions (there are failures in editor, classpath, debugger, 
versioning), but none of them seems to be related to lazy project opening. If you can reproduce easily, then please 
simulate the problem with

-J-Dorg.netbeans.modules.project.ui.OpenProjectList.level=ALL

and attach the messages.log again. Thanks.
Comment 10 Egor Ushakov 2009-08-21 13:41:38 UTC
Created attachment 86527 [details]
new log
Comment 11 Egor Ushakov 2009-08-21 13:44:19 UTC
see new log attached, I did not check all opened projects but:
C/C++ Remote Development API (cnd.api.remote)
C/C++ Project Bridge (cnd.api.project)
are stuck in initialization for sure
Comment 12 Jaroslav Tulach 2009-08-21 15:17:24 UTC
Looks like you can reproduce the problem quite easily.
Comment 13 Jaroslav Tulach 2009-08-21 15:19:53 UTC
There is something wrong with directories:

FINER [org.netbeans.modules.project.ui.OpenProjectList]: replacing for 
org.netbeans.modules.project.ui.ProjectsRootNode$BadgingNode@b5922e[Name=file:/export/work/cnd-main/cnd.api.project/, 
displayName=C/C++ Project Bridge]
FINE [org.netbeans.modules.project.ui.OpenProjectList]: wrong directories. 
current: /export/work/cnd-main/cnd.api.project new /export/work/cnd-main/dlight.threadmap.support
Comment 14 Antonin Nebuzelsky 2009-09-08 16:24:47 UTC
Jardo, any progress on resolving this issue?
Comment 15 Jaroslav Tulach 2009-09-16 11:41:50 UTC
I will try to reproduce the problem locally, but I cannot open all your projects. You seem to have not only 
NetBeans.org Hg projects, but more:

 SuiteProject[/export/work/toolshg/dbxgui/dbxguisuite
 SuiteProject[/export/work/toolshg/dbxgui/Dbxtool
 FreeformProject[/export/work/dbx_libs/latest/t-common
 NbModuleProject[/export/work/toolshg/dbxgui/sunstudio.base
 FreeformProject[/export/work/cnd-main/nbbuild
 NbModuleProject[/export/work/toolshg/dbxgui/sunstudio.glue
 J2SEProject[/home/eu155513/NetBeansProjects/jsch141
 SuiteProject[/export/work/toolshg/dbxgui/dbxidesuite
 NbModuleProject[/export/work/toolshg/dbxgui/dbxfacade.ide
 NbModuleProject[/export/work/toolshg/sside/core
 MakeProject[/export/work/dbx_libs/latest/dbx/dev/src
 NbModuleProject[/export/work/toolshg/dbxgui/dbxfacade.tool
 NbModuleProject[/export/work/toolshg/dbxgui/sunstudio.lisp
 NbModuleProject[/export/work/toolshg/dbxgui/dbxgui

Maybe the problem is in one of those. Can you close these and try to reproduce just with NetBeans.org projects?
Comment 16 Jaroslav Tulach 2009-09-16 11:52:50 UTC
Created attachment 87751 [details]
Just opening these projects seem to work
Comment 17 Egor Ushakov 2009-09-16 12:13:23 UTC
Closing extra projects does not help:
- I closed the specified projects
- restarted the IDE
- tried to expand different projects in the projects view

result is the same - some of them ~30% became "Initializing" forever.
I can run it with any flags needed and provide any extra information needed.
It is really disturbing.
Comment 18 Egor Ushakov 2009-09-16 12:15:54 UTC
another thing that came into my mind:
sometimes I closed the IDE before complete parsing of the projects was finished, may that be the case?
Comment 19 Jaroslav Tulach 2009-09-16 12:51:00 UTC
I also closed the IDE before parsing finished and it worked for me. Parsing shall not affect state of the projects. 
I'll dig into it more.
Comment 20 Jaroslav Tulach 2009-09-17 14:59:21 UTC
Are you running with assertions enabled or disabled? I guess disabled. Enable them and the failure disappears. If so, 
I know what to fix.
Comment 21 Jaroslav Tulach 2009-09-17 15:15:35 UTC
If the cause was disabled assertions, then it is fixed in core-main#2e832ebf0235
Comment 22 Egor Ushakov 2009-09-17 15:39:02 UTC
yes, I'm using release version with assertions disabled,
with enabled assertions I'm unable to reproduce it.
Thanks!
Comment 23 Jaroslav Tulach 2009-09-18 07:25:24 UTC
Thank you for pushing me to fix the problem. Nobody could not reproduce it locally as people I asked were running the 
recent dev builds and those have assertions on.

This was dangerous bug - fixed in dev builds, present in every release.
Comment 24 Quality Engineering 2009-09-18 22:15:57 UTC
Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2e832ebf0235
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #170711: The project nodes need to be checked every time not only when running with -ea