Recent

Author Topic: Lazarus Release Candidate 1 of 4.0  (Read 25209 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 4.0
« Reply #45 on: October 28, 2024, 10:38:29 am »
Well, the discussion is more or less moot if fixes_3_2 is actually 3.2.2 fixes (and builds and reports as such). Which I always assumed it would but for some reason didn't for me the last couple of days.

No, fixes_3_2 applies to the 3.2.x series.

No, I have to disagree. If someone looks in the Lazarus SRC, sees a line that says {$IF FPC_FULLVERSION>=30203}  and they want to use that feature, they could, very sensibly, go to gitlab and look for a 3.2.3 branch or tag. They would only find the tag and that version will not work !

IMHO, the only reliable test would be >=30204, it is unambiguous. Or, better,  remove the 3.2.3 tag from git, it is so wrong !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #46 on: October 28, 2024, 11:01:10 am »
The single-window IDE looks fantastic - thanks for making it easily available!

There is however one issue major issue (at least on Windows) that was introduced in this commit.

How to reproduce:

1. Create a new application, add a TLazVirtualStringTree from the LazControls tab.
2. Add a couple of columns into it and set RootNodeCount to 100.
3. Everything seems fine until you run the app on a system with a higher DPI.

For example, if I did the above actions on a system with 125% scaling and then run the app on a system with 200% scaling. The item size is broken and the text is cropped, like shown in the attached screen shot. It worked correctly before the commit mentioned above. Should I file a bug report?

Can you report that on the bugtracker please?

Wallaby

  • Full Member
  • ***
  • Posts: 104
Re: Lazarus Release Candidate 1 of 4.0
« Reply #47 on: October 28, 2024, 11:44:02 am »

simone

  • Hero Member
  • *****
  • Posts: 626
Re: Lazarus Release Candidate 1 of 4.0
« Reply #48 on: October 28, 2024, 01:13:44 pm »
It's a run time error that arises after compilation, when application starts inside IDE. Outisde the IDE, application freezes at start. Call stack attached. I need further investigations...

I'm sorry I can't provide a small example that can reproduce the problem and that this makes it difficult to diagnose. However, do you think that the problem can be solved in the final version 4.0? I think it is a regression of Lazarus, since my project has always worked correctly in all versions of Lazarus starting from versions 1.x.

Thank for hard and good work.
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #49 on: October 28, 2024, 01:26:53 pm »
It's a run time error that arises after compilation, when application starts inside IDE. Outisde the IDE, application freezes at start. Call stack attached. I need further investigations...

I'm sorry I can't provide a small example that can reproduce the problem and that this makes it difficult to diagnose. However, do you think that the problem can be solved in the final version 4.0? I think it is a regression of Lazarus, since my project has always worked correctly in all versions of Lazarus starting from versions 1.x.

Well, what happens in FrmMainGUIActions.inc line 854 ? (That would be your code?)

As for why this does no happen and did not happen before, I am not sure.
But it seems you have a main menu, and menu items have actions associated to it.
So in general I would expect the OnUpdate of the action to fire when the window is about to be shown? Or maybe not?

So the question here is, was it fired before at all? Or just at a later time?


simone

  • Hero Member
  • *****
  • Posts: 626
Re: Lazarus Release Candidate 1 of 4.0
« Reply #50 on: October 28, 2024, 03:00:34 pm »
The program that presents the problem is an IDE that I created for a particular DSL that I defined. This IDE has a main menu and a toolbutton. The principal functions of the menu also have an associated button in the toolbar. Obviously I use actions to manage this situation in a unified way.

I have a function in the menu and in the toolbar (ViewCompilerMessages) that allows you to view any messages from (my) compiler. This is associated with an Action, where the Update method (ActionViewCompilerMessagesUpdate) enables or disables the related menu item and button depending on whether there are messages from (my) compiler. At startup the button starts disabled, but obviously the Update method of the relative Action is called, repeatedly, by definition. If the program is launched outside the Lazarus IDE, it freezes at startup, before showing its GUI. Here the offending code:

Code: Pascal  [Select][+][-]
  1. procedure TMainForm.ActionViewCompilerMessagesUpdate(Sender: TObject);
  2. begin
  3.   ActionViewCompilerMessages.Enabled:=MainHelper.CompilerMessageList.Count>0; // here run time error arises
  4. end;

Now here at work I can't install version 4Rc1. At home I will try to generate a small example that makes the problem reproducible, starting from the application, but I don't know if this will be possible.
« Last Edit: October 28, 2024, 03:03:39 pm by simone »
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #51 on: October 28, 2024, 04:29:16 pm »

I have a function in the menu and in the toolbar (ViewCompilerMessages) that allows you to view any messages from (my) compiler. This is associated with an Action, where the Update method (ActionViewCompilerMessagesUpdate) enables or disables the related menu item and button depending on whether there are messages from (my) compiler. At startup the button starts disabled, but obviously the Update method of the relative Action is called, repeatedly, by definition. If the program is launched outside the Lazarus IDE, it freezes at startup, before showing its GUI. Here the offending code:

Code: Pascal  [Select][+][-]
  1. procedure TMainForm.ActionViewCompilerMessagesUpdate(Sender: TObject);
  2. begin
  3.   ActionViewCompilerMessages.Enabled:=MainHelper.CompilerMessageList.Count>0; // here run time error arises
  4. end;

Can you set a breakpoint there, and run in 3.6 (or whatever 3.n version you have) and get the callstack from when it is first called?

So I can compare when it is first triggered in 3.n.


See next pos, most likely found where the new early call comes from.
« Last Edit: October 28, 2024, 04:44:04 pm by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #52 on: October 28, 2024, 04:43:25 pm »
Your problem is likely caused by https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/e762d9b69672bcf9a130255866bdd15860c99091


In your code, can you check wich object is nil?
- ActionViewCompilerMessages
- MainHelper
- MainHelper.CompilerMessageList
?

And: is this a component on your form (placed there in the designer), or something your code creates?

If your code creates it, at what time does it do so? Maybe in OnFormCreate? or OnFormShow?


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #53 on: October 28, 2024, 05:15:26 pm »
Also can you test with the following line commented out?

lcl/include/menuitem.inc
in   procedure TMenuItem.CheckChildrenHandles;
line 437
Code: Pascal  [Select][+][-]
  1.   InitiateActions; // actions may update items visibility

https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/e762d9b69672bcf9a130255866bdd15860c99091#236741ebb8d60830791f4f63d82d64a328918e63_437

Thanks

simone

  • Hero Member
  • *****
  • Posts: 626
Re: Lazarus Release Candidate 1 of 4.0
« Reply #54 on: October 28, 2024, 05:19:53 pm »
  • ActionViewCompilerMessages is an action created at design time and is not nil.
  • MainHelper is a class.
  • MainHelper.CompilerMessageList is a class var and is not nil; It is istantiated in then OnShow event handler of main form.
  • the action is associated to components ButtonViewCompilerMessages (a TToolButton) and MenuViewCompilerMessages (a TMenuItem), both created ad design time.



Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

simone

  • Hero Member
  • *****
  • Posts: 626
Re: Lazarus Release Candidate 1 of 4.0
« Reply #55 on: October 28, 2024, 05:21:29 pm »
Also can you test with the following line commented out?

lcl/include/menuitem.inc
in   procedure TMenuItem.CheckChildrenHandles;
line 437
Code: Pascal  [Select][+][-]
  1.   InitiateActions; // actions may update items visibility

https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/e762d9b69672bcf9a130255866bdd15860c99091#236741ebb8d60830791f4f63d82d64a328918e63_437

Thanks

Of course, but late at night, at home. Thanks for your precious and patient support. See you later.

Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #56 on: October 28, 2024, 05:50:28 pm »
  • ActionViewCompilerMessages is an action created at design time and is not nil.
  • MainHelper is a class.
  • MainHelper.CompilerMessageList is a class var and is not nil; It is istantiated in then OnShow event handler of main form.
  • the action is associated to components ButtonViewCompilerMessages (a TToolButton) and MenuViewCompilerMessages (a TMenuItem), both created ad design time.

Strange, if neither is nil.
Is that indeed the line of the crash?

According to https://forum.lazarus.freepascal.org/index.php/topic,69059.msg535509.html#msg535509
"read from address $0...0010" That is (highly likely) 16 bytes after a pointer to nil.
=> So that would most likely be some field 16 bytes into an object, but the object being nil.
Of course it could be some other pointer...




Did you test that with 4.0 or 3.n ?

I just run a test in 4.0 (well 4.99 but in that respect, its the same)

Quote
It is istantiated in then OnShow event handler of main form.
I recorded the following order of events in 4.0
- Form.OnCreate
- Action.OnUpdate
- Form.OnShow

show according to that order, your "MainHelper.CompilerMessageList" is not yet created? (in 4.0).

simone

  • Hero Member
  • *****
  • Posts: 626
Re: Lazarus Release Candidate 1 of 4.0
« Reply #57 on: October 28, 2024, 06:52:19 pm »
Now my tests with Lazarus 3.X. Later I will repeat with version 4.
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

kegge13

  • New Member
  • *
  • Posts: 46
    • the BistroMath project
Re: Lazarus Release Candidate 1 of 4.0
« Reply #58 on: October 28, 2024, 08:45:31 pm »
Thanks for the good work. My major project did compile and run without any problems. I wil check the release notes carefully the coming days. 8-)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Lazarus Release Candidate 1 of 4.0
« Reply #59 on: October 28, 2024, 08:50:09 pm »
Has anyone succeeded in installing a component in Lazarus 4.0 RC1? I've tried this test package in Lazarus 4.0 RC1 for macOS and the package builds okay but doesn't appear on the component palette. The same package works in 3.99

I've written more about this at https://forum.lazarus.freepascal.org/index.php/topic,69090.msg535758/topicseen.html#new
"It builds... ship it!"

 

TinyPortal © 2005-2018