Recent

Author Topic: TDbf and SIGSEGV error  (Read 2448 times)

DelphiLand

  • Newbie
  • Posts: 3
TDbf and SIGSEGV error
« on: July 04, 2018, 06:01:46 pm »
I get a SIGSEGV error when I try to compile this very small program with a TDbf:

procedure TForm1.FormShow(Sender: TObject);
begin
  dbfMembers.Open;
end;               

The DBF has a text field named ID.
Here's the strange thing: when I restructure the DBF and rename the field to something else, e.g. MEMBERID, everything works fine.
Is this a known problem? Are there field names that should not be used?

Thanks a lot if someone can solve this!
It took me days before I found what caused the SIGSEGV error.

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: TDbf and SIGSEGV error
« Reply #1 on: July 04, 2018, 07:13:35 pm »
Hello DelphiLand,
Welcome to the forum.

Can you provide us the source code? To do it, create a new folder and copy all the necessary files (including the dbf files) into the folder except: *.bak, the binary (*.exe) and the lib folder. Compress that folder and send the zip file to the forum.

Without source code (and data) to test, nothing much we can say.

DelphiLand

  • Newbie
  • Posts: 3
Re: TDbf and SIGSEGV error
« Reply #2 on: July 05, 2018, 05:10:35 pm »
Today I found that the problem was in the indexing of the DBF file.
It was indexed on UPPER(LASTNAME+FIRSTNAME). After changing the expression to UPPER(LASTNAME)+UPPER(FIRSTNAME), the SIGSEGV error disappeared.
I searched the web long and hard, but I didn't find any documentation on this strange behavior. Maybe this is a good candidate for adding to the long list of possible causes for SIGSEGV errors with Lazarus.

Thanks to all who have looked into my problem  8)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TDbf and SIGSEGV error
« Reply #3 on: July 05, 2018, 09:17:26 pm »
Today I found that the problem was in the indexing of the DBF file.
It was indexed on UPPER(LASTNAME+FIRSTNAME). After changing the expression to UPPER(LASTNAME)+UPPER(FIRSTNAME), the SIGSEGV error disappeared.
I searched the web long and hard, but I didn't find any documentation on this strange behavior. Maybe this is a good candidate for adding to the long list of possible causes for SIGSEGV errors with Lazarus.
I have reported this issue as a known problem on http://wiki.freepascal.org/Lazarus_Tdbf_Tutorial#Alternatives_and_known_problems

 

TinyPortal © 2005-2018