Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2023-12

Mysterious crash with Lazarus on RPi4B running PiOS bookworm 32 bit

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I have built a new system where I have installed fpc 3.2.2 and Lazarus 2.2.4 from sources like I normally do.

In this case I have encountered a very strange issue never seen before but repeatable using both 2.2.4 and 2.2.6.

All seems OK until I use the Tools/Options/Editor/Display/Color window to set the color coding of various items like I usually have them.

As soon as I select "Comment" in the list in order to change the color from blue to green it takes about 2-3 seconds and the whole user session crashes!

Note that my SSH session is still working fine but the VNC totally vanishes.

I have to reconnect (re-login) the VNC session and when I open Lazarus now the window arrangement has been screwed up too...

Tests:
I have tried both VNC server version 6 and version 7 on this RPi4B 32 bit device. Same issue.

And I have also tried Lazarus version 2.2.4 and 2.2.6 with the same exact result.

I have never seen Lazarus crash this way before and bringing the whole user session down with it...

What can be going on here?
Maybe I should re-install the whole system from scratch?

It is probably faster than doing this troubleshooting....

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 11 lines
I have built a new system where I have installed fpc 3.2.2 and Lazarus 2.2.4 from sources like I normally do. In this case I have encountered a very strange issue never seen before but repeatable using both 2.2.4 and 2.2.6. All seems OK until I use the Tools/Options/Editor/Display/Color window to set the color coding of various items like I usually have them. As soon as I select "Comment" in the list in order to change the color from blue to green it takes about 2-3 seconds and the whole user session crashes!

In fact this is not even needed. Just wait a few seconds after reaching the dialog and it crashes!

Show quoted text 8 lines
Note that my SSH session is still working fine but the VNC totally vanishes. I have to reconnect (re-login) the VNC session and when I open Lazarus now the window arrangement has been screwed up too... Tests: I have tried both VNC server version 6 and version 7 on this RPi4B 32 bit device.

WRONG, bad memory...
In fact VNC cannot be reached when using the version 7 shipped with PiOS, one has to revert to the previous version 6 to get a connection at all... So this is tested only with the VNC server version 6, shipped with the previous PiOS version (bullseye).

Show quoted text 11 lines
And I have also tried Lazarus version 2.2.4 and 2.2.6 with the same exact result. I have never seen Lazarus crash this way before and bringing the whole user session down with it... What can be going on here? Maybe I should re-install the whole system from scratch? It is probably faster than doing this troubleshooting....

Not really....

It took a few hours to erase the drive and restart from scratch to get to the same place....

And only to discover that the crash is still there as soon as one gets to the Tools/Options/Editor/Display/Colo dialog to customize text color. A few seconds after reaching this dialog the VNC session just dies!

The RPi4B itself continues running so the SSH session is intact, onbly the VNC session is killed.
And it happens when that spoecific Lazarus options dialog is activated. Other settings dialogs so far have behaved sensibly.

Note that this time I have not even installed any extra packahes from OLPM or my own components. Plain Lazarus from sources.

I can get it going on the RPi4B with 64 bit PiOS bookworm, just not with 32 bit....
But I need 32 bit in order to build for the 32 bit family of RPi devices.

Has anyone here managed to get Lazarus 2.2.6 running on a headless Raspberry Pi4B with 32 bit PiOS bookworm and using VNC to access it?

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote
Has anyone here managed to get Lazarus 2.2.6 running on a headless Raspberry Pi4B with 32 bit PiOS bookworm and using VNC to access it?

So the mystery remains even after I have done this on my RPi4B:

- Stopped and disabled the existing RealVNC server as well as setting it to not start in raspi-config
- Installed xrdp as a new remote desktop server not using VNC
- Erased all remnants of previous installs of fpc/lazarus from source including the desktop menu entry in ~/.local/share/applications
- Installed via apt: sudo apt install fpc lazarus (got 3.2.2 and 2.2.6)

Now the new Lazarus appears in my main menu below Programming.

When I start Lazarus from the menu shortcut it starts up seemingly normally.

