Recent

Author Topic: WIN64 open file dialog hangs on debug  (Read 777 times)

Nicola Gorlandi

  • Full Member
  • ***
  • Posts: 121
WIN64 open file dialog hangs on debug
« on: October 30, 2022, 10:32:33 am »
Using the last release of Lazarus (2.2.4) with Win64 in Windows SO the file selection dialog hangs. I have to restart the PC in order to works again.

Any suggestions ?

Many thanks.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 867
  • Fifty shades of code.
    • Delphi & FreePascal
Re: WIN64 open file dialog hangs on debug
« Reply #1 on: October 30, 2022, 10:36:25 am »
Can you provide a minimal example?
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8601
  • Debugger - SynEdit - and more
    • wiki
Re: WIN64 open file dialog hangs on debug
« Reply #2 on: October 30, 2022, 11:46:25 am »
Do you use FpDebug or GDB ? => See Tools > Options > Debugger Backend

Which Windows version?

In some cases the dialog takes a bit longer to open (10 to 20 seconds have been seen as worst case). I guess  you waited longer than that.
The reason is that the File open dialog (any file dialog) loads lots of DLLs. Handlers from other unrelated apps. Anything that hooks into the file-explorer, either (many of the) extra menu entries for the context menu (Such as "compress with ..."). Or file preview handlers, Or icon overlays ....

The debugger get notification for that, and may load debug info.
Also, if those are causing exceptions, the debugger gets notified too.

Usually that does not lead to a hang, though....
But such a dll, could contain code that misbehaves (intentionally) under a debugger....

KodeZwerg

  • Hero Member
  • *****
  • Posts: 867
  • Fifty shades of code.
    • Delphi & FreePascal
Re: WIN64 open file dialog hangs on debug
« Reply #3 on: October 30, 2022, 12:12:12 pm »
In some cases the dialog takes a bit longer to open (10 to 20 seconds have been seen as worst case).
Network shares, Cloud shares, those can often lead to end a lot longer, especial when those share didnt connected before at all....
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8601
  • Debugger - SynEdit - and more
    • wiki
Re: WIN64 open file dialog hangs on debug
« Reply #4 on: October 30, 2022, 01:27:26 pm »
the file selection dialog hangs. I have to restart the PC in order to works again.

If only that app hangs, what have you tried to kill it?

In the IDE "run menu" there is "reset debugger", which you could try. (Doesn't solve that it shouldn't hang.... but ...)

Jorg3000

  • New Member
  • *
  • Posts: 43
Re: WIN64 open file dialog hangs on debug
« Reply #5 on: October 30, 2022, 02:31:42 pm »
Hi!
TOpenDialog has a option ofViewDetail which is enabled by default.
Does the problem still occur when you turn off that option?



Nicola Gorlandi

  • Full Member
  • ***
  • Posts: 121
Re: WIN64 open file dialog hangs on debug
« Reply #6 on: November 02, 2022, 06:46:10 am »
Hi I am using Windows 10 Pro, FpDebug

I got this everywhere, e.g.

Code: Pascal  [Select][+][-]
  1. SelectDirectory('Folder','',result)
  2.  

No way to stop the process: I have to restart PC

Using Lazarus 32 on the same PC I have no issue.

dseligo

  • Hero Member
  • *****
  • Posts: 866
Re: WIN64 open file dialog hangs on debug
« Reply #7 on: November 02, 2022, 11:05:20 am »
Hi I am using Windows 10 Pro, FpDebug

I got this everywhere, e.g.

Code: Pascal  [Select][+][-]
  1. SelectDirectory('Folder','',result)
  2.  

No way to stop the process: I have to restart PC

Using Lazarus 32 on the same PC I have no issue.

I confirm that something is wrong (only in my case Lazarus isn't frozen - I go to Run/Reset Debugger and program is killed).
I use Lazarus 2.2.4 (rev lazarus_2_2_4) FPC 3.2.2 x86_64-win64-win32/win64 on Windows 11.

If I start program with 'Run without Debugging' then dialog opens.
FpDebug is debugger backend.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8601
  • Debugger - SynEdit - and more
    • wiki
Re: WIN64 open file dialog hangs on debug
« Reply #8 on: November 02, 2022, 11:07:26 am »
Could you please both join on https://forum.lazarus.freepascal.org/index.php/topic,61072.0.html
(or read up on the comments there, and reply here)

Thanks.

 

TinyPortal © 2005-2018