ZEOSLIB: External SIGSEGV when set properties in runtime!

In this forum you may discuss all issues concerning the Lazarus IDE and Freepascal (both running on Windows or Linux).

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
lrmirabelli
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 27.11.2020, 01:31
Location: Sao Paulo / Brazil

ZEOSLIB: External SIGSEGV when set properties in runtime!

Post by lrmirabelli »

Hello folks! How are you?

I'm with a "simple fool trouble" with ZeosLib and Lazarus, in a new project.
I want to configure the ZConnection parameters in runtime, because I will get these parameters from a "ini" file.

I'm using:
  • Windows 10 Home x64
  • ZeosLib 7.2.8
  • Lazarus 2.0.10 x64
  • FPC 3.2.0
  • SVN 63526
So, I created a new application, just with Main Form and a DataModule.
In these DataModule, I added a ZConnection and save it as "dbConn" name, and the class as "u_dbmod.pas". I want put here all data components.

And, in the MainForm, I declared the "u_dbmod" in the Implementation section, added one button wich calls the procedure "TDataModule1.CfgParams()" as follow:

Code: Select all

procedure TDataModule1.CfgParams();
begin
     dbConn.HostName := '';
     dbConn.Port := 5555;
     dbConn.UserName := 'posgtres';
     dbConn.Password := 'masterpass';
end;
In design time, I can configure all parameters of ZConnection, and I can to connect with success to my Database.
BUT..... in runtime, when I click in the button to set these configuration by instructions, the Lazarus shows the follow error message:

Error: Project raised exception class 'External:SIGSEGV'.
In file 'u_dm.pas' in line 33:
dbConn.HostName := '';


Can anyone help me to understand why I can't to do this procedure at runtime?
Where's the error in that logic?

Since now I thank all for attention.

Thank you!!!

Best regards;
LRM
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: ZEOSLIB: External SIGSEGV when set properties in runtime!

Post by marsupilami »

Hello,

could you please post a sample project that shows the error? Just attach a ZIP file here.

Best regards,

Jan
Post Reply