You are not logged in.
I have just installed the latest mORMot release to check its remote logging capabilities.
RemoteLoggingTest project built with Delphi 10.3.1 works fine, but … raises AV exception on exit (exception class $C0000005 with message 'access violation at 0x00000000: read of address 0x00000000').
It looks that the code breakes in TSynLogFamily.EchoRemoteStop in attempt to execute fEchoRemoteEvent which has been already set to nil but fEchoRemoteClientOwned remains true.
Offline
I met the same AV when trying to test the Remote Logging.
1. By using the RemoteLoggingTest to connect to the Remote Logger Server, the reconnection will fail(Connect --> Disconnect --> Connect).
It seems there is a bug in the following procedure:
procedure TSynLogFamily.EchoRemoteStop;
begin
if fEchoRemoteClient=nil then // testing fEchoRemoteClient
exit;
........
fEchoRemoteClient := nil; // should be added
fEchoRemoteEvent := nil;
end;
2. If the RemoteLoggingTest is still in Connection state, and try to close it, AV will ocure here:
procedure TSQLHttpClientGeneric.InternalURI(var Call: TSQLRestURIParams);
.....
begin
......
{$ifdef WITHLOG}
with Call do // AV occurs here, because procedure TSQLRestThread.Execute; calls InternalURI
log.Log(sllClient,'% % status=% len=% state=%',
[method,url,OutStatus,length(OutBody),OutInternalState],self);
{$endif}
end;
I don't know how to fix the second AV. The program is in the process of closing, but the thread does not know that.
Offline
By adding the following procedure in the client side, the AV on exit can be fixed.
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
btnDisconnectClick(Self);
CanClose := True;
end;
Last edited by Micky60 (2019-10-20 00:13:24)
Offline
I ran into a similar problem.
The code is definitely missing:
fEchoRemoteClient: = nil;
in procedure TSynLogFamily.EchoRemoteStop;
@ab could you fix the code?
Offline
Please check https://synopse.info/fossil/info/f9dfc9b1b8
Offline
Please check https://synopse.info/fossil/info/f9dfc9b1b8
Offline
Thanks
Offline