Recent

Author Topic: Not able to add any component after an application has run  (Read 2211 times)

andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Not able to add any component after an application has run
« on: November 30, 2023, 11:41:01 pm »
Hi All

Strange issue here, I am using Lazarus version 2.2.6+dfsg2-2 on a Raspberry PI 5 bookworm but with Wayland disabled (issues with extra widgets).

If I make a simple application with say one TButton, I can click on the button and the normal button click procedure appears in the source editor all is ok.

If I then simply run and stop the application, if I add another TButton, this shows on the form but in the source file header only Button1 is shown.

If I click the second button I get the following error.

Unable to create new method, please fix the error shown, the error shown in the Messages is unit1.pas Error unit not found StdCtrls.

If I try to close the application and then open it there appears to be gohst buttons shown on the form.

Only if I shut down Lazarus and launch it again can I open the application.

Regards Andrew


andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Re: Not able to add any component after an application has run
« Reply #1 on: December 01, 2023, 08:34:16 pm »
Hi All

An update on the above, I have installed a fresh Raspberry PI OS Bookworm and disabled Wayland as before.

I have installed just Lazarus using the sudo apt install fpc lazarus-ide.

With no install of any extra packages just the components that come with the lazarus ide, I have made a simple application with one button.

If I run this and then stop the application I cannot add another button or any component, same error as before.

I tried closing lazarus and the re starting and this time run the application without debugger, same issue as before.

Any clues anyone

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4455
  • I like bugs.
Re: Not able to add any component after an application has run
« Reply #2 on: December 01, 2023, 09:32:40 pm »
Sounds weird. Maybe the installation packages for Raspberry PI are broken somehow.
I can only recommend to clone Lazarus sources from GitLab and to build them. FPC and other requirements are installed already by your "apt install" efforts.
Just run "make" and then start "./lazarus &" from its source location. No need to install it.
As an extra benefit you get the new fixes_3_0 branch and can later "git pull" latest bug fixes.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Re: Not able to add any component after an application has run
« Reply #3 on: December 01, 2023, 10:13:41 pm »
Hi

Thanks for the reply, unfortunately I am not familiar with Linux so much of what you ask for I would not have a clue.

I do have a PI 4 running bullseye with Lazarus 2.0.10+dfsg+4, this runs without an issue.

As you can see I had an issue when first installing the lazarus and this was a Wayland problem.

Regards Andrew

andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Re: Not able to add any component after an application has run
« Reply #4 on: December 01, 2023, 10:15:39 pm »
Hi

Just a thought, is there another way to install lzaraus other than the apt-get which I have used in the past.

Regards Andrew

dseligo

  • Hero Member
  • *****
  • Posts: 1160
Re: Not able to add any component after an application has run
« Reply #5 on: December 01, 2023, 10:44:20 pm »
Sometimes I have similar problems with Lazarus 2.2.6 on Windows 11.
It happens only with new projects. After I save project and close Lazarus, and start all again it works fine afterwords.

sfeinst

  • Full Member
  • ***
  • Posts: 230
Re: Not able to add any component after an application has run
« Reply #6 on: December 01, 2023, 11:07:04 pm »
Hi All

An update on the above, I have installed a fresh Raspberry PI OS Bookworm and disabled Wayland as before.

I have installed just Lazarus using the sudo apt install fpc lazarus-ide.

With no install of any extra packages just the components that come with the lazarus ide, I have made a simple application with one button.

If I run this and then stop the application I cannot add another button or any component, same error as before.

I tried closing lazarus and the re starting and this time run the application without debugger, same issue as before.

Any clues anyone

I have the same exact problem running Debian Bookworm.  So I do not think this is a Raspberry PI issue.  It is either a Linux issue or more likely a Debian Bookworm issue.  I tried downloading the debs on the Lazarus site and still had an issue.  I have not narrowed down when it occurs.  But it is sometime after running an app and then making component changes (especially changing a controls name or adding an event handler).  I have had it happen immediately and at other times I can run the app multiple times before it occurs.  But I can expect to restart Lazarus many times a day.  I try to make all visual/property changes even if I'm not ready to code.  Save the project.  Then I know I will only have one restart and I can add code and everything is good (until I need another visual change).

My next attempt will be to downloaded sources and build Lazarus, I just haven't had time to do it - need some free ours to test it out.  But the restarts are definitely getting on my nerves which will force me to find time to build from source.

andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Re: Not able to add any component after an application has run
« Reply #7 on: December 02, 2023, 12:21:35 am »
Hi sfeinst

I have not used Ubuntu before but I did a fresh install with Ubuntu on a Raspberry pi 5.

I installed Lazarus as before and I have the same issue on a PI 5 running ubuntu Desktop 23.10.

Regards Andrew

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4455
  • I like bugs.
