You are not logged in.
Pages: 1
Okay - haven't yet installed 10.4... Probably haveto and test
unassigned interface returned as function parameter is freeed much earlier not in end of method
For example
https://quality.embarcadero.com/browse/RSP-30050
Hi,
We are considering to upgrade from 10.3.1 to 10.4.x
Is TAutoFree working in 10.4 as expected?
Intresting,
I have enabled logging
with TSQLLog.Family do
Level := LOG_VERBOSE;
And my public server is created (also interface based server in same app)
lPubserver := TPublicServer.CreateWithOwnModel( [ ], false, 'api' );
HTTPServer := TSQLHttpServer.Create( PORT_NAME, [ lInterfacebasedServer, lPubserver], '+', useBidirSocket );
HTTPServer.WebSocketsEnable( Server, Taustapalvelukey ).Settings.SetFullLog;
I make a call wget http://127.0.0.1:5854/foo and in log I have
20191112 16235513 info SetThreadName 20a4=TSQLHttpServer 5854/root api TWebSocketServerRest
20191112 16235513 trace mORMot.TSQLRestServerFullMemory(09acdb70) BeginCurrentThread(TWebSocketServerRest) root=root ThreadID=20a4 ThreadCount=1
20191112 16235513 trace taustapalveluInit.TPublicServer(09acdf90) BeginCurrentThread(TWebSocketServerRest) root=api ThreadID=20a4 ThreadCount=1
20191112 16235513 - 00.004.601
HI,
During Ekon 23 I wrote changes to use Actian ZEN ( Pervasive SQL ) with SynDB.
Before publishing my changes I'd like to test how does it work with Mormot ORM.
So is there ready .dpr for testing ORM with DB.
Of course I could write an application by my self - but because I have not used it at all - learning curve is High (event tough I have watched AB's great sessions in EKON ) and don't currently have time for it.
Hi,
Is it possible to log every connection (urls) made to server to support developer team in problems.
I have rest server running. url:port/api and if I try for example wget url:port/ap/something i only see that connection is tried but not what url it was.
Thanks
mika
Thanks. SOme how have missed that.
Hi,
I have mormot server ( TSQLRestServerFullMemory / TSQLHttpServer ) with few interfaces
Server and my test bench work fine. But when I call from another application I receive exception "sicShared execution failed (probably due to bad input parameters)"
interface unit is same (triple checked)
Called method is defined
function RahastaPoyta(const aKanta, aPoyta, aPaikka: string; const aMaksutavat: TMaksutapaArray): String;
and TMaksutapaArray is defined
TKaytettyMaksutapa = record
NRO: integer;
Summa: double;
Annettu: double;
end;
TMaksutapaArray = tarray< TKaytettyMaksutapa >;
Server log for error is
20190903 07482618 + mORMot.TSQLRestServerFullMemory(06022f90).URI POST root/TaustaBusiness.RahastaPoyta in=64 B
20190903 07482618 call mORMot.TSQLRestServerFullMemory(06022f90) ITaustaBusiness.RahastaPoyta["ravintola","9","",["FAABAQBfQAEAAAAAAAAAAABZQAAAAAAAAAAA"]]
20190903 07482618 debug mORMot.TSQLRestServerFullMemory(06022f90) TSQLRestRoutingREST.Error: { "errorCode":406, "errorText":"sicShared execution failed (probably due to bad input parameters) for TaustaBusiness.RahastaPoyta" }
and ok log is
20190903 07523704 + mORMot.TSQLRestServerFullMemory(060d5460).URI POST root/TaustaBusiness.RahastaPoyta in=70 B
20190903 07523704 call mORMot.TSQLRestServerFullMemory(060d5460) ITaustaBusiness.RahastaPoyta["kirkar","17","",["GAABAQBeQAEAAAAAAAAAAAAAAAAAWUAAAAAAAAAAAA=="]]
20190903 07523727 srvr mORMot.TSQLRestServerFullMemory(060d5460) POST root/TaustaBusiness.RahastaPoyta Interface=200 out=34 B in 377.05ms
20190903 07523727 ret mORMot.TSQLRestServerFullMemory(060d5460) {"result":["{\"status\":\"OK\"}"]}
As we can see last parameter (array) is different in two cases.
Both cases that array is same and it's initialized actually by copied code.
setlength(a,1);
a[0].NRO := 1;
a[0].Summa := 100;
a[0].Annettu := 0;
What makes the difference in last parameter? How does mormot encode arrays ?
Thanks, with _safe(b) it worked.
Hi,
I'm writing routine to compare two json objects (DocVariant). All elements in original must be in other json, but other json can contain some extra elements and order can vary. For that I need to detect type of individual elements
a := _json('{"arr":[1,2,3],"integer":2,"isnull":null,"str":"somestring","float":3.14,"subobject":{"a":"b","c":1}}');
for I := 0 to a._count-1 do
begin
s := a.name(i);
Writeln('Object name: ',s,' -------------');
b := a._(i);
if varisnull( b) then
Writeln('is null')
else
begin
Writeln( 'Docvariantdata: ',Tdocvariantdata ( b).VarType );
Writeln( 'kind: ',ord(Tdocvariantdata ( b).Kind) );
end;
end;
Will print
Object name: arr -------------
Docvariantdata: 16396
kind: 0
Object name: integer -------------
Docvariantdata: 3
kind: 0
Object name: isnull -------------
is null
Object name: str -------------
Docvariantdata: 16396
kind: 0
Object name: float -------------
Docvariantdata: 6
kind: 0
Object name: subobject -------------
Docvariantdata: 16396
kind: 0
so array, string and object are exactly same! What i'm missing?
Of course I could convert b to string and check if it starts with [ or { but that somehow seems stupid
thanks
mika
Yes!
I opened my D2007 virtual and had no problems. This memory leak occurs with D10.1 Berlin and D10.2 Tokyo update 2.
In D10.1 I tried with and without fastmm4.
Hi,
Look's like this is causing memory leak (6 x ansistring and 2 x unknown)
var
src,a: Variant;
begin
TDocVariant.New( src );
src.text := 'something';
src.attachments := _Obj(['field1','abc','field2','def','field3','foofoo']);
end;
And this is not
var
src,a: Variant;
begin
TDocVariant.New( src );
src.text := 'something';
a := _Obj(['field1','abc','field2','def','field3','foofoo']);
src.attachments := a;
end;
Is this supposed to be like this?
(Sorry I haven't yet figured out of all fine details of TdocVariant, even we use it quite much)
mika
Thanks for reply.
I'll have to look these more closelly.
There is still much for me to understand from websockets ...
Hi,
I have build notification to my server / client. It's basically like samples Project31ChatClient / Project31ChatServer
Now I learned that we need to get external node.js application to receive and send notifications.
Can this be done or do i have to write some kind of server to middle?
thanks,
mika
Pages: 1