Bug 74559 - [README] Memory View does not scroll properly on Linux
Summary: [README] Memory View does not scroll properly on Linux
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 579212 (view as bug list)
Depends on: 74739 81264
Blocks:
  Show dependency tree
 
Reported: 2004-09-22 10:57 EDT by Samantha Chan CLA
Modified: 2022-03-10 20:29 EST (History)
4 users (show)

See Also:


Attachments
patch to org.eclipse.debug.ui (24.98 KB, patch)
2005-01-05 15:32 EST, Samantha Chan CLA
no flags Details | Diff
patch to org.eclipse.debug.ui (24.98 KB, patch)
2005-01-05 15:33 EST, Samantha Chan CLA
no flags Details | Diff
patch to org.eclipse.debug.ui (68.85 KB, patch)
2005-05-07 18:41 EDT, Samantha Chan CLA
no flags Details | Diff
patch to org.eclipse.jdt.doc.user (2.58 KB, patch)
2005-05-07 18:42 EDT, Samantha Chan CLA
no flags Details | Diff
patch to org.eclipse.debug.ui (68.83 KB, patch)
2005-05-07 19:04 EDT, Samantha Chan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samantha Chan CLA 2004-09-22 10:57:34 EDT
When scrolling the memory view, the view sometimes get locked and does not 
allow the user to scroll.

After the memory view is scrolled up and down, the top visible address is moved 
unexpectedly as the user steps.

The view does not automatically get more content as the user scrolls to the end 
of the buffer.
Comment 1 Samantha Chan CLA 2004-09-22 11:03:02 EDT
Running Redhat Enterprise Edition 3, GTK
Comment 2 Samantha Chan CLA 2004-09-23 10:25:16 EDT
Sorry... marked the wrong bug, this bug depends on 74739 instead.
Comment 3 Darin Wright CLA 2004-09-23 12:12:23 EDT
Samantha, is this actually a bug in the memory view, or a duplicate of bug 
74739?
Comment 4 Samantha Chan CLA 2004-09-23 13:23:28 EDT
The Memory View is not working properly on Linux because I am not getting the 
correct value of top index from the table.

If there is no way of getting around the problem, I will have to put some fixes 
in the Memory View to make it work properly.

Comment 5 Samantha Chan CLA 2005-01-05 15:32:31 EST
Created attachment 16951 [details]
patch to org.eclipse.debug.ui

I have implemented the workaround as suggested by the SWT Team.
The only side effect to the workaround is that sometimes the Memory View does
not resize properly.  The view has to be closed and reopened in order to get
around the problem.  

The workaround provided marked improvements for the Memory View on Linux GTK. 
The view no longer runs into infinite loops.  The user is now able to scroll
the memory view to look at different sections from the memory block.

The patch included a linuxWorkAround function from MemoryViewUtil.  The
workaround is to run an event loop and dispatch all events currently queued on
the UI Thread.	The event loop is only run if Eclipse is running on Linux GTK. 
So other platforms are not affected by the workaround.	The event loop is run
whenever the memory view tab sets or gets the top index from the table.  It
ensures that the top index returned by the table is correct.

Outstanding problem on Linux GTK:
* The table may move to a different top address unexpectedly as the memory
block is updated.
* The table may move to a different top address unexpectedly as the user
changes the column size. 
* The memory view does not resize properly.  The event loop suggested by the
SWT Team caused the resize to fail.
Comment 6 Samantha Chan CLA 2005-01-05 15:33:40 EST
Created attachment 16952 [details]
patch to org.eclipse.debug.ui

I have implemented the workaround as suggested by the SWT Team.
The only side effect to the workaround is that sometimes the Memory View does
not resize properly.  The view has to be closed and reopened in order to get
around the problem.  

The workaround provided marked improvements for the Memory View on Linux GTK. 
The view no longer runs into infinite loops.  The user is now able to scroll
the memory view to look at different sections from the memory block.

The patch included a linuxWorkAround function from MemoryViewUtil.  The
workaround is to run an event loop and dispatch all events currently queued on
the UI Thread.	The event loop is only run if Eclipse is running on Linux GTK. 
So other platforms are not affected by the workaround.	The event loop is run
whenever the memory view tab sets or gets the top index from the table.  It
ensures that the top index returned by the table is correct.

