Lazarus

Programming => LCL => Topic started by: Relativity on April 20, 2021, 06:21:52 pm

Title: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: Relativity on April 20, 2021, 06:21:52 pm
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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: balazsszekely 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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: Relativity 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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: dseligo 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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: ASerge on April 20, 2021, 07:13:41 pm
If you will reinstall Lazarus, it is better to install version 2.0.12.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: wp 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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: Relativity 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?
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: trev on April 21, 2021, 12:42:16 pm
The first thing to do is install Lazarus 2.0.12 and re-test.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: marcov 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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: Relativity 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.
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: dseligo 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).
Title: Re: TOpenDialog.Execute crashes with Lazarus 2.0.10 on Windows 10
Post by: Relativity 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.
TinyPortal © 2005-2018