#1 2014-10-21 16:24:21

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

Exception in mORMotWrappers.pas

I get the following error requesting something from the wrapper:

{
"ErrorCode":500,
"ErrorText":"Exception ESynException: TTextWriter.AddVariantJSON(VType=16387)"
}

Log-Entries:

20141021 18192424  +    TSQLRestServerDB(0030CDD0).0059B624 
20141021 18192424 call  	TSQLRestServerDB(0030CDD0) Wrapper
20141021 18192634 EXC   	ESynException ("TTextWriter.AddVariantJSON(VType=16387)") at 0052A477  stack trace API 0053C5D8 0040A900 
20141021 18192636 srvr  	GET JobCloud/wrapper/CrossPlatform/mORMotClient.pas.txt ERROR=500 (Exception ESynException: TTextWriter.AddVariantJSON(VType=16387))
20141021 18192636  -    02.189.861

Rad Studio 12.1 Santorini

Offline

#2 2014-10-21 20:07:30

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

Re: Exception in mORMotWrappers.pas

This was in fact a huge problem within the Delphi RTL itself.
On our side, we used our patched RTL, which was designed to be faster and also safer.

In the Delphi RTL, values are sometimes passed as varByRef, and string are always converted into BSTR/WideString/varOleStr.
This is fine if you want to run OleAutomation dispatch methods, but it does not work as expected if we want to store the supplied value in a TDocVariant, for instance.
I have tried to fix this, in all versions of Delphi, by http://synopse.info/fossil/info/e3a0acb46f

Offline

#3 2014-10-21 20:36:02

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

Re: Exception in mORMotWrappers.pas

tyvm - no it works


Rad Studio 12.1 Santorini

Offline

Board footer

Powered by FluxBB