[Lazarus] strange bug in source editor, disappearing scroll bar

Bernd Kreuss prof7bit at googlemail.com
Sat Nov 6 14:11:23 CET 2010


On 04.11.2010 12:16, Martin wrote:
> I cant do anything at present as I am away over the week.
> 
> I recommend to put some debugln code into :
> 1) \SynEdit.UpdateScrollbars .
> at least to output some log msg when synedit actually sets the visibilty 
> of the scrollbar => so we know if synedit did hide them, or the lcl
> 
> 2) also put debugln into the resize mesage handler, in synedit. so you 
> know if a resize msg was received. including the size of the clientrect

After recompiling Lazarus it does not happen anymore. It happened with
two different win32 snapshots (with 2.5.1 compiler) that I downloaded
but after re-building Lazarus it is gone, I tried a few different
compiler options with and without optimizations but I could not
reproduce it anymore.

It didn't look like a simple repaint problem, It looked more like it was
re-calculating the height of the scroll area, for half a second after i
pressed enter on this line the scrollbar slider rapidly moved up and
down a few pixels and also changed size (like it would look when you
rapidly insert and remove items in a list) and then it disappeared.

When using the hide/show line numbers method to  trigger the bug and
started scrolling with the scrollbar slider (click the slider and drag
it) the whole scrollbar did flicker and was visible only when moving the
mouse but it scrolled correctly. After releasing the button i could not
click it anymore.

** It looks like it is hidden when it should be shown and shown during
the re-calculation when when it should be hidden. **

Since it is gone after re-compiling it might also be a compiler bug.

(similar to the one that recently gave me headaches when it messed up
the implicit casting of Boolean to LongBool, False suddenly became True
sometimes, depending on what happened to be in the eax register before.)




More information about the Lazarus mailing list