Recent

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

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Lazarus Release Candidate 1 of 4.0
« Reply #60 on: October 28, 2024, 09:23:57 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

Here's a possible clue as to what's going on here. I put in a ShowMessage in the Register procedure...
Code: Pascal  [Select][+][-]
  1. unit testEdit;
  2.  
  3. {$mode ObjFPC}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
  9.  
  10. type
  11.   TtestEdit = class(TEdit)
  12.   end;
  13.  
  14. procedure Register;
  15.  
  16. implementation
  17.  
  18. procedure Register;
  19. begin
  20.   RegisterComponents('Test',[TtestEdit]);
  21.   ShowMessage('Register called');
  22. end;
  23.  
  24. end.
  25.  

The 'Register called' message appears when 3.99 restarts, but does not appear when 4.0 RC1 restarts, suggesting that the Register procedure is not being called...
« Last Edit: October 28, 2024, 09:25:56 pm by carl_caulkett »
"It builds... ship it!"

simone

  • Hero Member
  • *****
  • Posts: 626
Re: Lazarus Release Candidate 1 of 4.0
« Reply #61 on: October 28, 2024, 09:27:01 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.

Good news: Commenting out this line, the problem is solved! Congratulations Martin!
Note that in my installation is line #445.

About what is nil:

In Lazarus 4.0:

Code: Pascal  [Select][+][-]
  1. procedure TMainForm.ActionViewCompilerMessagesUpdate(Sender: TObject);
  2. begin
  3.   writeln(Assigned(ActionViewCompilerMessages));     //True
  4.   writeln(Assigned(MainHelper.CompilerMessageList)); //False
  5.   ActionViewCompilerMessages.Enabled:=MainHelper.CompilerMessageList.Count>0; //offending line
  6. end;

In Lazarus 3.6:

Code: Pascal  [Select][+][-]
  1. procedure TMainForm.ActionViewCompilerMessagesUpdate(Sender: TObject);
  2. begin
  3.   writeln(Assigned(ActionViewCompilerMessages));     //True
  4.   writeln(Assigned(MainHelper.CompilerMessageList)); //True
  5.   ActionViewCompilerMessages.Enabled:=MainHelper.CompilerMessageList.Count>0; //offending line
  6. end;
« Last Edit: October 28, 2024, 09:32:58 pm by simone »
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Lazarus Release Candidate 1 of 4.0
« Reply #62 on: October 28, 2024, 11:41:38 pm »
* Mac Mini M1
* macOS 14.6.1
* Lazarus 4.0 RC1
* FPC 3.3.1

Another problem with 4.0 RC1 on macOS seems to be that you cannot use the mouse to position the cursor in the text editor when the text editor is undocked, making common mouse operations such as selection, copy and paste impossible! This is when the IDE options have been chosen as the modern docked style, but when, sat, the text editor has been temporarily undocked. This is a relatively minor matter, though, and pales into insignificance beside the issue of not being able to install new components, which I notice extends to Package -> Install/Uninstall Packages, and Online Package Manager :o !
« Last Edit: October 28, 2024, 11:43:54 pm by carl_caulkett »
"It builds... ship it!"

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 4.0
« Reply #63 on: October 28, 2024, 11:58:09 pm »
...the issue of not being able to install new components, which I notice extends to Package -> Install/Uninstall Packages, and Online Package Manager :o !

As I have said several times Carl, you need to be be able to build Lazarus. If thats not working, you have an underlying problem that will definitely bite you sooner or later.

(Installing a new component involves rebuilding the Lazarus IDE)

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 #64 on: October 29, 2024, 12:09:46 am »
Didn't Carl manage to rebuild eventually?

Though, all the "gone wrong" attempts may have left scars.

If the fpc install is working now, then do a really clean build. At the very minimum check the "clean all" radio button in "Configure build Lazarus".
Even better, remove all the .ppu and .o files from your lazarus dir (NOT the fpc dir), and from within your primary config path (~/.lazarus by default).

If the build then succeeds, then at least that issue is solved.


If you are using fpc 3.3.1 (I am not not sure which one you ended up with) then there is always the chance you have a bad revision of fpc. At the very least build with -O- (no optimization).
If you have 3.2.2 or 3.2.3 then that should not be an issue.


