#1 2014-03-13 18:51:28

tech
Member
Registered: 2014-01-13
Posts: 107

EAccessViolation in module ntdll.dll at 0001E12C

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

#2 2014-03-14 00:15:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: EAccessViolation in module ntdll.dll at 0001E12C

Use Fastmm4 in full debugg mode.

It will certainly help you identifying the issue.

Offline

#3 2014-03-14 09:13:57

tech
Member
Registered: 2014-01-13
Posts: 107

Re: EAccessViolation in module ntdll.dll at 0001E12C

Hi ab,

I just use FastMM4 in full debugg mode and EA has vanished without any memory leak !?

There are somethings wrong

Offline

#4 2014-03-14 09:32:04

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: EAccessViolation in module ntdll.dll at 0001E12C

We are not able to reproduce it here...

Have you some code to reproduce the issue?

Offline

#5 2014-03-14 09:44:49

tech
Member
Registered: 2014-01-13
Posts: 107

Re: EAccessViolation in module ntdll.dll at 0001E12C

I can send you the whole project but by private email if you wish.

Offline

Board footer

Powered by FluxBB