#1 2021-03-08 07:10:29

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 238
Website

RecordSaveJson raises AV

Hi,

can anyone confirm, that a simple console app, only containing

Writeln(RecordSaveJson(Executable, TypeInfo(TExecutable)));

will raise an AV...

Zugriffsverletzung bei Adresse 00000000 in Modul 'IT.exe'. Lesen von Adresse 00000000

( AV at 000000 in module ''. reading address 00000)

mORMot2, current version (GitHub)
Delphi 10.4.2, Win32

Regards,
Daniel

Offline

#2 2021-03-08 09:14:04

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

Re: RecordSaveJson raises AV

What is Executable?
Do the regression tests pass on your computer?

Offline

#3 2021-03-08 09:32:41

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 238
Website

Re: RecordSaveJson raises AV

ab wrote:

What is Executable?

From mormot.core.os, aka ExeVersion (mORMot 1).

ab wrote:

Do the regression tests pass on your computer?

They, currently, do not even compile (Sorry, forgot to write that in the original post)

[dcc32 Error] mormot.db.raw.sqlite3.static.pas(1089): E2065 Unsatisfied forward or external declaration: 'sqlite3_progress_handler'
[dcc32 Error] mormot.db.raw.sqlite3.static.pas(1094): E2065 Unsatisfied forward or external declaration: 'sqlite3_stmt_scanstatus'
[dcc32 Error] mormot.db.raw.sqlite3.static.pas(1095): E2065 Unsatisfied forward or external declaration: 'sqlite3_stmt_scanstatus_reset'
......
[dcc32 Fatal Error] mormot2tests.dpr(709): F2063 Could not compile used unit 'mormot.db.raw.sqlite3.static.pas'

Regards,
Daniel

Last edited by sakura (2021-03-08 09:33:07)

Offline

#4 2021-03-08 11:10:37

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

Re: RecordSaveJson raises AV

1. You need to download the latest static from https://github.com/synopse/mORMot2/rele … ite.3.34.1

2. TExecutable is not serializable for sure.
It was never meant to.
There is an embedded class field - TFileVersion - which prevents JSON Serialization.

Offline

#5 2021-03-08 11:35:19

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 238
Website

Re: RecordSaveJson raises AV

ab wrote:

1. You need to download the latest static from https://github.com/synopse/mORMot2/rele … ite.3.34.1

I thought, I did :-o Only unpacked, but forgot to move...

ab wrote:

2. TExecutable is not serializable for sure.
It was never meant to.
There is an embedded class field - TFileVersion - which prevents JSON Serialization.

My bad, but would have been cool to use directly for mustache ;-)

Thanks,
Daniel

Offline

Board footer

Powered by FluxBB