Should be properly working now with https://github.com/synopse/mORMot2/commit/8d3dc2b2
I bless our aggressive regression tests to be able to reproduce such issues, and the verbose logs to make the root cause obvious: on production, it could have been awful to debug!
]]>Concerning the problem in this tread, it works now OK and the problem described here https://synopse.info/forum/viewtopic.php?id=6491 is also fixed.
Thank you a lot @ab
But anyway, please try if https://github.com/synopse/mORMot2/commit/2c2a774b makes a difference.
]]>WR.SetText(Ctxt.Call.OutBody);
and especially, in mormot.core.base, line 11548,
FastAssignUtf8(Text, fDataString) // FPC expects this
As far as I can see Text is zero length empty string and FDataString has a value of '[]'.
My method is:
function TinterP.GetOrders(const sdat, edat: rawutf8; const pid: int64): TServiceCustomAnswer;
var ..... sdat_,edat_:RawUtf8; _pid:Int64; v:variant; p:Tid;
begin ..... p:=0; ......
v:=MyTrestserverDB.Orm.RetrieveDocVariantArray(Tormmyorm,'aa','pid=? and sdat>=? AND edat2<=?',[_pid,sdat_,edat_],'RowID,edat,sdat,extra,lastupd',@p);
if p=0 then result:=prepSCA(204,'[]') else result:=prepSCA(200,VariantToUtf8(v.aa));
end;
prepSCA is just a function to return a TServiceCustomAnswer with the arguments.
If the query has results everything is OK. If it is empty an exception happens, only in linux
I am using Lazarus 2.2.7 (rev ada7a90f86) FPC 3.2.3 x86_64-linux-gtk2
For FPC/Lazarus, use the fpdebug debugger which is much more stable and usable that gdb.
]]>I just run all mormot tests with FastMM4 in FullDebugMode with no issue reported.
Do the same for your own code.
You can write as many interface as you want in a single TRestServer.
Perhaps there is a problem with the fact that you have two TRestServer in your HTTP server, and that they have '/' in their Model.Root.
]]>