That happens if you did this:

- drop a TOpenDialog on the form
- write the button event handler
- delete the TOpenDialog icon from the form because you think it's
ugly over there
- re-type manually the declaration     OpenDialog1: TOpenDialog;   in
the form class because it was automatically deleted by the previous
step
- compiled and run

I don't know if you didd this, but this is way to get the SIGSEV that you say.

The reason is that if you leave the icon on the form, lazarus will
take care of creating (and freeing) the class hinstance, so that
OpenDialog1 is not nil when after the form is created.
But if you followed the steps above, then you have to take care of it yourself:

1) place a OpenDialog1 := TOpenDialog.Create(self);  in the FormCreate event
2) place a OpenDialog1.free; in the FormClose event (or anywhere when
you don't need it anymore)

hope it helps

R#

2007/11/29, Igor Zakhrebetkov <[EMAIL PROTECTED]>:
> I've installed Lazarus-0.9.24-fpc-2.2.0-20071114-win32.exe on Windows XP SP2 
> with some
> components like TDBF .
>
> Simple demo application with TOpenDialog component:
> ===========
>    TForm1 = class(TForm)
>      Button1: TButton;
>      OpenDialog1: TOpenDialog;
>      procedure Button1Click(Sender: TObject);
>    private
>      { private declarations }
>    public
>      { public declarations }
>    end;
>
> var
>    Form1: TForm1;
>
> implementation
>
> { TForm1 }
>
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>    if OpenDialog1.Execute then
>     ShowMessage(OpenDialog1.FileName);
> end;
> ===========
> After trying to pick up any file I've got an error with message:
>
> Project project1 raised exception class 'External: SIGSEGV'.
>
> Sometimes it simply hangs.
> There were no such problems with previous version.
>
> --
> Igor Zakhrebetkov
>
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
>


-- 
----------------------------------
 Ing. Roberto Padovani

 via Mandrioli, 1
 40061 Minerbio (BO)
 Italy

 mail: [EMAIL PROTECTED]
 cell: 340-3428685
---------------------------------

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to