Bug 196681 - Random reparse project after IDE restarting
Random reparse project after IDE restarting
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: Code Model
7.0
PC Solaris
: P1 (vote)
: 7.0
Assigned To: Vladimir Voskresensky
issues@cnd
: 70_HR_FIX, RANDOM, REGRESSION
: 196731 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-14 15:00 UTC by Alexander Simon
Modified: 2011-03-18 12:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2011-03-14 15:00:08 UTC
Some times (probability on my computer about 40%) project is reparsed after IDE restarting.
Log contains exception:
java.lang.IllegalStateException: Can not get project settings validator data by the key ProjectSettingsValidatorKey /home/as204739/NetBeansProjects/clucene-core-0.9.21b_1N
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectSettingsValidator.restoreSettings(ProjectSettingsValidator.java:150)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createProjectFilesIfNeed(ProjectBase.java:789)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.ensureFilesCreated(ProjectBase.java:628)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.onAddedToModelImpl(ProjectBase.java:966)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.access$200(ProjectBase.java:143)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase$2.run(ProjectBase.java:931)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ModelImpl$2.run(ModelImpl.java:363)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 Alexander Simon 2011-03-14 15:08:23 UTC
Investigation show that bug is consequences of introducing NativeProjectRegistry.
On IDE shutdown NativeProjectRegistry sends "close project" events.
Code model has races with:
- code model shutdown
- notifications from NativeProjectRegistry
With 50% probability project CRC are not written fully.
As result project will be reparsed at next IDE starting.
P2 because project persistence is broken.
Comment 2 Alexander Simon 2011-03-14 15:49:00 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/9c4b26b48f4b
Comment 3 Quality Engineering 2011-03-15 09:45:41 UTC
Integrated into 'main-golden', will be available in build *201103150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9c4b26b48f4b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #196681 Random reparse project after IDE restarting
Comment 4 Vladimir Voskresensky 2011-03-15 13:45:39 UTC
QA, please, check for showstopper status.
Due to this bug IDE reparses project in 50% on restart.
For enterprise size projects it can be the problem (because we claim, that we parse long time only once - the first time)
Comment 5 Vladimir Voskresensky 2011-03-15 14:01:03 UTC
fix to reduce sync block 
restore flag to false when start up for extra protection (i.e. using from tests)

http://hg.netbeans.org/cnd-main?cmd=changeset;node=3355aee80da7
Comment 6 Vladimir Voskresensky 2011-03-15 16:12:35 UTC
remove check of model state introduced in http://hg.netbeans.org/main/rev/9c4b26b48f4b
http://hg.netbeans.org/cnd-main/rev/d0beeadf30c1
Comment 7 Vladimir Voskresensky 2011-03-15 16:15:33 UTC
use keyword to leave fixed bug accessible from dashboard
Comment 8 Quality Engineering 2011-03-16 09:43:19 UTC
Integrated into 'main-golden', will be available in build *201103160400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3355aee80da7
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix for #196681 -  Random reparse project after IDE restarting
- use smaller sync block
Comment 9 Vladimir Voskresensky 2011-03-16 14:26:43 UTC
*** Bug 196731 has been marked as a duplicate of this bug. ***
Comment 10 soldatov 2011-03-16 15:29:58 UTC
OK. Verified in cnd-main-5545-on-110316 build
Comment 11 Alexander Simon 2011-03-16 16:52:16 UTC
Fix is correct and safe.
Comment 13 soldatov 2011-03-18 12:15:13 UTC
Verified in NetBeans IDE 7.0 RC1 (Build 201103180000)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo