Recent

Author Topic: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files  (Read 736 times)

Muso

  • Full Member
  • ***
  • Posts: 105
Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« on: April 17, 2021, 03:22:31 am »
I ugraded a program to use new features of Lazarus 2.1.

When I now open the *.lpi file with
Lazarus 2.0.12 r64642 FPC 3.2.0 x86_64-win64-win32/win64
, I get correctly the attached dialog.

I click in this dialog on "Stop all loading".

result: Lazarus hangs and after some time Windows steps in trying to close the unresponsive program.

Can anybody else reproduce this / is this already a known bug?

Bart

  • Hero Member
  • *****
  • Posts: 4292
    • Bart en Mariska's Webstek
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #1 on: April 17, 2021, 10:29:39 am »
In the trunk version of Lazarus IDE:
Project Options->Miscallaneous->Maximize compatibility of project files

Now you can open the project in older version of Lazarus IDE

Bart

wp

  • Hero Member
  • *****
  • Posts: 8398
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #2 on: April 17, 2021, 11:04:10 am »
ParentBackground is a new property introduced in Laz trunk recently for TGroupBox (https://wiki.freepascal.org/Lazarus_2.2.0_release_notes#TGroupBox). If you set its value to false (default is true) the property is written to the lfm file. When you now load the project in Laz 2.0.12 or any other older version the streamer sees an unknown property and does not know how to continue.

The ParentBackground changes its value when you set the background color of the TGroupbox.

This is how you can solve the issue and keep compatibility between trunk and previous versions:
  • Open the project in trunk and reset the ParentBackground of that groupbox (and all other groupboxes) to true. This is the default value, and thus the property is not written to the lfm file.
  • If you need a different background color you should set this at runtime, for example in the OnCreate event of the form. This way the ParentBackground changes only at runtime and is kept out of the lfm file.
« Last Edit: April 17, 2021, 11:13:18 am by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

lucamar

  • Hero Member
  • *****
  • Posts: 4024
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #3 on: April 17, 2021, 11:14:38 am »
I don't think he has any problem with the project being "new-style" or controls properties. If I'm reading correctly he's complaining about the fact that Lazarus hangs after trying to read the project and being told to stop loading it.

Unfortunately I don't have any solution and cannot test in this machine, sorry :(
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

wp

  • Hero Member
  • *****
  • Posts: 8398
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #4 on: April 17, 2021, 11:33:03 am »
If I'm reading correctly he's complaining about the fact that Lazarus hangs after trying to read the project and being told to stop loading it.
This is exactly the behaviour of the IDE when an unknown property is contained in an lfm form. Even if the hang does not occur from time to time it is highly recommended to restart the IDE after such an occasion.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

lucamar

  • Hero Member
  • *****
  • Posts: 4024
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #5 on: April 17, 2021, 12:32:06 pm »
This is exactly the behaviour of the IDE when an unknown property is contained in an lfm form. Even if the hang does not occur from time to time it is highly recommended to restart the IDE after such an occasion.

The point is that it shouldn't be so: Since it gives you options to continue loading, partial or total cancelation, it should either honor the choice, if it can, or error out if it can't; instead it hangs and leaves you out there twidling your thumbs and waiting for something to happen.

If that isn't a bug ... let some god come and see it, as we say aroung here ;)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

wp

  • Hero Member
  • *****
  • Posts: 8398
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #6 on: April 17, 2021, 01:23:30 pm »
Yes it is an annoyance, it has been there all the time,  and IIRC even Delphi cannot recover from such a case without a restart (but this may have changed, I don't do too much Delphi nowadays).

If you provide a patch I think the devs will be glad to apply it.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Muso

  • Full Member
  • ***
  • Posts: 105
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #7 on: April 17, 2021, 01:40:01 pm »
I don't think he has any problem with the project being "new-style" or controls properties. If I'm reading correctly he's complaining about the fact that Lazarus hangs after trying to read the project and being told to stop loading it.

Yes, exactly. I am fully aware of the new properties. But when I explicitly press on "stop loading", then the loading should be stopped and not that Lazarus becomes unresponsible.

Muso

  • Full Member
  • ***
  • Posts: 105
Re: Lazarus 2.0.12 hangs on opening Lazarus 2.1dev files
« Reply #8 on: April 17, 2021, 01:47:43 pm »
  • Open the project in trunk and reset the ParentBackground of that groupbox (and all other groupboxes) to true. This is the default value


This does not work, also not for new GroupBoxes. The default is always FALSE and cannot be changed to TRUE. I opened a new thread for this bug: https://forum.lazarus.freepascal.org/index.php/topic,54190.0.html
« Last Edit: April 17, 2021, 02:48:53 pm by Muso »

 

TinyPortal © 2005-2018