Recent

Author Topic: Lazarus Release Candidate 2 of 4.0  (Read 33588 times)

baldzhang

  • New Member
  • *
  • Posts: 44
Re: Lazarus Release Candidate 2 of 4.0
« Reply #90 on: January 30, 2025, 05:05:03 pm »
According to the log you started the IDE as root - why? Are you working on a daemon?
The IDE is a normal gui app.

The log says  it uses /opt/laz40 as the fpc sources. Looks wrong. Did the IDE warn?

I'm working on a lot of daemons  >:D , and associated mgmt UI, all fpc/lazarus

IDE startup with setup showing first, and red (!) before fpc source item

BTW: is there any setting to let debugger directly pass signals to app? ex: CTRL+C


Had such errors with trunk lazarus qt5, but it's fixed by martin not so long time ago (this year definitelly, maybe 2-3 weeks ago).

tested with trunk branch by the same operations, here is result: log attached.

Lazarus 4.99 (rev main_4_99-1048-gf31e2eaaa5) FPC 3.2.2 x86_64-linux-qt5

rm -fr /path/to/previous-config-dir

1st run:
  setup:
   fpc source: not found
   debugger: not set
   ide layout: set to docked manually

start ide -> exception raised:
tty-output:
   QWidget::repaint: Recursive repaint detected

'OK' -> 2nd exception -> 'OK' -> crashed
tty-output:
   An unhandled exception occurred at $000000000057254B:
   EDivByZero: Division by zero
     $000000000057254B
     $000000000061C0DB
     $00000000004382DB
     $000000000061CD2B
     $00000000004382DB
     $0000000000533031
     $0000000000483604
     $000000000047E869
     $000000000043CB67
     $00000000004267BF


2nd run:
   upgrade configuration popup
   setup: fpc-source not set
   after 2 exceptions: ide run, NOT docked

set docked and restart, looks all good now

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10900
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #91 on: January 30, 2025, 05:24:18 pm »
It would be good if you could build your IDE with debug info => so traces would have line numbers.



I saw one issue in one of the logfiles that I was able to trace to a source line.

There is a check on the correctness of a canvas-handle -ish... While it has worked fine for a decade, I don't know if QT does always fulfil the check (while QT may still have returned a valid result, but different to expectation). Depending on that, it might be that the "not expected" result would actually work.
While I am trying to get info on that, you could try without the check.

Open the file components\synedit\syntextdrawer.pp
LINE 915

at the END OF "procedure TheFontStock.SetStyle(Value: TFontStyles);"

Code: Pascal  [Select][+][-]
  1.   if hOldFont<>FCrntFont then
  2.     RaiseGDBException('TheFontStock.SetStyle LCL interface lost the font');

Simple comment that statement out, then rebuild the IDE.



Mind that the logs show at least one other crash, that may not be related to that (or if related may be the cause, rather than being caused...). So there may still be issues, but question is, if commenting this out makes any difference. (Check if the editor / including the previews for display settings in the options / does display correctly, including bold text.)

baldzhang

  • New Member
  • *
  • Posts: 44
Re: Lazarus Release Candidate 2 of 4.0
« Reply #92 on: January 30, 2025, 06:02:16 pm »
syntextdrawer.pp L915 commented, no obvious changes found yet.

rebuild from Tools->Build Lazarus to "Debug IDE", run with delete all configs before for several times,
about 50% there is exceptions when search fpc-src, log and heap-trace attached for each case.

generally I build from cmdline by "make bigide LCL_PLATFORM=qt5", how to pass extra flags? ex: "-gl -gh"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10900
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #93 on: January 30, 2025, 06:42:16 pm »
generally I build from cmdline by "make bigide LCL_PLATFORM=qt5", how to pass extra flags? ex: "-gl -gh"

IIRC
OPT=" -gl -gw -gh "

If you get into the IDE, without crash, you can also rebuild from "Configure build Lazarus"

Hansvb

  • Hero Member
  • *****
  • Posts: 754
Re: Lazarus Release Candidate 2 of 4.0
« Reply #94 on: January 30, 2025, 08:01:11 pm »
Hi Martin,
I did some testing but do not know know how to make a log while doing something in Lazarus. But this is what goes wrong within Codetools options, I can reproduce it on my pc.

Lazarus RC4.0RC2
Windows 11 64-bits, 32,0 GB memory, i9-12900HK.


Install Lazarus, first create a folder: C:\Lazarus_4rc2, start the Exe file, make it a secondary installation.
Create a new folder: C:\Lazarus_4rc2\Config\    and use this for the config files.

Start Lazarus, menu, Tools, Options... --> codetools are good. click Cancel.
Right click on the Source editor, options, --> codetools are good. click Cancel.
Close Lazarus and the options will be good. So far so good.