For OPM also consider cleaning the OPM dir in the primary config path (or run the IDE with a new empty pcp). Just in case there are older versions of those packages.

Of course, if there are upgrade issues, it may be good to identify them. But that requires to first know that it works on a new and clean install.
(you can keep backups of the old, and check later)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Lazarus Release Candidate 1 of 4.0
« Reply #65 on: October 29, 2024, 12:51:09 am »
As I have said several times Carl, you need to be be able to build Lazarus. If thats not working, you have an underlying problem that will definitely bite you sooner or later.

Yes, I understand that! I can build Lazarus from the Tools menu with both 3.99 and 4.0 RC1. Neither of them successfully restart Lazarus at rhe end of the build because somehow my startlazarus loaders in both have become borked, Nevertheless, components install when I manually restart 3.99 but they don't when 4.0 RC1 is manually restarted,

(Installing a new component involves rebuilding the Lazarus IDE)

Again, yes, I understand that. I've been writing and installing components in Lazarus for several years now, plus I have component wriiting experience in Delphi dating back to 1996 ;)

"It builds... ship it!"

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Lazarus Release Candidate 1 of 4.0
« Reply #66 on: October 29, 2024, 01:13:41 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
I totally agree to the latter. For sure it is confusing.

Though a removal would be something for the FPC team (not Lazarus) ?

In other news: you were correct in that I was wrong being unable to build fixes_2_4 so my sincere apologies for having wasted your time.

It turned out that in my usual build script that I use I've made some recent modifications and one of them wrongfully manipulated the version number(s) of the checkout tag. The other machine where building fixes_2_4 worked right from the start did not include these modifications.

Sorry for the noise and to dbannon for having wasted his time.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 4.0
« Reply #67 on: October 29, 2024, 02:26:33 am »
Yes, I understand that! I can build Lazarus from the Tools menu with both 3.99 and 4.0 RC1. Neither of them successfully restart Lazarus at rhe end of the build because somehow my startlazarus loaders in both have become borked, Nevertheless, components install when I manually restart 3.99 but they don't when 4.0 RC1 is manually restarted,

Rebuilding Lazarus from within the IDE rebuilds only the IDE. Not all the units. As Martin mentioned, there is a "Clean All" button in "Configure Lazarus Build", I did not know that so don't know how it works, but sounds promising. Sure worth trying (but I prefer the command line). You did say you could not use "make useride", your startlazarus is broken. So, there is still something wrong. And things like that are often the tip of an iceberg, one little hint of a bigger problem.

Its worth considering that you are possibly the first person to tread this path (aarch64, MacOS, cross compiling, FPC-main (!!) and Lazarus 4.0). If you are, and you want the problems fixed (as we all do) its probably up to you to drill down and find what they really are. Work-arounds will not provide a long term fix.

You "should" be able to download the source into a clean directory, unzip it, change into it and run "make bigide". That would make absolutely no changes to your existing setup, do it just for the exercise, blow that dir away when you are finished if you must. Its such a simple and transparent process compared to picking apart an official distribution or using fpcupdelux. Both are good but lack transparency when you need to understand what is happening.

And if that fails, then there is, somewhere, a problem.  I'd like to see your fpc.cfg file for example, but you may not, now, even be sure which one you are using !   (hint : fpc -vh ).

Quote from: TRon
Sorry for the noise and to dbannon for having wasted his time.
Nonsense !  It was a good exercise, we found a real problem in 4.0, other people, sooner of later would also be bitten.

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

georgebou

  • New Member
  • *
  • Posts: 47
Re: Lazarus Release Candidate 1 of 4.0
« Reply #68 on: October 29, 2024, 12:27:02 pm »
Nice work guys.
It looks even more professional now :)

Keep up good work.

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Lazarus Release Candidate 1 of 4.0
« Reply #69 on: October 29, 2024, 01:01:05 pm »
Rebuilding Lazarus from within the IDE rebuilds only the IDE. Not all the units. As Martin mentioned, there is a "Clean All" button in "Configure Lazarus Build", I did not know that so don't know how it works, but sounds promising. Sure worth trying (but I prefer the command line). You did say you could not use "make useride", your startlazarus is broken. So, there is still something wrong. And things like that are often the tip of an iceberg, one little hint of a bigger problem.

