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 147348

Summary: Profile/Profile Other menu not refreshed correctly
Product: profiler Reporter: J Bachorik <yardus>
Component: BaseAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2 Keywords: REGRESSION
Version: 6.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description J Bachorik 2008-09-16 10:21:22 UTC
The "Profile/Profile Other" menu is not refreshed correctly when node selection has been changed.
Steps to reproduce:
1. Create a java project
2. Create a non-java project (C/C++, PHP - the one with no profiler integration)
3. Select the non-java project and open "Profile/Profile Other" menu - all items should be disabled
4. Select the java project and open "Profile/Profile Other" menu - the "Profile Project ..." menu item should be enabled
but it's not; the menu items are enabled/disabled accordingly to the project being selected when first opening
"Profile/Profile Other" menu
Comment 1 J Bachorik 2008-09-16 11:00:46 UTC
This seems to be regression against 6.0
The reason is that the menu actions have become only weakly held so we can not use them to keep a weak lookup listener
alive. We must register the listener with the strong reference.

fixed - http://hg.netbeans.org/profiler-main/rev/984ad33dfa15
Comment 2 Quality Engineering 2008-09-18 17:58:24 UTC
Integrated into 'main-golden', will be available in build *200809181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/984ad33dfa15
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #147348 - Profile/Profile Other menu not refreshed correctly
Comment 3 mariadavydova 2008-11-25 11:35:57 UTC
Reproduced in Build 200811250201
Steps as in issue description.
Comment 4 J Bachorik 2008-11-26 11:16:59 UTC
fixed - http://hg.netbeans.org/profiler-main/rev/ea279fcf0d8f
The previous fix was not complete - it is necessary to hold a strong reference to a Lookup.Result if one wants to listen
for changes.
Comment 5 Quality Engineering 2008-11-27 05:31:37 UTC
Integrated into 'main-golden', will be available in build *200811270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ea279fcf0d8f
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #147348 - Profile/Profile Other menu not refreshed correctly
Lookup.Result needs to be held stronlgy in order not to be GCed - registering a listener is not enough
Comment 6 Rashid Urusov 2008-12-01 13:49:50 UTC
VERIFIED in Build 200812010201
Comment 7 pgebauer 2008-12-18 14:48:43 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/cbc8d2033544
Comment 8 Rashid Urusov 2009-01-22 12:40:04 UTC
Changed Status whiteboard