Recent

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

Relativity

  • Full Member
  • ***
  • Posts: 101
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

GetMem

  • Hero Member
  • *****
  • Posts: 4017
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: 101
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

  • Full Member
  • ***
  • Posts: 233
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: 1781
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: 8399
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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Relativity

  • Full Member
  • ***
  • Posts: 101
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: 1443
  • 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.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9275
  • 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: 101
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

  • Full Member
  • ***
  • Posts: 233
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: 101
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

 

TinyPortal © 2005-2018