- This topic has 2 replies, 2 voices, and was last updated 4 years, 11 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › kbmMemTable › kbmmemtable on linux lazarus 2.0.4
Hello,
I just purchase kbmMemtable v.7.8.2.
Installation on linux lazarus 64bits version 2.0.2 (fpc version 3.0.4) went smoothly. My o/s is ubuntu 18.04 64 bits
Unfortunately, it fails on inserting record.
Steps to demonstrate the problem:
procedure TForm1.FormCreate(Sender: TObject);
var
F : TField;
begin
F := TStringField.Create( NIL);
F.FieldName := ‘KODE’;
F.DataSet := Self.kbmMemTable1;
//
Self.kbmMemTable1.CreateTable;
Self.kbmMemTable1.Open;
Self.kbmMemTable1.Insert;
Self.kbmMemTable1.FieldByName( ‘KODE’).AsString := ‘XXXX’;
Self.KbmMemTable1.Post;
end;
Run the application and it will fail with external:SIGSEGV
Please help. Thank you
The problem is on kbmmemtable.pas line 12870:
DataEvent(deFieldChange, TkbmNativeInt(Field) );
it seems the casting to TkbmNativeInt is not correct. If I change the line to:
DataEvent(deFieldChange, int64(Field) );
the problem goes away.
So the problem must be in the definition of TkbmNativeInt in KbmMemTypes.pas line 31:
{$IFDEF LEVEL16}
TkbmNativeInt = nativeint;
TkbmNativeUInt = nativeuint;
{$ELSE}
TkbmNativeInt = integer; <=== here
TkbmNativeUInt = cardinal;
{$ENDIF}
What’s LEVEL16?
Hi,
Thank you for your bugreport and direction to the issue on your platform. I will have a look at it. LEVEL16 refers to Delphi version. What seems to be missing here, and why it didnt show as a problem in Lazarus 32 bit, is a test for FPC, in which case nativeint most likely always should be used.
best regards
Kim/C4D