Recent

Author Topic: Error on starting debugserver  (Read 1407 times)

Soner

  • Sr. Member
  • ****
  • Posts: 319
Error on starting debugserver
« on: August 20, 2020, 02:55:49 pm »
I get the error "This operation is illegal when the server is active" when i start the debugserver from tools folder.
I made following changes in frmmain.pas and now it starts without error.
Code: Pascal  [Select][+][-]
  1. procedure TMainForm.StartServer;
  2. begin
  3.   //i added to the next line "self",  because if the debugserver crashes,
  4.   // then FSrv will be not freed and you have ghost task
  5.   FSrv:=TSimpleIPCServer.Create(self);  // original was: FSrv:=TSimpleIPCServer.Create(Nil);
  6.   FSrv.ServerID:=DebugServerID;
  7.   FSrv.Global:=True;
  8.   //comment out the next line because it cause the error.
  9.   //FSrv.Active:=True;
  10.   FSrv.StartServer;
  11.   Application.OnIdle:=@CheckMessages;
  12.   ITMessages.Enabled:=True;
  13. end;
  14.  
  15.  

I have lazarus 2.0.10. but this code is same with svn-version and lazarus 1.8.
May the code from TSimpleIPCServer is changed.

Maybe someone can change it in offical sources, when my solution is correct.

Edit:
Created patch for this failure.
« Last Edit: August 21, 2020, 11:48:47 am by Soner »

 

TinyPortal © 2005-2018