Recent

Author Topic: my Lazarus IDE does not start any more  (Read 1004 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
my Lazarus IDE does not start any more
« on: February 09, 2023, 11:41:12 am »
My Lazarus 2.2.4 does not start any more.
And I cannot re-compile, because the error-message makes the system think "exe in use".
What can I do? Everything is blocked here.
  :'( :'( :'( :'( :'(


Code: Text  [Select][+][-]
  1. ---------------------------
  2. Error
  3. ---------------------------
  4.   $00000001000BE1BB
  5.  
  6.   $00000001000BDF9D
  7.  
  8.   $00000001000521F3  ModalStarted,  line 340 of include/application.inc
  9.  
  10.   $000000010031BFDB  SaveApplicationState,  line 181 of win32/win32wsdialogs.pp
  11.  
  12.   $00000001001D07BF  PromptUser,  line 760 of win32/win32lclintf.inc
  13.  
  14.   $000000010016977F  PromptUser,  line 361 of include/lclintf.inc
  15.  
  16.   $00000001002209EA  MessageDlg,  line 148 of include/messagedialogs.inc
  17.  
  18.   $0000000100220B90  MessageDlg,  line 179 of include/messagedialogs.inc
  19.  
  20.   $0000000100071728  IDEMESSAGEDIALOGHANDLER,  line 3649 of main.pp
  21.  
  22.   $0000000100506B1A  IDEMessageDialog,  line 124 of idedialogs.pas
  23.  
  24.   $000000010066AF11  SHOWBROKENDEPENDENCIESREPORT,  line 3823 of ../packager/pkgmanager.pas
  25.  
  26.   $000000010066906D  OPENPROJECTDEPENDENCIES,  line 3310 of ../packager/pkgmanager.pas
  27.  
  28.   $000000010081DD30  COMPLETELOADINGPROJECTINFO,  line 7429 of sourcefilemanager.pas
  29.  
  30. Call trace for block $000000001B48FFA0 size 24
  31.  
  32.   $0000000100014882
  33.  
  34.   $000000010001123A
  35.  
  36.   $0000000100011035
  37.  
  38.   $00000001000521CD  ModalSt
  39. ---------------------------
  40. OK  
  41. ---------------------------
  42.  
  43.  
  44. ---------------------------
  45. Error
  46. ---------------------------
  47.   $00000001000521CD  ModalStarted,  line 339   $000000010031BFDB  SaveApplicationState,  line 181 of win32/win32wsdialogs.pp
  48.  
  49.   $00000001001D07BF  PromptUser,  line 760 of win32/win32lclintf.inc
  50.  
  51.   $000000010016977F  PromptUser,  line 361 of include/lclintf.inc
  52.  
  53.   $00000001002209EA  MessageDlg,  line 148 of include/messagedialogs.inc
  54.  
  55.   $0000000100220B90  MessageDlg,  line 179 of include/messagedialogs.inc
  56.  
  57.   $0000000100071728  IDEMESSAGEDIALOGHANDLER,  line 3649 of main.pp
  58.  
  59.   $0000000100506B1A  IDEMessageDialog,  line 124 of idedialogs.pas
  60.  
  61.   $000000010066AF11  SHOWBROKENDEPENDENCIESREPORT,  line 3823 of ../packager/pkgmanager.pas
  62.  
  63.   $000000010066906D  OPENPROJECTDEPENDENCIES,  line 3310 of ../packager/pkgmanager.pas
  64.  
  65.   $000000010081DD30  COMPLETELOADINGPROJECTINFO,  line 7429 of sourcefilemanager.pas
  66.  
  67.   $000000010080F5C2  INITOPENEDPROJECTFILE,  line 3715 of sourcefilemanager.pas
  68.  
  69.   $000000010007BE77  DOOPENPROJECTFILE,  line 6480 of main.pp
  70.  
  71. Call trace for block $000000001B49E7A0 size 32
  72.  
  73.   $000000010001D5
  74. ---------------------------
  75. OK  
  76. --------
-------------------



Code: Text  [Select][+][-]
  1. ---------------------------
  2. Error
  3. ---------------------------
  4.   $000000010069D238    $000000010080BB7D  CLOSEEDITORFILE,  line 2733 of sourcefilemanager.pas
  5.  
  6.   $0000000100810D39  CLOSEPROJECT,  line 4113 of sourcefilemanager.pas
  7.  
  8.   $000000010007B632  DOCLOSEPROJECT,  line 6348 of main.pp
  9.  
  10.   $000000010007BE31  DOOPENPROJECTFILE,  line 6472 of main.pp
  11.  
  12.   $0000000100805A2E  OPENUNKNOWNFILE,  line 1063 of sourcefilemanager.pas
  13.  
  14.   $00000001008056B9  OPENUNKNOWN,  line 1008 of sourcefilemanager.pas
  15.  
  16.   $0000000100806A51  OPENEDITORFILE,  line 1334 of sourcefilemanager.pas
  17.  
  18.   $0000000100803573  OPENEDITORFILE,  line 354 of sourcefilemanager.pas
  19.  
  20. Call trace for block $0000000005BD9860 size 76
  21.  
  22.   $0000000100014882
  23.  
  24.   $000000010000A883
  25.  
  26.   $000000010000BAE2
  27.  
  28.   $000000010000AC56
  29.  
  30.   $00000001003D83CF  FindDiskFilename,  line 1697 of directorycacher.pas
  31.  
  32.   $000000010007BB3E  DOOPENPROJECTFILE,  line 6433 of main.pp
  33.  
  34.   $0000000100805A2E  OPENUNKNOWNFILE,  line 1063 of sourcefilemanager.pas
  35.  
  36.   $00000001008056B9  OPENUNKNOWN,  line 1008 of sourcefilemanager.pas
  37.  
  38.   $0000000100806A51  OPEN
  39. ---------------------------
  40. OK  
  41. ---------------------------

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: my Lazarus IDE does not start any more
« Reply #1 on: February 09, 2023, 11:46:09 am »
When Lazarus is closed, go into your Lazarus folder, there is a file called "lazarus.old.exe" what should represent the last working version of your build.
Rename that file to "lazarus.exe" and launch. (for safety create another backup of your current "lazarus.exe" before doing it...)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: my Lazarus IDE does not start any more
« Reply #2 on: February 09, 2023, 12:22:32 pm »
What can I do? Everything is blocked here.

What have you done?

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: my Lazarus IDE does not start any more
« Reply #3 on: February 09, 2023, 03:09:30 pm »
Restart the PC, its Windows. And sometime a exe can be blocked by the AV. So look after the restart if you see something in the Logs.

And what was your last action before ?!
regards
Andreas

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: my Lazarus IDE does not start any more
« Reply #4 on: February 09, 2023, 04:18:27 pm »
Thank you so much!
I restarted my operating system (Win 7 within a VMWare VM) and it works again.

The problem must have had more effected than the lazarus.exe.
Probably it touched the system itsself.

What I have done?
Not quite sure, but pretty sure (I will not retry):
I started the project, which shall do my ping for the test of the internet-connection.

I re-upload it again.
Does not look dangerous at all.

► ► ► CAREFUL, do not open the project without reading this thread!



wp

  • Hero Member
  • *****
  • Posts: 11855
Re: my Lazarus IDE does not start any more
« Reply #5 on: February 09, 2023, 06:10:32 pm »
No issue with your sample on my Win-11 (real PC)...

Found the following code in an internet search for "ping lazarus" (https://www.lazarusforum.de/viewtopic.php?t=10095). It is windows-only, but does not use any third-party libraries (only the Jedi translation coming with FPC):
Code: Pascal  [Select][+][-]
  1. uses
  2.   Windows, jwaIcmpApi, jwaIpExport;
  3.  
  4. function Ping(IP:string; TimeOut:Cardinal):Boolean;
  5. var
  6.   hICMP : DWORD;
  7.   pierWork : PICMP_ECHO_REPLY;
  8.   dwSize : DWORD;
  9.   Class1: String = '';
  10.   Class2: String = '';
  11.   Class3: String = '';
  12.   Class4: String = '';
  13.   i,j : Byte;
  14. begin
  15.   Result:=False;
  16.   j:=1;
  17.   for i:=1 to Length(IP) do begin
  18.     if IP[i]<>'.' then begin
  19.       case j of
  20.         1: Class1:=Class1+IP[i];
  21.         2: Class2:=Class2+IP[i];
  22.         3: Class3:=Class3+IP[i];
  23.         4: Class4:=Class4+IP[i];
  24.       end;
  25.     end else
  26.       Inc(j);
  27.   end;
  28.   hICMP := IcmpCreateFile;
  29.   if hICMP = INVALID_HANDLE_VALUE then exit;
  30.   try
  31.     dwSize := SizeOf(ICMP_ECHO_REPLY)+8;
  32.     pierWork := AllocMem(dwSize);
  33.     try
  34.       Result := IcmpSendEcho(hICMP,
  35.         MAKELONG(MAKEWORD(StrToInt(Class1), StrToInt(Class2)), MAKEWORD(StrToInt(Class3), StrToInt(Class4))),
  36.         nil, 0, nil, pierWork, dwSize, TimeOut) <> 0
  37.     finally
  38.       FreeMem(pierWork,dwSize);
  39.     end;
  40.   finally
  41.     IcmpCloseHandle(hIcmp);
  42.   end;
  43. end;
  44.  
  45. procedure TForm1.Button1Click(Sender: TObject);
  46. begin
  47.   if Ping(Edit1.Text, 1000) then
  48.     Memo1.Lines.Add('ok')
  49.   else
  50.     Memo1.Lines.Add('ERROR');
  51. end;
It is working correctly on my system (as I said: Win-11/real PC, as well as Win-7/VirtualBox-VM).
« Last Edit: February 09, 2023, 06:22:34 pm by wp »

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: my Lazarus IDE does not start any more
« Reply #6 on: February 09, 2023, 07:38:29 pm »
It becomes stranger and stranger.
I did something completely different now: Nothing but copy and paste the method ping of your posting.
Grabbing one of my frames and a class there and added the function "ping" to this class.


So here are the stranger things:

you remember a very old thread?
The code which grabs a pdf file from the internet, converts it to pdf?
This code works very fine since months.
And this code was in the chosen class by good luck.

This code contains 3 lines with nothing special, reading
Code: Pascal  [Select][+][-]
  1.   if FileExists(PDF_FILE) then DeleteFile(PDF_FILE);
  2.   if FileExists(TXT_FILE) then Deletefile(TXT_FILE);
  3.   if FileExists(TXT_FILE) then Deletefile(Change_txt_datei);
 
 
when I add
Code: Pascal  [Select][+][-]
  1.   "uses windows"

the third of these 3 lines produces the error code
Code: Pascal  [Select][+][-]
  1.   frame_margin_.pas(172,59) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "PChar"
  2.  
 
removing the "windows" from the uses clause makes
   
  //  if hICMP = INVALID_HANDLE_VALUE then exit;

not work any more.
Which is not surprising.

Surprising for me - perhaps not for you - is the error message of the third line, which happens, if I add "windows" to the uses clause.


KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: my Lazarus IDE does not start any more
« Reply #7 on: February 09, 2023, 08:10:00 pm »
Nicole, I gave you here already a pre-made solution.
Since you have hard problems to integrate it I made it into your source.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: my Lazarus IDE does not start any more
« Reply #8 on: February 09, 2023, 08:47:48 pm »
I am afraid, you cannot write good solution as quickly, as I destroy them. For today my whole VM was shot. Not just Lazarus, but all of my VM. Brought it to restart in the evening.

Your solution was in my class already.
Did not compile.
This has nothing to do with your solution.
There seems to be a conflict with a different internet-handle-solution I used somewhere else.
It has disadvantages to use things, you do not understand. ;-)

So I searched my last backup and reset all.

Thank you so much for the project!
Nothing of your care is lost. I have an own backup-directory for demos sorted by topic.
Much of this forum is saved there in the meanwhile.




 

TinyPortal © 2005-2018