Outstanding problem on Linux GTK:
* The table may move to a different top address unexpectedly as the memory
block is updated.
* The table may move to a different top address unexpectedly as the user
changes the column size. 
* The memory view does not resize properly.  The event loop suggested by the
SWT Team caused the resize to fail.
Comment 7 Darin Wright CLA 2005-01-10 17:19:31 EST
Applied patch.
Comment 8 Darin Wright CLA 2005-01-11 08:46:08 EST
Verified.
Comment 9 Samantha Chan CLA 2005-04-28 10:50:41 EDT
As requested by SWT Team, I have to remove the work-around for the Linux GTK 
problem.  And there is no other work-around for the scrolling problems.  

I have to find a way to make sure the Memory View works reasonably well under 
Linux GTK.
Comment 10 Samantha Chan CLA 2005-05-02 21:50:23 EDT
To allow users to work with the Memory View on Linux GTK, I propose to add a 
new preference to let users turn auto-loading on/off in table renderings. Auto-
loading means that a table rendering will automatically load/ask for more 
memory from a debug target as the user scrolls and reaches the top or bottom of 
the table.  (Auto loading in broken in the table rendering because the 
rendering cannot reliably determine the top index of the table nor can it set 
the table to a specific top index.)

The proposed auto loading preference will be turned on by default on all 
platforms except for Linux GTK.

If the auto loading preference is on, the rendering loads more memory 
automatically as the scrollbar reaches the top or bottom of the table.

If the preference is off, the rendering does not automatically load more memory 
based on its scrollbar location.  When the scrollbar reaches the top/bottom of 
the table, the user cannot continue to scroll.  To get to next/previous 
segments of memory, the rendering provides two actions, Next Page and Previous 
Page.  The Next Page action loads the next segment of memory into the view.  
Similarly, the Previous Page action loads the previous segment of memory into 
the view.  There will also be a preference to allow user to configure the page 
size.  Page size is the number of lines that the table rendering is supposed to 
monitor or load when the Memory View is in non-auto-loading mode.

The fix is all internal and does not affect APIs.
Comment 11 Darin Wright CLA 2005-05-02 22:45:03 EDT
CC'ing John W for PMC approval. We want to add a feature to work around a bug 
on Linux GTK. The feature is a preference that disables auto-loading of memory 
segments from a debug target as the user scrolls in the memory view. The 
feature requires no public API.

Without the feature, we would have to doc that the memory view does not work 
on Linux GTK. This is due to a bug in Linux GTK that is not yet fixed (see bug 
74739, and comment 17), that SWT cannot work around.
Comment 12 Samantha Chan CLA 2005-05-07 18:41:16 EDT
Created attachment 20803 [details]
patch to org.eclipse.debug.ui

* Added preference to turn auto-loading on / off
* Added preference to allow user to control the page size
* Added action in the Memory View to invoke the preference dialog
* Added Next Page & Prev Page actions to allow user to scroll
* Added new synchronization property (internal) to allow table renderings to
synchronize the address at the beginning of the page.
* Removed DefaultColumnSizeDialog and DefaultColumnSizePrefAction.  The dialog
is grouped to the new preference page.
* Removed the Linux GTK workaround.
Comment 13 Samantha Chan CLA 2005-05-07 18:42:33 EDT
Created attachment 20804 [details]
patch to org.eclipse.jdt.doc.user

* Added F1 help for new actions and preference page.
* Removed F1 help for default column size dialog and action.
Comment 14 Samantha Chan CLA 2005-05-07 18:43:39 EDT
Darin -
Please apply patch.
Thanks...
Samantha
Comment 15 Samantha Chan CLA 2005-05-07 19:04:43 EDT
Created attachment 20805 [details]
patch to org.eclipse.debug.ui

Sorry... attached the wrong patch...
Comment 16 Darin Wright CLA 2005-05-09 09:11:28 EDT
Applied patches.
Comment 17 Darin Wright CLA 2005-05-12 14:58:26 EDT
Verified.
Comment 18 Samantha Chan CLA 2005-05-12 15:17:08 EDT
Hi Darin -

We also need a readme item for Linux that the Memory View does not scroll 
properly if auto-scroll is turned on.

Thanks...
Samantha
Comment 19 Jonah Graham CLA 2022-03-10 20:29:48 EST
*** Bug 579212 has been marked as a duplicate of this bug. ***