* * *

Author Topic: Trouble after TOpenDialog.Execute  (Read 735 times)

Wargan

  • New member
  • *
  • Posts: 30
  • Make Lazarus great again!
Trouble after TOpenDialog.Execute
« on: April 20, 2017, 06:43:58 am »
Hello!
When using the TOpenDialog class, I'm having problems on the form. This happens like this:
Pressing the button will call the code:

Code: Pascal  [Select]
  1. If OpenDialog1.Execute then
  2. Begin
  3.     ShowMessage (OpenDialog1.FileName);
  4. End;

And nothing else.

The message is displayed, everything is working correctly, but when the main form is closed, the heaptc window appears: External error: SIGSEGV at address 7C919FCA. Interestingly, heaptc does not show memory leaks.

In the attachment, I attached a screenshot from the assembler window.

I thought that maybe it was a conflict between LCL and LazSolutions?

In my project there are the following dependencies:
  • Virtualtreeview_package
  • FCL
  • SQLDBLaz
  • Eccontrols
  • LCL

On an empty form (New empty project) after calling TOpenDialog, there are no problems.

I ask you to help with the solution of this problem!
« Last Edit: April 21, 2017, 06:03:20 am by Wargan »
Used: Lazarus 1.6.4 stable + FPC 3.0.2

Wargan

  • New member
  • *
  • Posts: 30
  • Make Lazarus great again!
Re: Trouble after TOpenDialog.Execute
« Reply #1 on: April 20, 2017, 06:47:21 am »
p.s. after the removal of a piece of code above, no error occurs. %)
Used: Lazarus 1.6.4 stable + FPC 3.0.2

GetMem

  • Hero Member
  • *****
  • Posts: 2137
Re: Trouble after TOpenDialog.Execute
« Reply #2 on: April 20, 2017, 06:59:48 am »
Hi Wargan,

I did try to reproduce the issue with Lazrus Trunk/FPC 3.02 without success. So probably it was fixed since 1.6.4.

Wargan

  • New member
  • *
  • Posts: 30
  • Make Lazarus great again!
Re: Trouble after TOpenDialog.Execute
« Reply #3 on: April 20, 2017, 07:15:00 am »
I did try to reproduce the issue with Lazrus Trunk/FPC 3.02 without success. So probably it was fixed since 1.6.4.

Hmm... I have installed version 1.6.4))

Can someone explain to me what is the cause of the error in the RtlpWaitForCriticalSection method? I understand the SIGSEGV error occurs when the pointer is equal to nil, but ... what is the problem exactly THERE, I can not understand :(
« Last Edit: April 20, 2017, 07:18:05 am by Wargan »
Used: Lazarus 1.6.4 stable + FPC 3.0.2

Wargan

  • New member
  • *
  • Posts: 30
  • Make Lazarus great again!
Re: Trouble after TOpenDialog.Execute
« Reply #4 on: April 20, 2017, 09:03:30 am »
UPDATE: I played around with the build modes.
The error only appears in Debug mode, in Release mode it does not exist  >:D

Judging by the documentation from MSDN, then probably a problem with the system libraries. In addition, I have Windows XP SP3 installed on my working netbook. Well, well ... I don't mind getting ideas from more experienced comrades ..)
Used: Lazarus 1.6.4 stable + FPC 3.0.2

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4284
    • wiki
Re: Trouble after TOpenDialog.Execute
« Reply #5 on: April 20, 2017, 04:48:29 pm »

Wargan

  • New member
  • *
  • Posts: 30
  • Make Lazarus great again!
SOLVED
« Reply #6 on: April 21, 2017, 06:02:50 am »
Martin_fr, thank you very much! I'm glad if it helps others  ;D
Used: Lazarus 1.6.4 stable + FPC 3.0.2

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus