Recent

Author Topic: [Solved] LCL crashes loading main form  (Read 1048 times)

ArminLinder

  • Sr. Member
  • ****
  • Posts: 314
  • Keep it simple.
[Solved] LCL crashes loading main form
« on: March 30, 2021, 10:57:57 pm »
Hi all,

I have, after almost 3 years, resurrected an old project to make some changes. Without changing any code, when I load the program in Lazarus and run it, it crashes upon executing the lpr file:

Code: Pascal  [Select][+][-]
  1.       Application.CreateForm(TForm1, Form1);

The crash dump points into the direction that a DateTimePicker (which indeed is located on the form) gets a floating point overflow, when the form's resources are loaded from memory.

The plain text of the exception thrown is External:SIGFPE: ... EReadError ...Error Reading DateTimeBirthdayPicker.Date: Floating Point Overflow.

I checked the DateTimeBirthdayPicker.Date property, which is initialized with NULL. I set it to an arbitrary date, and the problem persists.

Since the program was running fine 3 years before, I guess that I am struggling with a compatibility issue. Unfortunately much has changed: my development machine was migrated to Windows 10, I upgraded to the latest version of Lazarus, I did, AFAIR, change from the x64 version to the x32 Version of Lazarus ... seems somewhere I broke something.

Any ideas how to track such an issue and fix it?

Thnx, Armin.
« Last Edit: March 31, 2021, 08:06:19 am by Nimral »
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: LCL crashes loading main form
« Reply #1 on: March 30, 2021, 11:59:28 pm »
Hey Armin,

The way you have presented your issue is rather vague and doesn't really gives us much to grab on.

Would it be possible to share the source code in order to verify if it behaves in a similar fashion on someone else's system?

But from the small info that you provided, I don't think that any of your system changes would have any effect on a 3 year old piece of code.
Unless that TDateTimePicker is not part of the Lazarus install and you have, either a very new version of it, or a very old version of it.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: LCL crashes loading main form
« Reply #2 on: March 31, 2021, 12:07:27 am »
Did you just compile over the code where the code had been before?

Or did you compile into a totally new area.

(Short question: Clean up and Build ?)

Also, have you compiled anything else successfully on this system which have been upgraded?
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

ArminLinder

  • Sr. Member
  • ****
  • Posts: 314
  • Keep it simple.
Re: LCL crashes loading main form
« Reply #3 on: March 31, 2021, 08:05:54 am »
Thank you for your help!

Silly me, I thought DateTimePicker was a Lazarus standard control, but in fact it is not. It came through an external package "ZVDateTimeControls" by Zoran Vučenović. A re-install of the package and "Clean up and Build" did the trick perfectly.

Thanks again, Armin.
« Last Edit: March 31, 2021, 08:10:15 am by Nimral »
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

af0815

  • Hero Member
  • *****
  • Posts: 1291
Re: [Solved] LCL crashes loading main form
« Reply #4 on: March 31, 2021, 11:21:48 am »
BTW: From https://wiki.freepascal.org/ZVDateTimeControls_Package
Quote
From Lazarus version 1.4, this package should be replaced with DateTimeCtrls Package, which is included in Lazarus distribution.
regards
Andreas

 

TinyPortal © 2005-2018