This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 110160 - [70cat] Horizontal/vertical editor scroll bar flicker
Summary: [70cat] Horizontal/vertical editor scroll bar flicker
Status: RESOLVED DUPLICATE of bug 198957
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 15:01 UTC by kenneth_orr
Modified: 2011-11-01 14:02 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot - scrollbars visible (83.68 KB, image/png)
2010-02-04 14:00 UTC, malfunction84
Details
screenshot - scrollbars hidden (82.22 KB, image/png)
2010-02-04 14:00 UTC, malfunction84
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kenneth_orr 2007-07-18 15:01:56 UTC
The horizontal scroll bar in the editor flickers (that is, disappears and reappears) when the previous line extends off
the screen. It seems to only flicker when the first character is entered, and even then it doesn't happen every time.
Try the following:

1) Create a new 'Empty File'
2) Paste in the following line ensuring that the editor is not wide enough to display the entire string:

this is a really really really really long line in order to demonstrate a bug that rears its head only when such a line
is present

3) Press enter at the end of the previous line such that the cursor is directly below that line (and therefore below the
letter 't')
4) Type a single character while closely observing the horizontal scroll bar at the bottom of the editor.
5) You should observe a flicker - if not, press back space and re-enter a character.

This is not a particularly severe issue, though it is a visual annoyance.
Comment 1 Jiri Prox 2007-07-19 09:49:24 UTC
Happens in 6.0 Kubuntu Linux as well
Comment 2 Vitezslav Stejskal 2007-07-19 10:13:26 UTC
Reproducible in a dev build.
Comment 3 Jiri Prox 2008-04-11 00:45:36 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 4 Quality Engineering 2009-12-21 06:04:36 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team
Comment 5 malfunction84 2010-02-04 13:59:28 UTC
I just encountered this issue in NetBeans 6.8.  It flickers only when the file I'm editing has exactly 37 lines and when one of the lines has 112 characters.  This is running NetBeans maximized in Windows Vista at 1280x1024 (minus the taskbar height).

It seems that the vertical scroll bar automatically appears when the content's height reaches a fixed percentage of the visible window (e.g. 2/3).  Once the vertical scroll bar appears, it covers over part of the long content on line 20 (see screenshots), which causes the horizontal scroll bar to appear.

I suspect the display state of the horizontal scroll bar is taken into account by the logic which determines whether to display the vertical scroll bar.  This causes the vertical scrollbar to disappear when the horizontal scrollbar appears.  At this point, since the vertical scrollbar is no longer covering content, the horizontal scrollbar disappears too.  Then the entire process repeats.

Again, this is just my suspicion.
Comment 6 malfunction84 2010-02-04 14:00:18 UTC
Created attachment 93880 [details]
screenshot - scrollbars visible
Comment 7 malfunction84 2010-02-04 14:00:35 UTC
Created attachment 93881 [details]
screenshot - scrollbars hidden
Comment 8 jakemoffatt 2010-04-09 21:23:27 UTC
I have recorded a demo of this bug in action:
http://screenr.com/Y5M

This is win 7 maximized 1280x1024 the bug happens but as you see in the demo if i restore(shrink) the window it goes away.  Font consolas 14 if anyone cares to try and reproduce, note that i have vertical views docked and unpinned(project/navigator), views at the bottom output/version/subversion/etc.. also unpinned, editor maximized, toolbar removed and editor toolbar removed.  Also, my windows taskbar is using small icons if anyone wants to try and reproduce exact circumstances.

Hitting enter anywhere in the file makes the flickering stop but if i delete the line i hit enter on it comes back.

The bug did not Start until i reached the vertical scrollbar with the line of code that i was typing.

