Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 167696 - Can't switch off Memory checker
Can't switch off Memory checker
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: D-Light
6.x
All All
: P2 (vote)
: TBD
Assigned To: Maria Tishkova
dlight-issues@cnd
67patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-26 12:47 UTC by soldatov
Modified: 2009-07-16 16:35 UTC (History)
2 users (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 soldatov 2009-06-26 12:47:12 UTC
Platform: OpenSolaris 2009.06 (Solaris 10 also)
Data Provider: Sun Studio 12 update 1 (Sun Studio 12 also)

Scenario:
- Create Freeway project
- Run project
==> Project is started for ~1 minute
- Switch off Memory and Thread indicators
- Run project
==> Project is started for ~1 minute (but if Memory checker is switched off, then Freeway should be started quickly)
Comment 1 Maria Tishkova 2009-06-26 13:14:58 UTC
confirmed
Comment 2 Maria Tishkova 2009-06-29 09:51:29 UTC
The problem is:

1. One  instance of SunStudioDataCollector is used for all tools which use SunStudio
2. DataCollector and IndicatorDataProvider instances are created in the DLightTool constructor
3. Infrastructure reads XML files which contains all tools listed and create instances of all tools even if some of them
are turned off


The solution is:
Created DataCollector and IndicatorDataProvider instances per request not in constructor of DLightTool
Comment 3 Maria Tishkova 2009-06-29 14:28:49 UTC
fixed in cnd-mainhttp://hg.netbeans.org/cnd-main/rev/50bd94dabac7

Andrew, please review the fix and give your comments

Valeriy, please check if the problem is fixed 
Comment 4 soldatov 2009-06-29 15:07:48 UTC
Verified in NetBeans with *.jar from developers. Problem is fixed.
By default Freeway sample starts for 1 minute.
If Memory and Thread indicators are switched off: less 1 second
Comment 5 Quality Engineering 2009-06-30 05:44:27 UTC
Integrated into 'main-golden', will be available in build *200906300200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/50bd94dabac7
User: Maria Tishkova <mromashova@netbeans.org>
Log: fixed IZ#167696 Can't switch off Memory checker
Comment 6 Andrew Krasny 2009-06-30 14:12:14 UTC
Maria, 

the fix looks ok. The only thing I would propose to change is one place with synchronization... 

bash-3.00$ hg diff dlight/src/org/netbeans/modules/dlight/api/tool/DLightTool.java
diff -r 84b2352cae3a dlight/src/org/netbeans/modules/dlight/api/tool/DLightTool.java
--- a/dlight/src/org/netbeans/modules/dlight/api/tool/DLightTool.java   Mon Jun 29 22:55:43 2009 +0400
+++ b/dlight/src/org/netbeans/modules/dlight/api/tool/DLightTool.java   Tue Jun 30 17:06:43 2009 +0400
@@ -80,7 +80,7 @@
     private boolean collectorsTurnedOn = true;
     private final String iconPath;
     private final DLightToolConfiguration configuration;
-    private Boolean idpsInitialized = false;
+    private volatile Boolean idpsInitialized = false;
     //register accessor which will be used ne friend packages of API/SPI accessor packages
     //to get access to tool creation, etc.

@@ -185,7 +185,7 @@
     }

     private final void initIndicatorDataProviders() {
-        synchronized(idpsInitialized){
+        synchronized(this){
             if (idpsInitialized){
                 return;
             }
Comment 7 Maria Tishkova 2009-06-30 17:33:06 UTC
Andrew, thanks for the comment! I have fixed the issue you mentioned: 
see rev http://hg.netbeans.org/cnd-main/rev/21672f550f51
Comment 8 Maria Tishkova 2009-06-30 17:57:35 UTC
fixed in cnd-main 
Comment 9 Quality Engineering 2009-07-02 05:28:44 UTC
Integrated into 'main-golden', will be available in build *200907020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/21672f550f51
User: Maria Tishkova <mromashova@netbeans.org>
Log: add fix to  IZ#167696 Can't switch off Memory checker
according to comment of akrasny
Comment 10 soldatov 2009-07-02 08:31:45 UTC
Verified in latest build from: http://bertram.netbeans.org/hudson/ and http://bits.netbeans.org/dev/nightly/
Comment 11 pgebauer 2009-07-02 11:11:10 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/4cfedfc1b8c7
Comment 12 Alexander Pepin 2009-07-15 16:45:30 UTC
verified in nb6.7.1rc


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