Recent

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

Nimral

  • Full Member
  • ***
  • Posts: 140
  • 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 2.0.8 on Windows, Raspberry Pi OS, VMWare Workstation

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 499
  • 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 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

ASBzone

  • Hero Member
  • *****
  • Posts: 615
  • 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.0.13 r64843 / FPC v3.2.1-r49055 (via FpcUpDeluxe) -- Windows 64-bit install w/Win32 and Linux/Arm cross-compiles
Primary System: Windows 10 Pro x64, Version 2009 (Build 19042)
Other Systems: Windows 10 Pro x64, Version 2009 (Build 19042) or greater

Nimral

  • Full Member
  • ***
  • Posts: 140
  • 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 2.0.8 on Windows, Raspberry Pi OS, VMWare Workstation

af0815

  • Hero Member
  • *****
  • Posts: 669
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