Recent

Author Topic: Lazarus 4 - I give up and return to 3  (Read 2727 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1211
Lazarus 4 - I give up and return to 3
« on: June 14, 2025, 05:42:31 pm »
After days of attempting to give my project a new start with Lazarus 4, - I give it a tear and return to Lazarus 3. I loved so many things in Lazarus 4.

However, I cannot work with it. I deleted all my work, all files and started again several times. The result is a frozen IDE, a (part-time) frozen Linux and a clueless programmer.

Please see attach of what I continue to see every day again.

Here are more screenshots and a full collection of all my files:
https://forum.lazarus.freepascal.org/index.php/topic,71453.msg557743.html#msg557743
There are 2 links to an uploaded mediafire-thing. Please respect the copyrights of the images.

In the meanwhile I even gave up to add images. I fail creating the containers of my form with no line of code written.

I hope so much, this will work out to a Lazarus 4.1, because I love so many new features, I love the looks, I love all those tiny improvements at every corner.

TBMan

  • Full Member
  • ***
  • Posts: 194
Re: Lazarus 4 - I give up and return to 3
« Reply #1 on: June 14, 2025, 08:20:30 pm »
I'm using Windows, but when I went from 3 to 4, I uninstalled 3 first.   I don't rely on the LCL to write code at this point though. I did notice that a certain boolean typecast I used to do no longer worked with a certain Windows function call. There must be a list of changes that you can review to see why your code is broken with version 4.

RAW

  • Hero Member
  • *****
  • Posts: 871
Re: Lazarus 4 - I give up and return to 3
« Reply #2 on: June 15, 2025, 12:06:10 am »
Relax..
There will be a newer LAZ IDE version.. just a little patience and everything will be fine..

There's still a little bit of time.. the russians are not yet here... not yet.


In the meantime maybe you like to test a very very nice OS. It's called XPerience SP3 and I like it a lot... :-) :-)

And believe me you don't need to be firm with Linux to use it! Amazing isn't it.
Good old stuff..

anthonyirwin82

  • Newbie
  • Posts: 1
Re: Lazarus 4 - I give up and return to 3
« Reply #3 on: June 15, 2025, 04:55:15 am »
I have been running Lazarus 4 qt6 from the archlinux repo fine. I have also been using an fpcupdeluxe build of Lazarus 4 gtk2 using the fixes branch for both fpc and Lazarus 4 without issues.

I'm sorry to hear others are having issues, but I thought I would post that I am not. I'm not sure how to fix your issue, but I thought it was worth mentioning that not everyone is having trouble with Lazarus 4 ide.

Nicole

  • Hero Member
  • *****
  • Posts: 1211
Re: Lazarus 4 - I give up and return to 3
« Reply #4 on: June 16, 2025, 11:05:38 am »
I am sorry to leave Lazarus 4 and am ready to come back.
There was nothing to un-install. I started on a naked system and an empty project

About the code: It was the fault of Lazarus 4.
I just took the code with the empty container-files from laz 4 and linux by copy and paste. They are part of my code in my Lazarus 3 under Win 7 now. They run without problems.

If there is a person, who says, "yes, I care about, I will work on with it and I need it".... then I will go ahead and make the whole Linux VM (VMWare) ready for an upload for debugging. As this is a lot of work (I must delete my personnel files and split the huge thing for uploading), I want to make sure, anybody will use it and not only say it. This person is asked first to try the already uploaded environment from mediafire. Maybe the nesting of the TPageControls is the problem. Even the opening of the project made everything freeze.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11457
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 4 - I give up and return to 3
« Reply #5 on: June 16, 2025, 11:27:42 am »
Is your Linux running XServer or wayland?

Afaik, some wayland versions aren't working stable (not sure if at fault of wayland or LCL, but triggered by the combination). Though that is from hear say...

2nd:
Can you disable the docked form editor (Tools > Options) and try?
(No, I can't quickly test that myself, I would first need to install richmemo, to be able to load your project)

3rd:
Can it be reproduced without 3rd party components (e.g. if richmemo is not on the form.
Ok, that may not be easy to test, since you can't currently remove it...
« Last Edit: June 16, 2025, 11:30:17 am by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11457
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 4 - I give up and return to 3
« Reply #6 on: June 16, 2025, 11:38:26 am »
Not sure if richmemo is actually used, but the package is in the dependencies. So it complains when opening the project.




Also, when I open the project it can't find the units.

In your rar all units are in the same directory as the lpi/lpr => and that is what one would expect.

But in the lpi file there is
Code: Text  [Select][+][-]
  1.       <Unit>
  2.         <Filename Value="..\..\Programmieren\myProjekte\Felsentiger\lib\formmain_tiger.pas"/>
  3.         <IsPartOfProject Value="True"/>
  4.         <ComponentName Value="Form_MainTiger"/>
  5.         <HasResources Value="True"/>
  6.         <ResourceBaseClass Value="Form"/>
  7.       </Unit>
  8.       <Unit>
  9.         <Filename Value="..\..\Programmieren\myProjekte\Felsentiger\lib\formmain_tiger.lfm"/>
  10.         <IsPartOfProject Value="True"/>
  11.       </Unit>
  12.       <Unit>
  13.         <Filename Value="..\..\Programmieren\myProjekte\Felsentiger\lib\form_tiger.lfm"/>
  14.         <IsPartOfProject Value="True"/>
  15.       </Unit>

It expects your sources in the "lib" folder??? (and a lib folder outside the directory you uploaded??

Maybe that is just because you did "save as" in order to generate a stripped down project.
But then please test with that stripped down project that the error happens.

I have not tested it on Linux (and there are many factors that can affect Linux tests). But I loaded it in Windows.
- ignoring the missing package
- opening the files, after ignoring the wrong path error
- ignoring the missing "unit_Main" (probably not needed for the issue)
And on Windows there was no issue (though that test was with 4.99 / need to check with 4.0)

Nicole

  • Hero Member
  • *****
  • Posts: 1211
Re: Lazarus 4 - I give up and return to 3
« Reply #7 on: June 16, 2025, 05:45:15 pm »
The history is this:
I wanted to re-add all my units and do a clean project from scratch. As I failed to create even the containers for them, - I did not even start. You can delete all uses which are not part of Lazarus.

As I could not even click the form without freezing for 10 minutes, I did not clean it, for making it "showable".

The project which I uploaded does this:
It creates a lot of nested TPageControls. Nothing else. Not even a button as far as I remember or one.

What I am not sure about: if the TImageLists are there. I tried to generate 2 of them. As all thouse crashes, freezing and waiting resulted in dataloss. I cannot say if those TImageLists are there or not. Sometimes I re-opened my project and they were gone or there again.

There is not a line of code in the project, which is more than those new containers.

About the RichMemo / RichEdit: This is wanted exactly like this. If you are curious about the reason, search the history of my postings, very far back. It was a solution a genius of this forum found.

There is no RichMemo or RichEdit and the lines can be deleted. Yes, this may be a reason for the crashes. However, if yes, this needs a fix. The project froze my Linux for quite a while, before it recovered.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11457
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 4 - I give up and return to 3
« Reply #8 on: June 16, 2025, 06:02:23 pm »
Well, I copied your project into one of my VM (manjaro 6.6.26 / bit older).

I opened it in Lazarus 4.99 and I went through all the pages and nested pages in the designer (at design time).
No issue...

However this is running XServer. And as I said, wayland may cause issues, in case yours has wayland.

Also, its Lazarus 4.99 (from April 2025). So it is possible it has (merged or unmerged) fixes. (4.0 was branched autumn 2024 / but many fixes were merged until its release)
I don't currently have a 4.0 on any of my Linux.

Nicole

  • Hero Member
  • *****
  • Posts: 1211
Re: Lazarus 4 - I give up and return to 3
« Reply #9 on: June 16, 2025, 07:10:19 pm »
Maybe the problem comes even from Windows 10 or VMWare 17, which is the basis for my Linux-VM.
The VM is a Linux Mint Cinnamon, I got the most recent iso from the main page and installed the iso by VMWare as installing DVD.

VMWare 17 is rather new at my PC, because VMWare 16 supports Linux with VMWare tools of 2020, which reads rather old.

My last attempts with Lazarus were "noli me tangere": I could not even delete my TImageList without reading things like "division by zero" and popping up masses of empty error messages windows. As I had just 2 TImageLists and several TPageControls, the messages may have come from the TPageControls - sobb - or everything else.

VMWare on Windows 10 is tricky. Windows 10 comes with several virtual environments. I cared to de-activate them all, but who knows?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11457
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 4 - I give up and return to 3
« Reply #10 on: June 16, 2025, 08:20:26 pm »
OK, my Mint VM is still on 20.1 ...

Googling Mint Cinnamon I get some results for xserver, some for wayland. So I can't tell what it is.

But, if it is wayland, google did say that is experimental, and not stable.

This here has steps to check
https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used

----

I may see if one of my other VM has wayland. But even if, my experience could be different, since each distro will have a different version / and different bugs will show with wayland...

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11457
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 4 - I give up and return to 3
« Reply #11 on: June 16, 2025, 08:23:04 pm »
And yes, even if your statement that it works with Lazarus 3.n means "works on the same machine, with the same wayland (if it is wayland)" => it could still be the fault of either side. **If** wayland is buggy, then those bugs must still be triggered. Which one version of Lazarus might do, and the other not.

If your Linux is XServer, then the issue must be something else.


Further more I did not ask, but always just assumed: GTK2 ?
Or do you use QT5 or 6?

PascalDragon

  • Hero Member
  • *****
  • Posts: 6039
  • Compiler Developer
Re: Lazarus 4 - I give up and return to 3
« Reply #12 on: June 16, 2025, 09:27:59 pm »
I did notice that a certain boolean typecast I used to do no longer worked with a certain Windows function call.

That would be really strange, because Lazarus 3 and 4 use the same compiler and RTL. There might be a difference if you also switched from 32-bit to 64-bit and then that possibly points at a bug in your code that simply used to work by accident.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11457
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 4 - I give up and return to 3
« Reply #13 on: June 16, 2025, 10:16:07 pm »
I did notice that a certain boolean typecast I used to do no longer worked with a certain Windows function call.

That would be really strange, because Lazarus 3 and 4 use the same compiler and RTL. There might be a difference if you also switched from 32-bit to 64-bit and then that possibly points at a bug in your code that simply used to work by accident.

He might mean "boolean(some_value_that_could_be_five)"

The type "boolean" can only (and has always only been able to) be used with ordinal input value zero or one. All else ends up undefined.

True, when all conditions stay exactly the same, then undefined should keep being the "same undefined".

But
Code: Text  [Select][+][-]
  1. if boolean(bad_val) = LCL_BOOL_CONST then
could change, LCL_BOOL_CONST is typed and changed to a different type of boolean.

Also, can we be sure that undefined may not change, if e.g. the optimizer inlines code (and that inlined code changed)?

E.g.  "if boolean(5) then" may lead the compiler to
- compare 5 <> 0 => would work
- compare 5 = 1   => would fail

If surrounding code changes (including by inlining) could the compiler make a different choice? I don't know.

Nicole

  • Hero Member
  • *****
  • Posts: 1211
Re: Lazarus 4 - I give up and return to 3
« Reply #14 on: June 16, 2025, 10:33:59 pm »
Your dialogue became to high to me. I googled "Wayland" and it seems to be a visual thing. I do not understand in full.

I downloaded my iso here:
https://linuxmint.com/download.php

and I have
Win 10 22H2(Build 19045.5965)

and
VMWare 17.6.3 (I think so)



 

TinyPortal © 2005-2018