Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 167696 - Can't switch off Memory checker
Can't switch off Memory checker
Product: cnd
Classification: Unclassified
Component: D-Light
All All
: P2 (vote)
Assigned To: Maria Tishkova
Depends on:
  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


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)

- 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
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-main

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 (upload may still be in progress)
User: Maria Tishkova <>
Log: fixed IZ#167696 Can't switch off Memory checker
Comment 6 Andrew Krasny 2009-06-30 14:12:14 UTC

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/
diff -r 84b2352cae3a dlight/src/org/netbeans/modules/dlight/api/tool/
--- a/dlight/src/org/netbeans/modules/dlight/api/tool/   Mon Jun 29 22:55:43 2009 +0400
+++ b/dlight/src/org/netbeans/modules/dlight/api/tool/   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){
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
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 (upload may still be in progress)
User: Maria Tishkova <>
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: and
Comment 11 pgebauer 2009-07-02 11:11:10 UTC
The fix has been ported into the release67_fixes repository.
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