Start Lazarus, choose menu, Tools, Options..., goto identifier completion and check Automatically invoke on typing. (So make a change in the options).
Apply, ok.
Make form1 a bit larger so that a change is triggered and then close the project without saving.  <-- this seems important to trigger some kind of fault.
Start Lazarus again.
1: Now right click on the Source editor, options, --> codetools are empty!!!
2: Don't change anything, goto menu, Tools, Options... --> codetools are good!!! ???

If i choose apply at 1: when the code tools are empty when accessed from the source editor then the codetools are also empty when i open them from the menu. I must have done this earlier this week because I always switch between opening the options from the menu and from the source editor and if you are not in the code tools section you do not notice they are empty.

I hope this helps. If you need some logging the please explain how to make a log file.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10900
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #95 on: January 30, 2025, 08:17:14 pm »
« Last Edit: January 30, 2025, 08:20:30 pm by Martin_fr »

baldzhang

  • New Member
  • *
  • Posts: 44
Re: Lazarus Release Candidate 2 of 4.0
« Reply #96 on: January 31, 2025, 01:32:58 am »
1) about maps.pp exceptions
  change to another pc, compile fixes_4 branch with fpc/release_3_2_4, none of exception raised.
  compared avl_tree.pas from fpc 3.2.2 and lazarus 3.8/laz_avl_tree, there is small different in TAVLTree.FreeAndClear.
  avl_tree(in fpc_3_2_4) is same with lazarus 3.8

2) even in this testing env, codetools options still lost
  find a simple way to re-produce
  1) Tools -> Options: only change some setting in codetools part
  2) restart IDE, enter here by SourceCodeEditor -> RightClick: then settings are lost
no need to modify any part of current project.

looks like some callback not triggered ?  --- just some random guessing.
« Last Edit: January 31, 2025, 01:34:29 am by baldzhang »

Jonax

  • New Member
  • *
  • Posts: 24
Re: Lazarus Release Candidate 2 of 4.0
« Reply #97 on: February 02, 2025, 10:21:50 am »
I just spawned a Debian virtual machine for the RC2.

Made a hello world. Ran nice. Only issue was a minute of frustration while trying to find the form.
Eventually I noticed it.   :D Good location but too obvious for me.

The RC2 seems promising. Well done and thanks for your good work Team Lazarus and FPC  :)

matthius

  • Full Member
  • ***
  • Posts: 171
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Lazarus Release Candidate 2 of 4.0
« Reply #98 on: February 05, 2025, 05:44:30 pm »
I have updated Extended Packages to Lazarus 4.
I use now ARM, ARM4, LoongArch64.
But there is a linking error on ARM for IOS and ARM64 on Linux Mint.
It is searching libpango-cairo-1.0 and does not find it.
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Wilko500

  • Full Member
  • ***
  • Posts: 132
