You are not logged in.
Pages: 1
Usually I write and debug in Delphi (windows) and after that I compile in FPC for Linux.
I am having an exception when compiled in Linux by FPC in an interface method and the result (TServiceCustomAnswer) is not returned to the client (try except end inside the interface method is used, nothing caught)
The exception error in the log with the following line of the exception:
20230224 12215901 % EXCOS EAccessViolation (416a31) [R1pchrdv1pchrdv0] at
How a mab is created on linux compiled with FPC? With windows I am using a sample from Tsynlog in mormot1
Offline
I have the following settings in project's properties:
Compilation and Linking:
Optimization Level 0
Nothing else checked
Debugging:
Generate info for the debugger: I tried both Dwarf2 and Dwarf3
Display line numbers checked
Use Heaptrc unit checked
Custom options
-Xm
I am still getting no more info in debug file
What else should I do to enable it?
Thank you in advance
Offline
I give up.... All other methods in the same interface work. I tried to rename it without any change
TRestSys = class(TInjectableObjectRest, IRestSys)
public
function nicupdate(const hostname,ip4,ip6:RawUtf8):TServiceCustomAnswer;
end;
....
function TRestSys.nicupdate(const hostname,ip4,ip6: RawUtf8): TServiceCustomAnswer;
begin Result.status:=200; result.header:=JSON_CONTENT_TYPE_HEADER; Result.content:='{"Hello": "there"}'; end;
20230225 10383249 $ + mormot.rest.memserver.TRestServerFullMemory(7f2a2912cf90).URI POST pchrd/v0/Restsys/nicupdate in=19 B
20230225 10383249 $ call mormot.rest.memserver.TRestServerFullMemory(7f2a2912cf90) RestSys.nicupdate["ddd","ddd","ddd"]
20230225 10383249 $ EXCOS EAccessViolation (416a41) [R1pchrdv1pchrdv0] at
20230225 10383254 $ debug mormot.rest.memserver.TRestServerFullMemory(7f2a2912cf90) TRestServerRoutingRest.Error: { "errorCode":500, "error": {"EAccessViolation": { "ClassName": "EAccessViolation", "Address": "7f2a2790d400", "Message": "Access violation" }} }
20230225 10383254 $ srvr Interface POST pchrd/v0/Restsys/nicupdate=500 out=157 B in 86.10ms
20230225 10383254 $ ret mormot.rest.server.TRestServerRoutingRest(7f2a266743d0) { "errorCode":500, "error": {"EAccessViolation": { "ClassName": "EAccessViolation", "Address": "7f2a2790d400", "Message": "Access violation" }} }
20230225 10383254 $ - 00.086.132
Offline
In nginx's logs I noticed now from my previous attempts where I used html content type that nginx has logged the following:
2023/02/25 12:05:40 [error] 289105#289105: *2 upstream sent invalid header: "text/html;\x20..." while reading response header from upstream, client: x.x.x.x, server: xxx.yyy.zzz, request: "POST /pchrd/v0/restsys/nicupdate HTTP/1.1", upstream: "http://127.0.0.1:10480/pchrd/v0/restsys/nicupdate", host: "xxx.yyy.zzz"
Offline
Offline
Pages: 1