Recent

Author Topic: IDE freezes on SelectDirectory  (Read 2949 times)

Roman

  • New Member
  • *
  • Posts: 24
IDE freezes on SelectDirectory
« on: January 24, 2023, 09:04:57 am »
I created a program with:
 
Code: Pascal  [Select][+][-]
  1. SelectDirectory('Select folder','D:\',folderName);
The compiled program works fine, but running it from IDE the IDE freezes. Is it a bug or I missed something?

I am using: Windows 10 home 22H2
Lazarus 2.2.4 (rev lazarus_2_2_4) FPC 3.2.2 x86_64-win64-win32/win64
installed from lazarus-2.2.4-fpc-3.2.2-win64.exe 

Handoko

  • Hero Member
  • *****
  • Posts: 4938
  • My goal: build my own game engine using Lazarus
Re: IDE freezes on SelectDirectory
« Reply #1 on: January 24, 2023, 11:07:05 am »
Maybe that caused by antivirus, try to disable your antivirus or Microsoft Defender to see what happens.

wp

  • Hero Member
  • *****
  • Posts: 11244
Re: IDE freezes on SelectDirectory
« Reply #2 on: January 24, 2023, 11:15:29 am »
Use FPDebug rather than GDB ("Tools" > "Options" > "Debugger" > "Debugger Backend" > select "FpDebug internal Dwarf-Debugger" in the top comobox).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9210
  • Debugger - SynEdit - and more
    • wiki
Re: IDE freezes on SelectDirectory
« Reply #3 on: January 24, 2023, 11:22:08 am »
There was a very similar thread recently (with open file or open dir dialog / though I believe Win11).

It turned out to be a bug in the FpDebug in 2.2.4.

If you are affected by the same issue, then you have 2 options:

1) Use Lazarus 2.3 (git main branch)
2) Use the gdb based debugger (Tools > Options > Debugger > Debugger Backend)
   If using gdb, ensure not to use "Dwarf 3", instead use "Dwarf with sets"
« Last Edit: January 24, 2023, 11:23:51 am by Martin_fr »

Roman

  • New Member
  • *
  • Posts: 24
Re: IDE freezes on SelectDirectory
« Reply #4 on: January 24, 2023, 12:09:24 pm »
Thank you all. I have changed "Debugger Backend" from "FpDebug internal Dwarf-Debugger" to "GNU debugger" and it helped. It seems that SelectDirectory is now a bit slower than before, but it works.
« Last Edit: January 24, 2023, 12:11:23 pm by Roman »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9210
  • Debugger - SynEdit - and more
    • wiki
Re: IDE freezes on SelectDirectory
« Reply #5 on: January 24, 2023, 12:15:00 pm »
It seems that SelectDirectory is now a bit slower than before, but it works.

If you don't have any dll into which you need to debug:
Set the option "DisableLoadSymbolsForLibraries"

See "Lazarus 1.2.4 and higher" on https://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working_.2F_SigSegv_with_Open.2FClose_Dlg


totya

  • Hero Member
  • *****
  • Posts: 720
Re: IDE freezes on SelectDirectory
« Reply #6 on: February 13, 2023, 11:40:14 pm »
Me too, I cannot stop or close app or Lazarus while open dialog freeze. I need to logout from my user account. Sometimes the OS completely freeze (data lost). Dwarf3 or Dwarf with sets doesn't matter.

Lazarus 2.2.4 x64 official downloaded installer package

Win 10 Pro x64

Edit.: gdb debugger solve my problem
« Last Edit: February 13, 2023, 11:46:00 pm by totya »

simone

  • Hero Member
  • *****
  • Posts: 540
Re: IDE freezes on SelectDirectory
« Reply #7 on: February 13, 2023, 11:58:02 pm »
I ran into the same problem some time ago. See this thread:

https://forum.lazarus.freepascal.org/index.php/topic,61072.msg458679.html#msg458679
Microsoft Windows 10 64 bit - Lazarus 2.2.4

totya

  • Hero Member
  • *****
  • Posts: 720
Re: IDE freezes on SelectDirectory
« Reply #8 on: February 14, 2023, 01:12:08 pm »
1) Use Lazarus 2.3 (git main branch)

Thanks, 2.3 works too, but really I'd like the "patch" in the fixes (fixes-2.2) lazarus branch.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9210
  • Debugger - SynEdit - and more
    • wiki
Re: IDE freezes on SelectDirectory
« Reply #9 on: February 14, 2023, 05:29:09 pm »
1) Use Lazarus 2.3 (git main branch)

Thanks, 2.3 works too, but really I'd like the "patch" in the fixes (fixes-2.2) lazarus branch.

The fix was to complex to be merged to fixes. To risky to break something else. So it is 2.3 only.

totya

  • Hero Member
  • *****
  • Posts: 720
Re: IDE freezes on SelectDirectory
« Reply #10 on: February 14, 2023, 08:02:14 pm »
The fix was to complex to be merged to fixes. To risky to break something else. So it is 2.3 only.

Thanks for the info!

First impression, ide options/key mappings/find key combination filter does not work. This is the first step after lazarus installed...

For example grab ctrl-alt-t, find key combination changed to: "Filter: ctr-alt-t" but the key list not filtered. Lazarus 2.3.0, fpc 3.2.3 (fixes branch).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9210
  • Debugger - SynEdit - and more
    • wiki
Re: IDE freezes on SelectDirectory
« Reply #11 on: February 14, 2023, 08:04:09 pm »
The fix was to complex to be merged to fixes. To risky to break something else. So it is 2.3 only.

Thanks for the info!

First impression, ide options/key mappings/find key combination filter does not work. This is the first step after lazarus installed...

For example grab ctrl-alt-t, find key combination changed to: "Filter: ctr-alt-t" but the key list not filtered. Lazarus 2.3.0, fpc 3.2.3 (fixes branch).

Indeed, I can confirm this.

I created an issue for it https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40121
« Last Edit: February 14, 2023, 08:07:45 pm by Martin_fr »

totya

  • Hero Member
  • *****
  • Posts: 720
Re: IDE freezes on SelectDirectory
« Reply #12 on: February 14, 2023, 09:31:47 pm »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9210
  • Debugger - SynEdit - and more
    • wiki
Re: IDE freezes on SelectDirectory
« Reply #13 on: February 17, 2023, 10:26:33 am »
I experimented with merging it.
It's still a big change, and hard to test if nothing was overlooked.

So it's not in the official fixes branch. But I uploaded a copy of the fixes branch at
https://gitlab.com/martin_frb/lazarus/-/commits/test-fpdebug-step-fix-merge

You can get it as follows (from within any clone of either the official Lazarus git, or any fork thereof)
Code: Text  [Select][+][-]
  1. git fetch https://gitlab.com/martin_frb/lazarus.git test-fpdebug-step-fix-merge
  2. git switch -c mod-fixes-2_2 FETCH_HEAD

If you do, let me know, and let me know if it works for you. Thanks



EDIT:

I have to check, it seems I took an old version of the fix.... May need to change this.

EDIT 2:
Same result, only the ref "cherry picked from ..." in the commit msg is wrong.

---
So you can test it, as described.
« Last Edit: February 17, 2023, 10:45:55 am by Martin_fr »

totya

  • Hero Member
  • *****
  • Posts: 720
Re: IDE freezes on SelectDirectory
« Reply #14 on: February 17, 2023, 02:03:27 pm »
I experimented with merging it.

Thank you! Its Windows here (no git installed), but torties svn installed, and I use fpcupdeluxe. Can I try your changes with these installed apps anyhow?

 

TinyPortal © 2005-2018