Bug 338589 - [Memory Browser] view doesn't persist list of memory tabs in launch configuration
Summary: [Memory Browser] view doesn't persist list of memory tabs in launch configura...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-memory (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 16:20 EST by Norman Yee CLA
Modified: 2020-09-04 15:19 EDT (History)
5 users (show)

See Also:


Attachments
Patch for this bug plus a small change to my fix for Bug 338545 (14.89 KB, patch)
2011-03-03 15:54 EST, Norman Yee CLA
no flags Details | Diff
Updated patch because of a fix I made to Bug 338545. (17.33 KB, patch)
2011-03-07 10:20 EST, Norman Yee CLA
no flags Details | Diff
Updated patch because of a fix I made to Bug 338545 (17.03 KB, patch)
2011-03-07 10:25 EST, Norman Yee CLA
no flags Details | Diff
Modified previous patch to compile and work. (17.30 KB, patch)
2011-03-07 15:02 EST, Randy Rohrbach CLA
no flags Details | Diff
Updated patch to create tabs in a callable instead of a runnable. (18.64 KB, patch)
2011-03-08 16:39 EST, Norman Yee CLA
no flags Details | Diff
Updated patch to include fix for "Widget is diposed" exception in bug 338545 (18.59 KB, patch)
2011-03-09 12:58 EST, Norman Yee CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Norman Yee CLA 2011-03-01 16:20:04 EST
Build Identifier: I20110127-2034

If you open a bunch of memory tabs in the memory browser view, terminate the launch, and then re-launch the configuration, I was expecting to see the same memory tabs re-opened, but the memory view is empty after a re-launch.  This would save the user the trouble of re-opening the memory tabs each time he re-launches the debug configuration.

Reproducible: Always

Steps to Reproduce:
1. launch a debug configuration
2. open a memory browser view
3. type an address like 0 in the address bar and press the Go button.  A tab showing memory from address 0 onward is now visible.
4. type a different address like 1000 in the address bar and press the New Tab button.  A tab showing memory from address 1000 onward is now visible.
5. terminate the launch
6. re-launch the same debug launch configuration.  The memory browser view is empty (no open tabs).  I was expecting the previously open tabs to re-appear.
Comment 1 Norman Yee CLA 2011-03-03 15:54:48 EST
Created attachment 190309 [details]
Patch for this bug plus a small change to my fix for Bug 338545
Comment 2 Norman Yee CLA 2011-03-07 10:20:49 EST
Created attachment 190556 [details]
Updated patch because of a fix I made to Bug 338545.
Comment 3 Norman Yee CLA 2011-03-07 10:25:00 EST
Created attachment 190557 [details]
Updated patch because of a fix I made to Bug 338545
Comment 4 Randy Rohrbach CLA 2011-03-07 15:02:15 EST
Created attachment 190595 [details]
Modified previous patch to compile and work.
Comment 5 Randy Rohrbach CLA 2011-03-07 15:02:53 EST
Norman

   I tried this patch without success. First of all there were
   compilation errors because your Java compiler is 1.6 based.
   So things like 

     String memento ;

     if ( memento.isEmpty() ) 

   do not compile.

   It also was not working because of runtime exceptions in the
   createMemoryTabsFromMemento(...) routine. The call to

      fGotoAddressBar.addExpressionToHistory(...);
      performGo(true, address, finalMemorySpace);

   caused exceptions to occur. Perhaps this is because I am using
   1.5 and you were using 1.6. It was complaining about the threading
   not matching. So I added a runnable to make sure those operations 
   are in the UI dispatch thread.

   Once this was done it seemed to work much better. I have created a
   a new patch with these changes. Please check to insure my changes
   are correct.

Randy
Comment 6 Norman Yee CLA 2011-03-07 16:39:19 EST
Randy, I tried your patch and your changes look ok to me!
Comment 7 Norman Yee CLA 2011-03-08 16:35:30 EST
After some more testing, I found out that putting the tab creation code in a runnable didn't work because it wasn't catching the failures.

In our debug model, sometimes the active context is one from which you can't read memory and creating a tab fails in this case.  My patch keeps trying to restore the tabs until a valid context is passed to handleDebugContext().

The fix was to put the tab creation code in a callable instead.  I'll update the patch.
Comment 8 Norman Yee CLA 2011-03-08 16:39:36 EST
Created attachment 190704 [details]
Updated patch to create tabs in a callable instead of a runnable.
Comment 9 Norman Yee CLA 2011-03-09 12:58:07 EST
Created attachment 190778 [details]
Updated patch to include fix for "Widget is diposed" exception in bug 338545
Comment 10 Eclipse Genie CLA 2016-11-08 14:18:19 EST
New Gerrit change created: https://git.eclipse.org/r/84694
Comment 11 Marc Khouzam CLA 2016-11-08 14:26:11 EST
Does it make sense to re-open tabs on addresses that may not represent the same things in the next debug session?
Comment 12 Jonah Graham CLA 2016-11-08 14:40:53 EST
(In reply to Marc Khouzam from comment #11)
> Does it make sense to re-open tabs on addresses that may not represent the
> same things in the next debug session?

Yes, I think so. While sometimes it may move, I think the common use case would be relaunching with the same executable. In addition the use case of pointing memory at mem mapped registers makes this valuable. Finally, I think the pain of having to close (or change address on)  a few addresses that are not relevant anymore is less than losing all settings.
Comment 13 Marc Khouzam CLA 2016-11-08 15:22:09 EST
(In reply to Jonah Graham from comment #12)
> (In reply to Marc Khouzam from comment #11)
> > Does it make sense to re-open tabs on addresses that may not represent the
> > same things in the next debug session?
> 
> Yes, I think so. While sometimes it may move, I think the common use case
> would be relaunching with the same executable. In addition the use case of
> pointing memory at mem mapped registers makes this valuable. Finally, I
> think the pain of having to close (or change address on)  a few addresses
> that are not relevant anymore is less than losing all settings.

Sounds good.
Comment 14 Eclipse Genie CLA 2016-12-12 10:08:09 EST
New Gerrit change created: https://git.eclipse.org/r/86958
Comment 15 Jonah Graham CLA 2017-04-18 05:26:09 EDT
(In reply to Eclipse Genie from comment #14)
> New Gerrit change created: https://git.eclipse.org/r/86958

That version was abandoned. Correct one is from Comment 10: https://git.eclipse.org/r/84694