#1 2022-12-05 18:07:27

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Error C0000005 with new _JS_RttiCustom

Hi AB
today i updated my mORMot and now i get an C0000005 in _JS_Enumeration  line   Ctxt.W.AddU(Data^); (Data = $9) (Not a valid Adress)
This is called from _JS_RttiCustom.

I Replaced the _JS_RttiCustom with the former one and no Exception is raised and JSON produced as expected.

You patched it in Commit: 7d39c5ff4f4faac2a104112514ff290394a08ef7


Rad Studio 12.1 Santorini

Offline

#2 2022-12-05 18:11:34

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

Re: Error C0000005 with new _JS_RttiCustom

What is the serialized class or record definition ?

Perhaps you have a class property which is nil.
Please try https://github.com/synopse/mORMot2/commit/36fcd891

Offline

#3 2022-12-06 08:35:59

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: Error C0000005 with new _JS_RttiCustom

Ty Arnaud

it works without Exception now !

The Property raising Exception was an Enumeration like this:

TMyClass = class(TSynPersitent)
protected
...
fState : TMyState;
...
published
property ServerState : TMyState read fState;
...

Nothing speciell state had Value 3
This was the last value before Exception in JS_RttiColumn p^.name


Rad Studio 12.1 Santorini

Offline

#4 2022-12-06 10:11:15

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

Re: Error C0000005 with new _JS_RttiCustom

Sorry for the issue..

Offline

Board footer

Powered by FluxBB