Bug 300001 - Event racing while initializing compare editor - garbled connecting lines
Summary: Event racing while initializing compare editor - garbled connecting lines
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-18 16:58 EST by Stephan Herrmann CLA
Modified: 2020-03-19 17:41 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot of problem (wrong range) (70.94 KB, image/png)
2017-01-13 09:32 EST, David Balažic CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-01-18 16:58:14 EST
Sometimes the compare editor for Java Elements (compare with other
element) starts with correct regions but wrong connecting lines.
(cf. bug 297316 comment 5 for the original observation).

Inspecting this in the debugger revealed the following
non-deterministic behaviour:

When running without breakpoints the problem can be reproduced.
When setting a few breakpoints the behaviour was correct.
The breakpoint that seemed to make the difference was actually
a watch point (Modification) on StyledText.verticalScrollOffset.
This leads me to the conclusion that some widgets may get painted
before the vertical scroll offset is correctly initialized.

More specifically, I could observe:
Method TextMergeViewer.handleResizeLeftRight(..) triggers method
StyledText.scrollVertical(int,boolean) thus initializing the
vertical scroll offset. However, before the method updates field
StyledText.verticalScrollOffset, a call to scroll(..) may trigger
update() which calls into the UI mainloop (gdk_window_process_updates()).
Depending on event ordering (I assume -- this happens in native code)
this may call back into doPaint() which invokes paintCenter() and
paintSides() in an inconsistent state, since the verticalScrollOffset
is used before assigned.
Comment 1 David Balažic CLA 2017-01-13 09:32:52 EST
Created attachment 266296 [details]
Screenshot of problem (wrong range)

I see this with:
Eclipse Java EE IDE for Web Developers.

Version: Neon.2 Release (4.6.2)
Build id: 20161208-0600

and

AnyEditTools	2.6.1.201602151951	AnyEditTools.feature.group	Andrey Loskutov

I compare a selection in a Java file with the Clipboard content.
Then I click the toolbar button to ignore white space.

As seen on the screenshot, the marking on the left is wrong, the diff is after the last line, not before as indicated.

It happens even if I close Eclipse and restart it and do the diff on the same data. Never noticed it elsewhere tho.
Comment 2 Eclipse Genie CLA 2020-03-19 17:41:03 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.