Recent

Author Topic: Linux, Laz and a crash with a strange file string  (Read 2225 times)

iru

  • Sr. Member
  • ****
  • Posts: 331
Linux, Laz and a crash with a strange file string
« on: January 19, 2014, 12:34:50 pm »
Gentlefolk,

Environment: Linux Mint 15, lazarus 1.0.14 (installed in /usr/share/lazarus/1.0.14/......)

I have a small program to test the untButtonList object as I require a non-Windows array of buttons.

Compiles clean, run the program, click on the button and the program crashes with a SIGSEV on the 'end' of the Button1Click event code  with the following error message:

Unable to load file "/home/mattias/tmp/lazarus1.0.14/lazarus_build/usr/share/lazarus/1.0.14/lcl/include/control.inc".

It looks like some residual code/file-path somewhere down inside. Any suggestions, Ian.

Code is:

Code: [Select]
uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  untButtonList;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
    TheButs : TCustomButtonList;
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);

var
  Testa : tStringList;

begin
  Testa := tStringList.Create;
  Testa.Add('iru');
  TheButs := tCustomButtonList.Create(Self);
  TheButs.Captions := Testa;
  TheButs.Parent := Form1;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  //
end;

end.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Linux, Laz and a crash with a strange file string
« Reply #1 on: January 19, 2014, 01:03:26 pm »
From what you describe I'm guessing that you did not create the "Captions" internal field and you are using a method of it. When the debugger show a line as the one that raises a problem it usually is the previous one that has the problem, in your case TheButs.Captions := Testa; the rest are probably the debugger going bananas for some reason than anything else.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

iru

  • Sr. Member
  • ****
  • Posts: 331
Re: Linux, Laz and a crash with a strange file string
« Reply #2 on: January 20, 2014, 10:20:45 pm »
Looks like you are right.

No matter where I stop things I can get that message/error. Looks like some residual rubbish stck inthere.

Ian


 

TinyPortal © 2005-2018