You are not logged in.
mORMot2, Commit 6984, Delphi XE, 32Bit
If the returned object has empty string fields, an AV occurs. Fields with text content have no problems.
Error message:
An exception of class EAccessViolation with message "Access violation at address 00604E98" has occurred. Reading address 0EFFFFF8 occurred.
The call stack is:
mormot.core.data.TRawUtf8Interning.Unique(???,'',0)
mormot.core.json._JL_RawUtf8($2ACEADC {''},$12EC84)
mormot.core.json._JL_RttiCustomProps('q',$12EC84)
mormot.core.json._JL_RttiCustom('q',$12EC84)
mormot.core.json._JL_RttiObjectWithID('¬ê¬'#2#$12#$F'P',$12EC84)
mormot.core.interfaces.TInterfaceMethodArgument.SetFromJson(...)
JSON looks like this:
'{RowID:0,ActiveState:0,CreatedAt:0,ModifiedAt:0,RecVersion:0,Username:"",Password:""},false]'
Function FastAssignNew in TRawUtf8Interning.Unique() fails:
procedure TRawUtf8Interning.Unique(
...
if (aText = nil) or
(aTextLen <= 0) then
FastAssignNew(aResult)
With values: aText = '' and aTextLen = 0
With best regards
Thomas
Offline
I am not able to reproduce.
https://github.com/synopse/mORMot2/commit/da37c846
and
https://github.com/synopse/mORMot2/commit/0de80c3c
Do you have more clue?
Online
Do you have more clue?
Sorry Arnaud, I made a stupid copy-paste mistake. Everything is fine with mORMot. The nasty thing was, the Delphi debugger totally misled me. I shouldn't work until the middle of the night. The only good thing was that I got some new ideas from all the debugging. Sorry again for the false alarm.
With best regards
Thomas
Offline
No problem.
I was just lost in conjectures about the issue.
Providing a MRE in such context is always a good idea.
https://stackoverflow.com/help/minimal- … le-example
It helps a lot.
Or sleeping at night, too. I understand the problem very well, but since some years I tend to "unplug" at least every night and weekends.
Online