Recent

Author Topic: Strange Behaviour at Runtime  (Read 365 times)

andrew Bubble

  • Jr. Member
  • **
  • Posts: 64
Strange Behaviour at Runtime
« on: June 09, 2026, 11:32:29 am »
Hi All

I have a Lazarus application that is behaving in an odd way.

My development system is a Raspberry PI 500+ running Lazarus V4.3 and Free Pascal V3.3.1 and a 4K monitor.

I am developing a small touch screen application, the touchscreen system is also a Raspberry PI 500 (1GB) with a Waveshare 1280 X 400 touch screen.

The issue showed itself by what seemed as the right hand side of the form being cropped, the screen had a small 3 pixel wide border at the edge of the form and the right had side was missing, it looked like the form was being displayed bigger than the screen width.

I have made a simple test application which had four square shapes one in each corner, two slim shape bars one on the left and one on the right and two more on the top and bottom, all shapes are a few pixels from the edge of the form.

In the development as expected all works as expected but when the application is run on the touch screen the right hand bar is missing and the right hand boxes are smaller.

In an attempt to try and diagnose the issue I modified the test app to print out in the Form.Show all the shapes left positions and also the screen size and the form width and height.

When I run the application in development all the positions are as they were in design, however when run in the touch screen you can clearly see the left positions of the right had shapes have moved and the application height is 404 and the width is 1293.

This is despite the form's constraints being set.

I have included some screenshots to illustrate the problem.

Any ideas on what is going on.

Thaddy

  • Hero Member
  • *****
  • Posts: 19387
  • Glad to be alive.
Re: Strange Behaviour at Runtime
« Reply #1 on: June 09, 2026, 11:39:29 am »
I can test that for you, but only if you attach some code to debug or a binary (just to confirm). From your information I can deduce very little.
Note I do not have a 500+ but I do have all other Pi's. (lots of 'm)
objects are fine constructs. You can even initialize them with constructors.

andrew Bubble

  • Jr. Member
  • **
  • Posts: 64
Re: Strange Behaviour at Runtime
« Reply #2 on: June 09, 2026, 12:33:27 pm »
Hi Thaddy

Thanks for the reply

I will zip up the application and send for you to test

Regards Andrew

andrew Bubble

  • Jr. Member
  • **
  • Posts: 64
Re: Strange Behaviour at Runtime
« Reply #3 on: June 09, 2026, 12:41:49 pm »
Hi Thaddy

I have zipped up the project

See Attached

andrew Bubble

  • Jr. Member
  • **
  • Posts: 64
Re: Strange Behaviour at Runtime
« Reply #4 on: June 10, 2026, 11:19:45 am »
Hi Thaddy

I have done some more testing and I think I have identified the issue.

We also use a different screen this being 1024 wide x 600 high, note we don't have any issues using this screen.

The difference I have noticed is that the 1024 X 600 screen is used in it's Normal rotation as stated in the Raspberry PI.

I rotated the screen so that it is now 600 width by 1024 height, if I now make a similar test application based on the 600 x 1024 and run this I get a similar issue.

Except that the bottom of the screen is cropped instead of the right hand side.

See screenshot from the 600 X 1024 screen showing bottom part of screen cropped off.

Regards Andrew

andrew Bubble

  • Jr. Member
  • **
  • Posts: 64
Re: Strange Behaviour at Runtime
« Reply #5 on: June 12, 2026, 09:54:40 am »
Hi All

I have done some more testing and it seems to only be an issue on DSI screens.

We have several in our offices and if the orientation is changed in the PI from what it considers as normal then the issue is shown.

Depending on the type of screen it either crops the bottom or one of the sides.

I have an official Raspberry PI touch screen (5 Inch) and I will give this a try.

Regards Andrew

 

TinyPortal © 2005-2018