Recent

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

CM630

  • Hero Member
  • *****
  • Posts: 988
  • Не съм сигурен, че те разбирам.
    • 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 »
Лазар 2,2,0 32 bit; FPC3,2,2; rev: Lazarus_2_2_0 on W10 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7884
  • 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: 988
  • Не съм сигурен, че те разбирам.
    • 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 »
Лазар 2,2,0 32 bit; FPC3,2,2; rev: Lazarus_2_2_0 on W10 64bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4096
  • 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: 1976
  • 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.
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

 

TinyPortal © 2005-2018