Switching to other files and then back does not make it go away either.
Comment 9 David Strupl 2010-09-24 07:52:14 UTC
The code handling this has changed substantially for the next release. I am marking as wontfix - if you are able to reproduce the bad behaviour in the current dev build please reopen. Also changing the component to painting and printing effectively passing the issue to Mila.
Comment 10 manikantannaren 2011-01-28 11:00:39 UTC
Happens with NB 7 Beta. I could replicate with the NB 7 Beta build 201101271430

1. I define a class which implements three interfaces.
2. Used the "Implement all Abstract methods hint" and implemented all methods (about 15 of them).
3. This caused the vertical scroll bar to flicker.  
4. Workaround: Close the document and reopen - no flicker.
Comment 11 manikantannaren 2011-01-28 11:02:54 UTC
(In reply to comment #10)
> Happens with NB 7 Beta. I could replicate with the NB 7 Beta build 201101271430
> 
> 1. I define a class which implements three interfaces.
> 2. Used the "Implement all Abstract methods hint" and implemented all methods
> (about 15 of them).
> 3. This caused the vertical scroll bar to flicker.  
> 4. Workaround: Close the document and reopen - no flicker.

Happens on Windows XP. Did not happen on my home laptop which runs Ubuntu 10.
Comment 12 Miloslav Metelka 2011-10-14 13:25:21 UTC
Could you please test on NB 7.1 Beta (there were number of fixes to view hierarchy) and if it's still happening please reopen the issue and provide the steps to reproduce. Thanks.
Comment 13 malfunction84 2011-10-24 01:25:19 UTC
(In reply to comment #12)
> Could you please test on NB 7.1 Beta (there were number of fixes to view
> hierarchy) and if it's still happening please reopen the issue and provide the
> steps to reproduce. Thanks.

I am still able to reproduce in NB 7.1 Beta.  This is the same behavior I reported in Comment #5.  Detailed steps to reproduce follow.

1.) Restore the NetBeans window so it is not maximized.  Leave some room on the bottom and right edges for resizing.  (This can be reproduced when the window is maximized, but the behavior depends on hitting a sweet spot of line height and editor window size, so restoring the window will allow us to find that point more easily, independent of screen resolution.)
2.) Create/open a file whose contents are short enough to fill only the top half of the editor window.  There should be no vertical scrollbar.  Ensure that no lines are wide enough to cause a horizontal scrollbar to appear either.
3.) Resize the right edge of the NetBeans window so the longest line of the file barely reaches the right edge.  (You can also achieve this step by adding characters to the end of one of the lines.)  There should still be no scrollbars at this point.
4.) Put the cursor at the end of the document and slowly, repeatedly press Enter to add new-lines.
5.) Stop when a vertical scrollbar appears.  A horizontal scrollbar will also appear because the vertical scrollbar covers the rightmost character from the line in Step 3.
6.) If the scrollbars are not flickering, resize the bottom edge of the NetBeans window slowly up and down to see if they start to flicker.
7.) If that doesn't work, resize the bottom edge down until both scrollbars disappear.  Then remove one newline from the file to make it shorter.  Return to step 6 and repeat until the scrollbars flicker.
8.) When the scrollbars begin flickering, place the cursor at the end of the file and try the following tests.
9.) Press backspace to remove a newline.  The flickering stops.  Both scrollbars are hidden.
10.) Press enter to add the newline back.  The flickering resumes.
11.) Press enter again to add another newline.  The flickering stops.  Both scrollbars are visible.

I've noticed that the flickering is contingent on the precise vertical height of the editor.  For me, it happens when the editor height is a few pixels shy of 47 lines.  When I add the 32nd line to the file, the flickering begins.  It may be different for you.
Comment 14 Miloslav Metelka 2011-10-26 13:10:43 UTC
Thanks for the detailed way of how to reproduce the problem. After playing with the vertical resizing I was finally able to reproduce the problem.
Comment 15 Miloslav Metelka 2011-11-01 14:02:27 UTC
The problem should be resolved by issue #198957.

*** This bug has been marked as a duplicate of bug 198957 ***