Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 394228

Summary: find dialog gives error when select non-top level items from the dialog for variables/expressions/registers views
Product: [Eclipse Project] Platform Reporter: Pawel Piech <pawel.1.piech>
Component: DebugAssignee: Pawel Piech <pawel.1.piech>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, daniel_megert, Michael_Rennie
Version: 3.8Flags: daniel_megert: pmc_approved+
curtis.windatt.public: review+
daniel_megert: review+
Target Milestone: 3.8.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 393812    
Bug Blocks:    

Description Pawel Piech CLA 2012-11-13 16:51:31 EST
---+++ This bug is a copy of Bug 393812, for the maintenance branch +++---

Observed this problem in cdt from eclipse 4.2.1, 4.2.0 and 3.8.0.
Do not see this problem in eclipse 3.7.x as far as I recall.


Debug a c/c++ program that has some variables containing fields, or arrays of fixed size.
Expand those arrays or structures in the variables/expressions view.
Bring up find dialog from the view. 
In the find dialog, select non-top level child items, e.g. ary[5], and click ok to the dialog.
Then, there is an error pop up saying
 "Unable to locate ary[5] in viewer
  Reason:
  Unable to locate {0} in viewer".
Expect the item can be located and selected after closing the find dialog.


Similar problem with Registers View. Expand a register group node to show its child items in the view. Bring up Find dialog and select a non-top level item from the dialog. Get the similar error message "Unable to locate .... in viewer".
Comment 1 Pawel Piech CLA 2012-11-13 16:53:12 EST
Mike, please review the fix I committed to master:
http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=2771d062dec0bd26b67d8f03c827d73a41a2ad32
Comment 2 Pawel Piech CLA 2012-11-28 17:25:06 EST
CQ:WIND00391210

Oops, I thought I had already committed this one.  Will merge now...
Comment 4 Pawel Piech CLA 2013-01-16 13:51:24 EST
Additional fix is needed to address the case described in bug 393812 comment #10.

Mike please review the additional change at http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=c7c121922013c5d942332b97eea7365be0956ec7
Comment 5 Pawel Piech CLA 2013-01-16 14:16:27 EST
Hi Dani,
It appears I also need a PMC approval for this as well.  Please let me know whether this is RC3-worthy.
Comment 6 Curtis Windatt CLA 2013-01-16 14:59:01 EST
+1

The commit can be cherry-picked cleanly onto 3_8_maintentance.  Though I see the copyright has to be updated (done in a separate commit on master).

Fix is small and fixes the specific case described (select a stack frame > find > select non-stack frame item).

I didn't experience any other problems with a variety of items selected in the debug, variables or breakpoints views.
Comment 7 Dani Megert CLA 2013-01-18 04:07:54 EST
I tried to reproduce the bug in 3.8 but was not able to reproduce it in the Variables view. However, I can reproduce it in the Debug view.

+1 since the fix was introduced in Juno and the patch is correct and low risk.


I committed the fix with updated copyright with
http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=9a0f555ab1aee02012afd995a4d6a64130af3094


I also had to increase the bundle version. This already got missed with the first part of the fix.
Fixed with http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=08ea79a6dc4d3b1bdb2a9f89832063c7f9b51a6c
Comment 8 Dani Megert CLA 2013-01-18 04:27:48 EST
(In reply to comment #7)
> +1 since the fix was introduced in Juno and the patch is correct and low
> risk.
... since the BUG ...
Comment 9 Dani Megert CLA 2013-01-25 05:55:09 EST
Verified in 4.2-M20130124-1700 and 3.8-M20130124-1500.