lnet GetMessage problem under FreeBSD lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- fastblade · 2011-12-20 02:50 Hi, I have a server side running under FreeBSD, when I use lnet 0.6.2, there is no problem, but after I change to 0.6.5, I meet 'Access violation'. I can locate the point where the exception raised. class TServerConnections manage all tcp connections from network and listen for all new connection request.  The code is: procedure TServerConnections.OnRead(aSocket : TLSocket); Var  .... begin  i := FCon.GetMessage(s,aSocket);  if i > 0 then  begin   if aSocket.UserData = nil then    begin     aSocket.disconnect;     exit;    end;   pUser := TSingleUser(aSocket.UserData);   pUser.Buffer := pUser.Buffer + s;   ...  end; end; If I use 0.6.5, this code will raise exception randomly, maybe after the server run 1 hour or 10 hours, or the concurrent connections exceed 80 or 200 etc... The exception raised at FCon.GetMessage(s), there is a BUFFER_SIZE in lcommon.pp, in 0.6.2, value is 65535, but in 0.6.5, value is 262144, is this difference makes the problem occur? ---------------------------------------------------------------------- Almindor · 2012-01-06 22:13 That's odd, could you please try changing it back to 65k and see if it is really related? Random crashes however are usually deeper problems, like memory corruption etc...