You are not logged in.
Pages: 1
Lazarus: 2.0.4
FPC: 3.3.1
Unit SynFPCTypInfo modified
procedure FPCDynArrayClear(var a: Pointer; TypeInfo: Pointer);external name 'FPC_DYNARRAY_CLEAR';
procedure FPCFinalizeArray(p: Pointer; TypeInfo: Pointer; elemCount: PtrUInt);external name 'FPC_FINALIZE_ARRAY';
procedure FPCFinalize(Data: Pointer; TypeInfo: Pointer);external name 'FPC_FINALIZE';
procedure FPCRecordCopy(const Source; var Dest; TypeInfo: pointer);external name 'FPC_COPY';
procedure FPCRecordAddRef(var Data; TypeInfo : pointer);external name 'FPC_ADDREF';
Running a program only containing SynCommons unit generated this exception:
Project BodetWS raised exception class 'External: SIGSEGV'.
In file '..\..\..\Developer\lib\mORMot\SynCommons.pas' at line 49337
The exception code:
fElemType := PTypeInfo(aTypeInfo)^.elType;
if fElemType<>nil then begin
{$ifndef HASDIRECTTYPEINFO}
// FPC compatibility: if you have a GPF here at startup, your 3.1 trunk
// revision seems older than June 2016
// -> enable HASDIRECTTYPEINFO conditional below $ifdef VER3_1 in Synopse.inc
// or in your project's options
fElemType := PPointer(fElemType)^; // inlined DeRef()
{$endif HASDIRECTTYPEINFO}
{$ifdef FPC}
if not (PTypeKind(fElemType)^ in tkManagedTypes) then
fElemType := nil; // as with Delphi
{$endif FPC}
end;
Last edited by Hafedh TRIMECHE (2019-10-06 23:10:52)
Offline
Has this been solved? I also get the same exception when running TestSQL3 in Lazarus 2.1.0 rev 62772 / FPC 3.3.1 in Win10.
If so, what is the solution for this issue?
Thanks.
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
Did you make what the comment just above the error said:
// FPC compatibility: if you have a GPF here at startup, your 3.1 trunk
// revision seems older than June 2016
// -> enable HASDIRECTTYPEINFO conditional below $ifdef VER3_1 in Synopse.inc
// or in your project's options
Offline
since I am working with FPC 3.3.1 I assumed it FPC is newer than 3.1.1 and that it was not necessary to add HASDIRECTTYPEINFO.
Is this a wrong assumption / understanding?
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
I changed in Synopse.inc
FROM:
{$ifdef VER3_1} // trunk before 3.2
{$define ISFPC27}
{$define ISFPC30}
{.$define HASDIRECTTYPEINFO}
// define this for trunk revisions older than June 2016 - see
// http://wiki.freepascal.org/User_Changes … mat_change
{$endif}
TO:
{$ifdef VER3_1} // trunk before 3.2
{$define ISFPC27}
{$define ISFPC30}
{$define HASDIRECTTYPEINFO}
// define this for trunk revisions older than June 2016 - see
// http://wiki.freepascal.org/User_Changes … mat_change
{$endif}
Did a rebuild but still a SIGSEV in SynCommos line 50573: fElemType:=PPointer(fElemType)^;
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
If you are using latest trunk, you need to enable this also:
{$define FPC_PROVIDE_ATTR_TABLE}
Offline
Just saw this post: https://synopse.info/forum/viewtopic.php?id=5361
So I decided to go with latest fpcupdeluxe and selected FPC fixes3.2 and Lazarus fixes2.0.
TestSQL3 passed with some errors. At least no SIGSEV's this time :-)
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
Pages: 1