Bug 324608 - [terminal] Local Terminal (plugin from incubation) has strange scrolling behaviour
Summary: [terminal] Local Terminal (plugin from incubation) has strange scrolling beha...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: Terminal (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 346965
  Show dependency tree
 
Reported: 2010-09-06 22:14 EDT by Timo A. Hummel CLA
Modified: 2011-05-24 07:09 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (2.16 KB, patch)
2011-05-19 04:54 EDT, Anton Leherbauer CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timo A. Hummel CLA 2010-09-06 22:14:47 EDT
When the local terminal tries to scroll, the lines jump around very oddly. This only happens in the local terminal, all other plugins scroll perfectly.

Local Terminal (Incubation)	0.1.0.v201006041240-10-7w312117152433	org.eclipse.tm.terminal.local.feature.group


-- Configuration Details --
Product: Eclipse 1.3.0.20100617-0520 (org.eclipse.epp.package.php.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY
Comment 1 Anton Leherbauer CLA 2010-09-07 10:23:29 EDT
The local terminal is part of TM.
Comment 2 Martin Oberhuber CLA 2010-09-07 12:17:55 EDT
Scrolling has been improved for TM 3.2.1, can you give this a try:

  - Update Site:
    http://download.eclipse.org/dsdp/tm/updates/3.2interim
  - Downloads:
    http://download.eclipse.org/dsdp/tm/downloads/drops/M20100907-0720/

If it doesn't help, please be more specific what is odd. Are you using the scrollbar handle, or scrolling by keyboard in an application like vi ? What do you find odd? What host Platform, exactly are you on (cat /etc/*-release)?
Comment 3 Timo A. Hummel CLA 2010-09-15 01:54:58 EDT
The update site didn't list a new release for the local terminal (the SDK shows an updated version). Will try the zip and report back.
Comment 4 Timo A. Hummel CLA 2010-09-15 02:46:53 EDT
I just made a video of the "odd" scrolling behaviour. Sorry I can't explain it any better. Seems that the terminal scrolls down then up sometimes.

I'm running Gentoo, no exact version information as Gentoo uses rolling releases. I have no other scrolling issues in eclipse.

For the video, use

http://www.timohummel.com/screengrab.avi
Comment 5 Michael Scharf CLA 2010-09-15 08:59:49 EDT
I looked at the video but I do not see the odd scrolling. To me it seems all normal. Can you say at which second in the video you think something goes wrong?
Comment 6 Martin Oberhuber CLA 2010-09-15 09:03:11 EDT
Clicking your link shows:

"
Windows Media Player cannot play the file. The Player might not support the
file type or a required codec might not be installed on your computer.
"

I tried on 2 different machines (Win XP, and Vista).
Any hints?
Comment 7 Anton Leherbauer CLA 2010-09-15 10:02:21 EDT
VLC can handle the video.

I think I know this effect.  I noticed it while working on the other terminal patches.  When new lines are added the view sometimes first scrolls down and then up again.  This happens very fast and is therefore hardly visible, it's just a little flicker.
Comment 8 Timo A. Hummel CLA 2010-09-15 12:21:39 EDT
The effect is best visible if you play the video at slow motion, e.g. 5 FPS or 1 FPS. Anton, yes that's the problem.
Comment 9 Timo A. Hummel CLA 2010-11-12 11:14:53 EST
Also, if your graphics driver isn't optimized (like the nv driver or nouveau), where screen updates are slower than they should, this effect is really awful, and should be fixed. In contrast, scrolling huge source files isn't a problem at all.
Comment 10 Martin Oberhuber CLA 2010-11-12 12:00:14 EST
Timo, I'm not sure whether we can carve out any dev time for this anytime soon... if this is something that you'd be able to investigate yourself, we'd be more than happy to help you in any way we can!

Assuming you have the local terminal running with Eclipse SDK, all you need is File > Import > Team : Team Project Set from http://www.eclipse.org/dsdp/tm/development/terminal-anonymous.psf and you'll be ready to build it yourself and debug.

See also
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_do_I_use_eclipse_to_develop_eclipse.3F
and
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_do_I_run_or_debug_with_my_changes.3F

Marking as "helpwanted". Thanks!
Comment 11 Timo A. Hummel CLA 2010-11-12 12:07:43 EST
Martin, I will see if I have time in the near future. As it is only a minor issue, and I'm running Linux, it is not a major problem for me, because I can run a native bash shell on a second display.
Comment 12 Martin Oberhuber CLA 2011-02-21 05:06:28 EST
CQ:WIND00254344

Toni, can you have a look at this?
Comment 13 Anton Leherbauer CLA 2011-05-19 04:54:54 EDT
Created attachment 196087 [details]
Proposed patch

This patch fixes it for me.  The problem seems to be caused by the fact that in case of a new line (typing enter), the ITextCanvasModelListener is sent terminalDataChanged() before dimensionsChanged().  When terminalDataChanged() is received in the TextCanvas, the dimensions have already changed so that scrollToEnd() computes a wrong scroll location.  The fix is to calculateGrid() before scrollToEnd().
Reversing the notification order seems to work as well, but I am not sure about other side-effects.
Comment 14 Martin Oberhuber CLA 2011-05-23 08:20:44 EDT
Release for 3.3rc2 - thanks for the patch!