#1 2020-12-14 14:47:37

flydev
Member
From: France
Registered: 2020-11-27
Posts: 50
Website

MOrmot2, Zeos and Delphi 10.4.1

Hello,

I am new here and I adopted a Mormot v1 some weeks ago and I must say that I am astonished by the strength and the simplicity of the framework

I started to port a - still small - project to Mormot v2 and I ran into an AV when running the program (quite simple), it look like it's related to Zeos and not Mormot but as I am a beginner with Mormot I prefer to ask/post first here.


My setup :
- fresh Delphi Sydney 10.4.1 install (tested on earlier version 10.4 and found a post here in this forum about a compiler bug reported which should have been fixed in 10.4.1)
- fresh clone of mormot2
- latest ZeosLib 7.2.8 (also tested old version)


I can compile and run the test without any issue. But once I try to use external MariaDB database with ZeosLib (it works fine with Mormot v1 and Zeos 7.2.8)


So starting with the following code :

begin
var
  Props: TSQLDBZEOSConnectionProperties;
  aPassword: RawUTF8; // aPassword is set on command line 

Props := TSQLDBZEOSConnectionProperties.Create(RawUTF8('zdbc:mysql://localhost:3306/mydatabase?username=mylogin;password=' + aPassword), 'mydatabase', 'mylogin', aPassword);

[...]
end;

It compile fine, but when running the program crash there :

procedure ClassToText(C: TClass; var result: RawUTF8);
var
  P: PShortString;
begin
  if C = nil then
    result := ''
  else
  begin
    P := PPointer(PtrInt(PtrUInt(C)) + vmtClassName)^;
    FastSetString(result, @P^[1], ord(P^[0])); ❌
  end;
end;


The call stack :

Capture-d-cran-2020-12-14-154354.png



Any hint ? 


Thanks Arnaud and all contributors for this framework smile

Last edited by flydev (2020-12-14 14:55:45)

Offline

#2 2020-12-14 15:04:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: MOrmot2, Zeos and Delphi 10.4.1

This part is not tested at all yet.

As stated in the repo root, mORMt2 is not to be used on production, nor good enough for evaluation.

But thanks for your interest!

Offline

#3 2020-12-14 15:17:16

flydev
Member
From: France
Registered: 2020-11-27
Posts: 50
Website

Re: MOrmot2, Zeos and Delphi 10.4.1

Ok I understand much better. I know it's not ready for production, I am testing it and preparing myself for the release, as well contributing by reporting bugs.

Thanks Arnaud for the answer and again for the work put in Mormot.

Offline

Board footer

Powered by FluxBB