So now I headed to Tools/Options/Editor/Display/Colors

Waited a while for a crash but nothing happened.

After half a minute I clicked on the item "abc Comment" in order to change to my usual color (green).

And at that very moment the remote connection crashed, the whole window disappeared with all its content!
When I reconnect RDP all looks normal except when I start Lazarus agin the window arrangement has been screwed up, all windows are not there anymore. But the exact same behaviour happens.

What in the world could trigger a total and sudden crash of the whole remote session now with a completely different handler (xrdp vs VNC)???

What is the thing done in Lazarus when one clicks the "abc Comment" item in the selector list that is so major?

I will make a new attempt by starting over from scratch on a new system disk and just install fpc/lazarus and of course xrdp so I can use the desktop on the headless system. But it will take some time to reach the same point... 3rd or 4th time I do this...

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 5 lines
I will make a new attempt by starting over from scratch on a new system disk and just install fpc/lazarus and of course xrdp so I can use the desktop on the headless system. But it will take some time to reach the same point... 3rd or 4th time I do this...

OK so now I am done with the latest attempt...
I scrapped the SD-card for the last attempt and started over fresh. The only things I did before the fpc/lazarus test was the following:

- Configured the new SDcard using Pi-Imager for bookworm 32 bit.
- Started the system anew and connected by SSH
- sudo apt update && sudo apt full-upgrade
- Used apt to install the following standard packages: sudo apt install xrdp screen shellcheck openvpn fonts-hack-ttf subversion
- Then:
sudo apt install fpc lazarus

Now I could connect to the GUI screen using the RDP client on Windows10.

And I could start Lazarus from the main menu/Programming and it started up as I am used to.

Then I went straight to Tools/Options/Environment/Editor/Display/Colors On that dialog I clicked the "Comment" line in the list of items to set the color for.

And instantly the remote desktop session disappeared!

So no matter if one uses VNC or RDP to get a GUI remote screen the exact same action kills the user session instantly without leaving any trace in the logs that I have been able to find.

And this time I have installed Fpc/Lazarus using apt so an error in my own handling of source installs is not in play here.

It must be something Lazarus does that is forbidden on 32 bit Pi-OS Bookworm... But what is it?

Doing the same on 64 bit Pi-OS Bookworm works exactly as expected, i.e. no surprises...

Colors can be set and all is fine and dandy.

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Jean SUZINEAU
Jean SUZINEAU wrote
May be you'll find some information in the log, something like : cat /var/log/xrdp.log

This is how the 13 minute session end was logged:

[20231207-21:44:04] [INFO ] sesman connect ok
[20231207-21:44:04] [INFO ] sending login info to session manager. Please wait...
[20231207-21:44:04] [INFO ] xrdp_wm_log_msg: login successful for user bosse on display 10
[20231207-21:44:04] [INFO ] login successful for user bosse on display 10 [20231207-21:44:04] [INFO ] loaded module 'libxup.so' ok, interface size 9456, version 4
[20231207-21:44:04] [INFO ] started connecting
[20231207-21:44:04] [INFO ] lib_mod_connect: connecting via UNIX socket [20231207-21:44:04] [INFO ] lib_mod_log_peer: xrdp_pid=4860 connected to X11rdp_pid=4863 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:192.168.119.136 client_port=64630
[20231207-21:44:04] [INFO ] connected ok
[20231207-21:57:36] [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed [20231207-21:57:36] [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed [20231207-21:57:36] [ERROR] libxrdp_process_data: xrdp_rdp_recv failed [20231207-21:57:36] [ERROR] xrdp_process_data_in: xrdp_process_loop failed [20231207-21:57:36] [ERROR] xrdp_iso_send: trans_write_copy_s failed [20231207-21:57:36] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed

That is the end of the log...

At 20231207-21:57:36 was when I clicked the "forbidden" item in Lazarus' color config dialog.

It always happens, perfectly reproducible...

And it screws the desktop, on next start of Lazarus only the main code editor and the top Lazarus bar are shown...

Bo Berglund Developer in Sweden

Reply by email