Its worth considering that you are possibly the first person to tread this path (aarch64, MacOS, cross compiling, FPC-main (!!) and Lazarus 4.0). If you are, and you want the problems fixed (as we all do) its probably up to you to drill down and find what they really are. Work-arounds will not provide a long term fix.

As I mention in this thread https://forum.lazarus.freepascal.org/index.php/topic,69090.msg535869/topicseen.html#new, I suspect that there isn't a problem with Lazarus 4.0rc1 per se, rather problems with the lazarus-darwin-aarch64-4.0RC1.zip download found on https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.0RC1/.

Let's see if the rebuild from source works ;)
"It builds... ship it!"

Zoran

  • Hero Member
  • *****
  • Posts: 1882
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Lazarus Release Candidate 1 of 4.0
« Reply #70 on: October 29, 2024, 08:57:53 pm »
I installed and tried the announced new ide addon LazMinimap and found two bugs.

After installing the LazMinimap package, the code editor shows the minimap. Also, in standard IDE Options dialog, you'll find a new node "minimap", under the "Editor" section.

Bug 1:
Open the options dialog (open it from main menu, not by right-clicking in code editor, for the reasons see the bug 2 bellow) and select "minimap" node in the tree view on the left. On the right side, on the top there is the checkbox "Show minimap", which is checked.
Now do the following:
  - Uncheck it and click ok. Nothing happens, minimap is still in the editor.
  - Close the project. You are in project wizzard dialog now. Do not close the ide.
  - Open the project again (or select "new project").
You get Access violation!

Bug 2.
With minimap shown, open the editor options by right-clicking in code editor. Select minimap node. The check box "Show minimap" is not checked.
Furthermore, not only is it unchecked, but checking/unchecking it seems to have absolutely no effect.
However, if you open the options dialog from the main menu, it is checked and you can uncheck it, which will hide the minimap after restarting the ide (with possible AV mentioned above).

Tested in Windows 10 64-bit, 32-bit IDE, fixes 4 branch, fpc 3.2.2.
« Last Edit: October 29, 2024, 09:03:04 pm by Zoran »

Zoran

  • Hero Member
  • *****
  • Posts: 1882
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Lazarus Release Candidate 1 of 4.0
« Reply #71 on: October 29, 2024, 09:37:14 pm »
I installed and tried the announced new ide addon LazMinimap and found two bugs.
...

Reported — #41213 and #41212

benohb

  • Full Member
  • ***
  • Posts: 218
Re: Lazarus Release Candidate 1 of 4.0
« Reply #72 on: October 29, 2024, 11:50:16 pm »
-There are a lot of problems since version 2.0 I think.

1- all os / gui
Put two buttons on the window.
Button1 Align = alNone
Button2 Align =  alLeft
Select  Button1 and Button2 . Try moving them on the window (by mouse).. it will get crazy


2-GTK2
-Put PageControl1 (+TabSheet1 +TabSheet2)
-Put Panel1 on "Form1"  And move it in front of the PageControl1

-Try changing the tab between window tabs abSheet1  TabSheet2.
  The Panel1 will disappear and go back. (Z-order 0)
« Last Edit: October 29, 2024, 11:53:21 pm by benohb »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 4.0
« Reply #73 on: October 30, 2024, 12:24:43 am »
-There are a lot of problems since version 2.0 I think.

1- all os / gui
Put two buttons on the window.
Button1 Align = alNone
Button2 Align =  alLeft
Select  Button1 and Button2 . Try moving them on the window (by mouse).. it will get crazy


I tried this on 1.8,  2.0.12,  2.2.6 and 4rc1
When selecting both buttons, and moving them, button 1 becomes bigger and bigger until it covers the whole form. (It shrinks if the mouse goes to the left of the window)
The mouse must be moved very slow, or the sizes will immediately sky rocket.

At least on Windows that happens for all versions.

It's a problem non the less, please report.

Btw, it sounds your 2.0 behaves different? How?



GTK, I have to test later.

benohb

  • Full Member
  • ***
  • Posts: 218
Re: Lazarus Release Candidate 1 of 4.0
« Reply #74 on: October 30, 2024, 01:15:00 am »

Quote
Btw, it sounds your 2.0 behaves different? How?

I am currently using Laz3.6   
The problem appears differently. But the result I know it is used a  relative value  not reference point .I mean point 0x 0y of Form1 for every object on the window


 

TinyPortal © 2005-2018