Recent

Author Topic: Lazarus IDE freaks out  (Read 5407 times)

CM630

  • Hero Member
  • *****
  • Posts: 1197
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Lazarus IDE freaks out
« on: January 04, 2022, 08:36:44 am »
When I open the attached project and press F12 to open the form editor the IDE freaks out and it starts to increase the width of the form by itself until it gets out of range.
This happens on Lazarus 2,2,0; RC1 32 bit; FPC3,2,2; rev 65419 on W10 64bit.
Maybe I should report this as a bug?

Note: The part of the code that I have attached cannot be compiled, but it shows the issue that I have come across.
« Last Edit: January 04, 2022, 08:56:48 am by CM630 »
Лазар 4,0RC1 32 bit (sometimes 64 bit); FPC3,2,2

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus IDE freaks out
« Reply #1 on: January 04, 2022, 01:56:39 pm »
In general, it is possible to create recursive "anchor"s (AnchorSide) or AutoSize.

And, those can lead to the described behaviour.
They should be detected, and raise an exception (before the range error occurs).

I have not tested your example, but according to what you say, IMHO this should be reported as a bug.




I am not sure where your example has a circle....
But, I find it strange (and suspicious) that the Form is alBottom. IMHO that makes no sense for a form (I guess you may create it with another form as parent (using it like a TFrame?)

alBottom may affect how the form calculates its "preferred widths". And with that AnchorSides and AutoSize of child controls come into play...
But no idea how all that affects your case....


CM630

  • Hero Member
  • *****
  • Posts: 1197
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Lazarus IDE freaks out
« Reply #2 on: January 04, 2022, 02:43:04 pm »
I have just changed Align from alBottom to aiNone and now the issue does not occur (it was not set to aiBottom on purpose, btw).
I will create a bug report then.

Edit: Reported as https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39531.
« Last Edit: January 04, 2022, 03:32:15 pm by CM630 »
Лазар 4,0RC1 32 bit (sometimes 64 bit); FPC3,2,2

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: Lazarus IDE freaks out
« Reply #3 on: January 06, 2022, 02:16:16 pm »
I have just changed Align from alBottom to aiNone and now the issue does not occur (it was not set to aiBottom on purpose, btw).
In what situation should the main form's Align be alBottom? What is it supposed to do?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2032
  • Former Delphi 1-7, 10.2 user
Re: Lazarus IDE freaks out
« Reply #4 on: January 07, 2022, 06:52:06 am »
@JuhaManninen: The OP noted he had not done it on purpose - it was an accidental thing.

n7800

  • Full Member
  • ***
  • Posts: 175
Re: Lazarus IDE freaks out
« Reply #5 on: May 26, 2024, 10:25:52 am »
However, in Delphi this actually does align the form with the screen.

Also, a form can be inserted into another form (any TWinControl component) using the Parent and Owner properties. Then it will be aligned inside this component. This can be done in Lazarus, although frames are usually used for this.

 

TinyPortal © 2005-2018