Re: Lazarus Release Candidate 2 of 4.0
« Reply #99 on: February 14, 2025, 06:36:18 pm »
While recovering from recent leg surgery  :( decided to give This a try.  Installed on macOS Monterey using FPCUpDeluxe from Fixes-3-2 and Fixes -4-0.  Installation done twice without problems. Lazarus 4.0RC2 (rev lazarus_4_0RC2-100-g155a6049ea) FPC 3.2.3 x86_64-darwin-cocoa. I was installing in to new empty folder.

Getting DockedFormEditor working was difficult.  In previous versions it has worked fine after installation with Package-Install/Uninstall of by FPCUPDeluxe.  I found that although both methods claimed it was installed it did not work.  I fixed it by changing the IDE option using StartLazarus.  But running StartLazarus does not always show the options.  I think there must be an option somewhere that overrules that display and runs Lazarus IDE instead???

I have tried RC2 on two of my existing projects and have yet to find issues with compilation and/or IDE bar one below.  Live testing will follow when I return home.  Well pleased with change to Project Close dialogue handling long file paths.

The One issue
After compiling and running a project exit in code
My custom Green arrow changed to a black timer that remains until the cursor is moved out of the code window or single click when it returned to the custom green arrow.
MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10900
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #100 on: February 14, 2025, 06:46:43 pm »
Getting DockedFormEditor working was difficult.  In previous versions it has worked fine after installation with Package-Install/Uninstall of by FPCUPDeluxe.  I found that although both methods claimed it was installed it did not work.  I fixed it by changing the IDE option using StartLazarus.  But running StartLazarus does not always show the options.  I think there must be an option somewhere that overrules that display and runs Lazarus IDE instead???

The "mini setup dialog" (that includes layout, but also path for lazarus and fpc, and dbg) is NOT shown by "startlazarus" but by lazarus itself.

It is usually shown
- on first start (when you do not have any existing config)
- (sometimes?) when your config is broken
- (sometimes?) when your config belongs to an older version
- When it has never asked you about the docked layout before (this is determined from something inside the config / I would have to check for details)

=> and it is shown when you run  (if you use startlazarus then you can also specify this, it will be forwarded)
Code: Text  [Select][+][-]
  1. lazarus --setup


You do not need the setup dlg to change that setting.
Menu: Tools > Option

There are a page for "Environment > Docking / anchordocking" and "Environment > Docked form editor".
Those are there even if the layouts are disabled. They then have a checkbox to enable them.

(They will not be there if you manually and forcefully uninstall the packages that provide them / but by default those packages are now installed)

Wilko500

  • Full Member
  • ***
  • Posts: 132
Re: Lazarus Release Candidate 2 of 4.0
« Reply #101 on: February 14, 2025, 08:39:51 pm »
Thank you your clarification and explanation very helpful.

I have a suspicion that the installer does do some other stuff.

For example I was installing in a new empty folder and after install I checked the Project-Options-Path-Other Unit Files so that I could insert my library path but it was already filled in correctly. It seems that an existing configuration had been looked at/copied? as part of the installation.  If so that would probably explain why I did not get asked at first startup????
You do not need the setup dlg to change that setting.
Menu: Tools > Option

There are a page for "Environment > Docking / anchordocking" and "Environment > Docked form editor".
Those are there even if the layouts are disabled. They then have a checkbox to enable them.

(They will not be there if you manually and forcefully uninstall the packages that provide them / but by default those packages are now installed)

MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10900
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #102 on: February 14, 2025, 08:50:31 pm »
For example I was installing in a new empty folder and after install I checked the Project-Options-Path-Other Unit Files so that I could insert my library path but it was already filled in correctly. It seems that an existing configuration had been looked at/copied? as part of the installation.  If so that would probably explain why I did not get asked at first startup????

The config is stored in a separate directory called "primary config path".
On Windows that is in C:\users\......  or also known as %APPDATA% (this path is where Windows etiquette demands config to be stored)
On linux it is ~/.lazarus

You can find it via menu: View > Ide Internals > About IDE (search for primary config path)



Also, as common on Windows, that folder is not removed by the uninstaller.

The installer has an option to clear/empty it (at least the config parts)

If you install a "2ndary install", the windows installer will ask you for an alternative config dir. => this is stored in the file "lazarus.cfg" in your install dir. (see wiki, multiple installs).


Projects have there own settings. Stuff you configure in "Project options" (e.g. the "Path" settings there) will be stored part of the project. So IDE config does not matter (unless you refer it via macros)

Wilko500

  • Full Member
  • ***
  • Posts: 132
Re: Lazarus Release Candidate 2 of 4.0
« Reply #103 on: February 14, 2025, 10:01:02 pm »
I'm having a schoolboy day :)  I had look at my About IDE

The config is stored in a separate directory called "primary config path".
On Windows that is in C:\users\......  or also known as %APPDATA% (this path is where Windows etiquette demands config to be stored)
On linux it is ~/.lazarus

You can find it via menu: View > Ide Internals > About IDE (search for primary config path)



Code: Pascal  [Select][+][-]
  1. Global IDE options:
  2. Primary config directory=/Users/richardwxxxxxxxx/LazFPC-Fixes/config_lazarus
  3. Secondary config directory=/etc/lazarus
  4. LazarusDirectory=../lazarus/
Also, as common on Windows, that folder is not removed by the uninstaller.

The installer has an option to clear/empty it (at least the config parts)

If you install a "2ndary install", the windows installer will ask you for an alternative config dir. => this is stored in the file "lazarus.cfg" in your install dir. (see wiki, multiple installs).


Projects have there own settings. Stuff you configure in "Project options" (e.g. the "Path" settings there) will be stored part of the project. So IDE config does not matter (unless you refer it via macros)
So I Am installing on MacOs and it seems that Secondary config directory=/etc/lazarus does not exist. I think that I might have to do another controlled installation and see if I can replicate the automatic completion of the Paths-Other Unit Files because It was filled in and not by me.
MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10900
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 2 of 4.0
« Reply #104 on: February 14, 2025, 10:08:45 pm »
I don't know details on Mac.

Afaik, the second config path is a fallback path. E.g. On Windows its usually the install dir, so default files can be found there.

In any case, afaik, once you have a config file in the primary path, the second should not be asked (per each conf file).

So if it points to a global folder, then it might be ok to be empty. Or maybe, if you install with sudo, the installer will put default files in there (but then if you install a new version, and don't get them updated, that would not be desirable). So not sure why on Mac that is a global folder.

 

TinyPortal © 2005-2018