SimpleIPCServer crashing on OSX lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Josh · 2019-02-18 13:46 Hi I have a strange problem. I have a application that can receive instruction from console app, this works well in windows 32/64bit. On mac, when I run the 'server' app crashes with : raised exception class :'EInOutError\x10' with message Invalid File Handle. I have traced the error to IPCSErver.Message procedure. The Code I have that read the message in a timer is Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if ((my_ipcserver_running=true) and (My_IPCServer.Active) and (My_App_Started)) thenbegin  If  My_IPCServer.PeekMessage(2,false) then  begin     My_IPCServer.ReadMessage;   <-- This is what fires the error.  end;end;  I am wondering if the IPCServer is usig temp files for messages; if it is; is it likely that you will not be able to run from within a bundle. Has anyone else had a similar problem. Josh ---------------------------------------------------------------------- lucamar · 2019-02-18 18:37 It uses a file (a FIFO named pipe), but it's created in the temp dir. From {fpc_source}/packages/fcl-process/src/unix/simpleipc.inc Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i constructor TPipeServerComm.Create(AOWner: TSimpleIPCServer);begin  inherited Create(AOWner);  FFileName:=Owner.ServerID;  If Not Owner.Global then    FFileName:=FFileName+'-'+IntToStr(fpGetPID);  if FFileName[1]<>'/' then    FFileName:=GetTempDir(Owner.Global)+FFileName;end; procedure TPipeServerComm.StartServer; const  PrivateRights = S_IRUSR or S_IWUSR;  GlobalRights  = PrivateRights or S_IRGRP or S_IWGRP or S_IROTH or S_IWOTH;  Rights : Array [Boolean] of Integer = (PrivateRights,GlobalRights);      begin  If not FileExists(FFileName) then    If (fpmkFifo(FFileName,438)<>0) then      DoError(SErrFailedToCreatePipe,[FFileName]);  FStream:=TFileStream.Cre ate(FFileName,fmOpenReadWrite+fmShareDenyNone,Rights[Owner.Global]);en d; I don't how that translates to MacOS, though. ---------------------------------------------------------------------- Josh · 2019-02-19 16:35 Hi Thanks for your reply. I restarted my mac, re-build lazarus and all seems to be working now. Not sure which one fixed it, I suspect re-sarting the mac though, as other apps seems more responsive.