#1 2015-10-15 14:11:33

cypriotcalm
Member
Registered: 2015-02-18
Posts: 122

assertion failed in SynCrtSock in row 5284

Hi Ab,

why do I get this assertion failed?!

  function RetrieveHeaders(const Request: HTTP_REQUEST; out RemoteIP: SockString): SockString; 

  ...

  if RemoteIP<>'' then begin
    move(REMOTEIP_HEADER[1],D^,REMOTEIP_HEADERLEN);
    inc(D,REMOTEIP_HEADERLEN);
    move(pointer(RemoteIP)^,D^,length(RemoteIP));
    inc(D,length(RemoteIP));
    PWord(D)^ := 13+10 shl 8;
  end;
  {$ifopt C+}
  inc(D,2);
  assert(D-pointer(result)=L);
  {$endif}

   ...

I don't know why but the variable RemoteIP is empty!?

If I start your sample project "\04 - HTTP Client-Server\Project04Server.dproj", everything is okay.

There is an error if I start the exe from the IDE. Otherwise if I run the exe as administrator everythig is fine.

What could be reasons?!

Offline

#2 2015-10-15 15:21:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,048
Website

Re: assertion failed in SynCrtSock in row 5284

Offline

#3 2015-10-16 11:52:30

cypriotcalm
Member
Registered: 2015-02-18
Posts: 122

Re: assertion failed in SynCrtSock in row 5284

Great! It works! Thank you!



But I have here another Problem! Maybe you know what is going wrong! The interesting thing is that it has worked a couple days ago :-(

In the application I use a FireDAC connection to an external MySQL database. If I start the server-exe everything is working fine, if I start the server from the IDE, I get two successive erros:

1) EMySQLNativeException [FireDAC][Phys][MySQL]: Unknown MySQL server host "localhost" (0)
2) ESQLite3Exception [FireDAC][Phys][MySQL]: Unknown MySQL server host "localhost" (0)

Do you have some suggestions?

Last edited by cypriotcalm (2015-10-16 11:52:51)

Offline

Board footer

Powered by FluxBB