Re: Not able to add any component after an application has run
« Reply #8 on: December 02, 2023, 12:27:11 am »
Thanks for the reply, unfortunately I am not familiar with Linux so much of what you ask for I would not have a clue.
$ git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git
$ cd lazarus
$ make
$ ./lazarus &
« Last Edit: December 02, 2023, 12:55:27 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Re: Not able to add any component after an application has run
« Reply #9 on: December 02, 2023, 12:45:25 am »
Hi

Thanks very much I will give that a try

Regards Andrew

TRon

  • Hero Member
  • *****
  • Posts: 2283
Re: Not able to add any component after an application has run
« Reply #10 on: December 02, 2023, 12:45:32 am »
I have the same exact problem running Debian Bookworm.  So I do not think this is a Raspberry PI issue.  It is either a Linux issue or more likely a Debian Bookworm issue.
Negative on the generic latter blame on/for bookworm. Running Lazarus on Bookworm since testing and work(s/ed) like a charm (using GTK2). It is probably more related to their used window manager or incompatibilities with Lazarus that it triggers.

Issues with wayland are mentioned in the bugtracker but since you mentioned having wayland disabled that should not be the issue.
« Last Edit: December 02, 2023, 12:47:18 am by TRon »

andrew Bubble

  • Jr. Member
  • **
  • Posts: 57
Re: Not able to add any component after an application has run
« Reply #11 on: December 02, 2023, 01:07:23 am »
Hi

I have done as you suggested and testing the app a few times it looks like it is working.

One question when I reboot it has asked me to downgrade, how do I keep the install I have just done

Regards Andrew

sfeinst

  • Full Member
  • ***
  • Posts: 230
Re: Not able to add any component after an application has run
« Reply #12 on: December 02, 2023, 01:17:35 am »
Issues with wayland are mentioned in the bugtracker but since you mentioned having wayland disabled that should not be the issue.

Actually it was original poster who is not using Wayland.  I am using Wayland with Gnome as desktop.  I haven't looked at bugtracker.  Are you saying there are known issues with Wayland and Lazarus?  Are the issues with the IDE or is it implied lcl apps are having issues as well?   So far, it's just the IDE for me.

TRon

  • Hero Member
  • *****
  • Posts: 2283
Re: Not able to add any component after an application has run
« Reply #13 on: December 02, 2023, 03:28:14 am »
Actually it was original poster who is not using Wayland.  I am using Wayland with Gnome as desktop.
In that case, my apologies as I misread.

Quote
I haven't looked at bugtracker.  Are you saying there are known issues with Wayland and Lazarus?
yes. But do note it is most probably a combination of Wayland with the chosen/used window manager.

Quote
Are the issues with the IDE or is it implied lcl apps are having issues as well?   So far, it's just the IDE for me.
afaik it can be both but the reports seem to focus on the IDE. See for example this link (search for wayland) issue 40413.

fwiw: Once in a blue moon I have also issues with starting the IDE (GTK2) in that it displays an empty form, which tries to refresh itself over and over until I move or resize the window. Like it is stuck in some kind of loop or something. It appears very seldom for me but it does happen. For me it is a minor inconvenience that I can solve with a simple mouseclick but it seems to be a real issue, especially for raspberry pi users (there are others that reported similar issues. The mentioned/linked fix does not seem to have solved the issue (completely) according to this thread.
« Last Edit: December 02, 2023, 03:32:19 am by TRon »

paweld

  • Hero Member
  • *****
  • Posts: 953
Re: Not able to add any component after an application has run
« Reply #14 on: December 02, 2023, 07:18:15 am »
I use FpcUpDeluxe to install Lazarus on Linux.

On a clean RasperryPi, I install Lazarus as follows:
1. disable Wayland (in terminal) - only RaspberryPi OS Bookworm:
Code: Bash  [Select][+][-]
  1. sudo raspi-config nonint do_wayland W1
and I restart the system
2. installs the necessary packages (in terminal):
Code: Bash  [Select][+][-]
  1. sudo apt install libx11-dev libgdk-pixbuf2.0-dev libpango1.0-dev libgtk2.0-dev git
3. download FpcUpDeluxe:
- for 64 bit system: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/v2.4.0a/fpcupdeluxe-aarch64-linux
- for 32 bit system: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/v2.4.0a/fpcupdeluxe-arm-linux
4. for the downloaded file, give the rights to run: right click on the file > Properties > Permissions > set Execute to Anyone.
5. run fpcupdeluxe
6. choose the version of FPC and Lazarus to install, to start I recommend FPC: stable, Lazarus: stable. Personally, I use FPC: fixes, Lazarus: trunk
7. click "Install/update FPC+Lazarus" and wait for the installation to complete
Best regards / Pozdrawiam
paweld

 

TinyPortal © 2005-2018