View Issue Details

IDProjectCategoryView StatusLast Update
0030617LazarusLCLpublic2017-08-03 16:15
ReporterGabor Boros Assigned ToMichl  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionreopened 
Product Version1.6.1 (SVN) 
Summary0030617: TScrollBox - TControl.InvalidatePreferredSize loop detected
DescriptionStart the attached example project, click on Panel3 and see.
TagsNo tags attached.
Fixed in Revisionr55249
LazTargetpost 1.8
Widgetset
Attached Files

Relationships

related to 0007114 acknowledged Non-scrolling form/controls at design-time 

Activities

Gabor Boros

2016-09-19 08:35

reporter  

Zeljan Rikalo

2016-09-19 08:53

developer   ~0094711

Reproducable with gtk2 and qt under linux.

Michl

2017-06-05 23:11

developer   ~0100890

This isn't a bug of Lazarus.

You have anchored Panel2.Bottom to no sibling and Panel3.Top to Panel2.Bottom. When you now change the height of Panel3, that it doesn't fit in the scrollbox anymore, the scrollbox is resized. With resizing of the scrollbox, Panel2 is also resized (because its Bottom is anchored). Now Panel3.Top is moved too and Panel3 doesn't fit in the scrollbox anymore. And repeat.

To fix that issue, remove the anchoring of Panel2.Bottom.


The only thing, that need to fixed here is to prevent the IDE crash, if you change the height of Panel3 in designtime. As till now, TScrollingWincontrol scrollbars doesn't work in designtime, I disabled them in trunk revision 55249. Of course if TScrollingWincontrol scrollbars working in designtime is fixed, this workaround has to be removed and a better fix has to be found.

Please close.

Gabor Boros

2017-06-06 14:35

reporter  

position_range_overflow.png (28,336 bytes)   
position_range_overflow.png (28,336 bytes)   

Gabor Boros

2017-06-06 14:36

reporter  

Gabor Boros

2017-06-06 14:41

reporter   ~0100909

InvalidatePreferredSize problem gone after applied your suggestion. But I see an other problem with my real life application. Attached a second example project (and a screenshot) for demonstrating it. Panel1 is static, Panel2 follow the size of the form/scrollbox, Panel3 resizable by the user. If start the attached example, click on the Panel3, got "Position range overflow..." error. I am wrong again or is this a bug?

Michl

2017-06-06 16:19

developer  

test.zip (2,021 bytes)

Michl

2017-06-06 16:20

developer   ~0100912

This isn't a bug of Lazarus, see comment above.

I add a example for your needs, how I understand it, what you want.

Please close.

Gabor Boros

2017-06-06 19:21

reporter   ~0100924

Thank you for the example but do not do what I want. I start a thread on the mailing list with my problem and will close this issue.

Michl

2017-06-06 22:17

developer   ~0100927

Last edited: 2017-06-06 22:23

View 2 revisions

As I have reverted revision 55249 (it breaks scrolling in designer by setting the VertScrollBar/HorzScrollBar.Position property), the crash of the IDE needs to be prevented.

I add a simplified project, what crahes the IDE. Simple increase the height of Panel1 in designer.

Michl

2017-06-06 22:22

developer  

IDEcrash.zip (1,915 bytes)

Issue History

Date Modified Username Field Change
2016-09-19 08:35 Gabor Boros New Issue
2016-09-19 08:35 Gabor Boros File Added: ScrollBox_InvalidatePreferredSize_loop.tar.gz
2016-09-19 08:53 Zeljan Rikalo Assigned To => Mattias Gaertner
2016-09-19 08:53 Zeljan Rikalo Status new => assigned
2016-09-19 08:53 Zeljan Rikalo Note Added: 0094711
2017-06-05 22:44 Michl Assigned To Mattias Gaertner => Michl
2017-06-05 23:11 Michl Fixed in Revision => r55249
2017-06-05 23:11 Michl LazTarget => 1.8
2017-06-05 23:11 Michl Note Added: 0100890
2017-06-05 23:11 Michl Status assigned => resolved
2017-06-05 23:11 Michl Fixed in Version => 1.9 (SVN)
2017-06-05 23:11 Michl Resolution open => no change required
2017-06-05 23:11 Michl Target Version => 1.8
2017-06-05 23:20 Michl Relationship added related to 0007114
2017-06-06 14:35 Gabor Boros File Added: position_range_overflow.png
2017-06-06 14:36 Gabor Boros File Added: ScrollBox_position_range_overflow.tar.gz
2017-06-06 14:41 Gabor Boros Note Added: 0100909
2017-06-06 14:41 Gabor Boros Status resolved => assigned
2017-06-06 14:41 Gabor Boros Resolution no change required => reopened
2017-06-06 15:54 Michl Assigned To Michl =>
2017-06-06 15:54 Michl Assigned To => Michl
2017-06-06 16:19 Michl File Added: test.zip
2017-06-06 16:20 Michl Note Added: 0100912
2017-06-06 16:20 Michl Status assigned => resolved
2017-06-06 16:20 Michl Resolution reopened => no change required
2017-06-06 19:21 Gabor Boros Note Added: 0100924
2017-06-06 22:17 Michl Note Added: 0100927
2017-06-06 22:17 Michl Status resolved => assigned
2017-06-06 22:17 Michl Resolution no change required => reopened
2017-06-06 22:22 Michl File Added: IDEcrash.zip
2017-06-06 22:23 Michl Note Edited: 0100927 View Revisions
2017-08-03 16:15 Michl LazTarget 1.8 => post 1.8
2017-08-03 16:15 Michl Fixed in Version 1.9 (SVN) =>
2017-08-03 16:15 Michl Target Version 1.8 =>