Recent

Author Topic: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10  (Read 2903 times)

Relativity

  • Full Member
  • ***
  • Posts: 103
I developed an application about 5 years ago, using a Lazarus version available at that time on a computer with Windows 7.
Now, after 5 years, using Windows 10 and having installed Lazarus 2.0.10, I want to run again that old application.
The problem is: at every occurrence of TOpenDialog.Execute the dialog shows shortly up and then immediately crashes with a SIGSEGV exception.

I don't know what to do and I ask for some help.
Thanks in advance for any suggestion.
"How'm I gonna get through?"
  -- Pet Shop Boys

balazsszekely

  • Guest
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #1 on: April 20, 2021, 06:34:33 pm »
@Relativity

Quote
The problem is: at every occurrence of TOpenDialog.Execute the dialog shows shortly up and then immediately crashes with a SIGSEGV exception.
Hard to say. As a first step, please create a new project and test if OpenDialog works. If yes, then replace one of the dialog in your old project with a new one(one from Lazarus 2.0.10). If still not works, then you should attach a small demo project, where the issue is clearly reproducible.

Relativity

  • Full Member
  • ***
  • Posts: 103
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #2 on: April 20, 2021, 06:58:50 pm »
GetMem,
thank you very much for your time.

I created a new project with Lazarus 2.0.10 under Windows 10: there is just a button and if you click on it, it does TOpenDialog.Execute.
It still crashes.
The project is in attachment.
"How'm I gonna get through?"
  -- Pet Shop Boys

dseligo

  • Hero Member
  • *****
  • Posts: 1507
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #3 on: April 20, 2021, 07:08:59 pm »
Your test project works fine on my computer (also Windows 10).
Probably something with your Lazarus installation.
Do you start app from Lazarus IDE or outside of IDE (try both ways)?
Try to disable debugger.

ASerge

  • Hero Member
  • *****
  • Posts: 2408
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #4 on: April 20, 2021, 07:13:41 pm »
If you will reinstall Lazarus, it is better to install version 2.0.12.

wp

  • Hero Member
  • *****
  • Posts: 12793
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #5 on: April 20, 2021, 07:37:16 pm »
The usual candidate for unexpected program behaviour: your antivirus program? Put your Lazarus and your project folders on the white-list of the AV.

Relativity

  • Full Member
  • ***
  • Posts: 103
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #6 on: April 21, 2021, 12:37:39 pm »
dseligo,
if I start my test-project from outside the IDE then it works fine!
And if I start my test-project from the IDE after having disabled the debugger, then it works fine as well!
Only if I run it from the IDE with the debugger on, then it crashes.
What should I do?
"How'm I gonna get through?"
  -- Pet Shop Boys

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2032
  • Former Delphi 1-7, 10.2 user
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #7 on: April 21, 2021, 12:42:16 pm »
The first thing to do is install Lazarus 2.0.12 and re-test.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12194
  • FPC developer.
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #8 on: April 21, 2021, 01:05:32 pm »
1. see if it also crashes under 64-bit. 
2. see if it also crashes with 32-bit FPC 3.2.0

Afaik these dialogs can go wrong if there are plugins into the explorer that don't catch exceptions. These exceptions are not compatible with FPC SJLJ based exception handling.

FPC 64-bit (3.0.x and 3.2.0) and 32-bit from FPC 3.2.0 on use SEH exception handling to remedy this.

Relativity

  • Full Member
  • ***
  • Posts: 103
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #9 on: April 21, 2021, 01:16:58 pm »
I have installed Lazarus 2.0.12 for Windows 64 bit.
The test-project still crashes when run from the IDE with the debugger on.
It does not crash when started from the IDE without debugger or when started from outside the IDE.
"How'm I gonna get through?"
  -- Pet Shop Boys

dseligo

  • Hero Member
  • *****
  • Posts: 1507
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #10 on: April 21, 2021, 02:20:11 pm »
Try this: go to Tools, Options and then Debugger, General and check option DisableLoadSymbolsForLibraries (in Debugger specific options).

Relativity

  • Full Member
  • ***
  • Posts: 103
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #11 on: April 21, 2021, 02:58:45 pm »
I have checked the option DisableLoadSymbolsForLibraries. But it still crashes when run from inside the IDE.
Maybe it's the antivirus, as wp suggested ? I'm going to contact my company's IT-officer and ask him.
"How'm I gonna get through?"
  -- Pet Shop Boys

741

  • New Member
  • *
  • Posts: 17
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #12 on: May 20, 2024, 04:39:58 pm »
I have the same issue:

Lazarus debugging freezes when TOpenDialog's Execute method is called, but seems fine when run from Windows explorer.
Note: I cannot find the option "DisableLoadSymbolsForLibraries" under Tools|Options|DEbugger|General options; does this setting still exist?

I have tried (without any effect) un-checking "Use manifest resource (and enable themes)"  under Project|Options|Application

Lazarus 2.2.6 (rev lazarus_2_2_6) FPC 3.2.2 x86_64-win64-win32/win64

Josh

  • Hero Member
  • *****
  • Posts: 1372
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #13 on: May 20, 2024, 04:49:02 pm »
Hi

I think its only available if GDB is your debugger. And you have it installed.

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

741

  • New Member
  • *
  • Posts: 17
Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
« Reply #14 on: May 20, 2024, 05:00:59 pm »
OK thanks - I am wondering now though what is the generally advised debugger to use, and how much trouble changing debugger is.

Should I go down the route of using gdb because of this problem, or should I aim to keep with FpDebug.

The FpDebug debugger is pre-installed; I think, if possible I'd aim to keep FpDebug.

 

TinyPortal © 2005-2018