0
votes

I just wanted to test the "SelectDirectoryDialog" as described on the resource page: TSelectDirectoryDialog, the linked doc page is currently down. But I'm getting an exception "External:SIGSEGV". Not sure what I'm doing wrong here. I put the "SelectDirectoryDialog" on the form and created a button that executes the following code:

procedure TForm1.Button1Click(Sender: TObject);
begin
  if SelectDirectoryDialog1.Execute then ShowMessage(SelectDirectoryDialog1.FileName);
  end;

I looked up a few examples (here, here and here), but I can't find anything that's wrong with my code. I tried the TOpenDialog, that one works without a problem.

Any ideas how to fix this? Is there a different dialogue that let's me select a directory as a quick fix?

Update: The problem seems to be with the debugger, here's a thread describing it. Executing the Exe-File works fine. Does anyone know if the more current Version have a fix to this? (I'm using Lazarus V1.6 from 2016, FPC-V. 3.0.0, SVN-Revision 51630 - the 64bit Version).

1
What is SelectDirectoryDialog1's InitialDir set to? - MartynA
@MartynA: I didn't set it explicitly, do I have to? - Albin
I don't think so, I was just wondering if it was set to some blatantly invalid value. - MartynA
@MartynA Since the resource page I linked to doesn't provide any more information, is the an overview with explanations about the methods and attributes of TSelectDirectoryDialog? - Albin
Try googling for SelectDirectoryDialog documentation. In the Lazarus IDE, going to View | Debug Windows | Call stack should tell you exactly where the exception is occurring. - MartynA

1 Answers

0
votes

Not sure if it the problem, but did you try menu -> Tools -> Options -> Debugger -> check the checkbox for DisableLoadSymbolsForLibraries ?