You are not logged in.
Hi all,
I got this AV when freeing my server.
---------------------------
Application Error
---------------------------
Exception EAccessViolation in module ntdll.dll at 0001E12C.
Access violation at address 76F5E12C in module 'ntdll.dll'. Write of address 00000014.
---------------------------
OK
---------------------------
The AV occurs exactly here :
destructor THttpApiServer.Destroy;
var i: integer;
begin
if (fClones<>nil) and (Http.Module<>0) then begin // fClones=nil for clone threads
if fReqQueue<>0 then begin
if Http.Version.MajorVersion>1 then begin
if fUrlGroupID<>0 then begin
Http.RemoveUrlFromUrlGroup(fUrlGroupID,nil,HTTP_URL_FLAG_REMOVE_ALL);
Http.CloseUrlGroup(fUrlGroupID);
end;
CloseHandle(FReqQueue);
if fServerSessionID<>0 then
Http.CloseServerSession(fServerSessionID);
end else begin
for i := 0 to high(fRegisteredUnicodeUrl) do
Http.RemoveUrl(fReqQueue,pointer(fRegisteredUnicodeUrl[i]));
CloseHandle(fReqQueue); // will break all THttpApiServer.Execute
end;
fReqQueue := 0;
Http.Terminate(HTTP_INITIALIZE_SERVER);
end;
FreeAndNil(fClones);
end;
inherited Destroy; <=================================== AV here
end;
The server is created here :
Server := TSQLHttpServer.Create(SERVER_HTTP_PORT,self,'+',useHttpApiRegisteringURI);
and freed on the destroy :
FreeAndNil(Server);
All that like the maindemo of synFile.
I don't know what I'm doing wrong here.
Offline
Hi ab,
I just use FastMM4 in full debugg mode and EA has vanished without any memory leak !?
There are somethings wrong
Offline
I can send you the whole project but by private email if you wish.
Offline