strange problem that happens only if i run the program from within the
ide. A blank form, one button and a topendialog (does not matter if it
is on the form or manually created). The dialog opens and after some
seconds (sometimes i have to move the mouse), i get a sigsegv, Running
the program outside the ide (with or without gdb) works without problems.
This happens with yesterdays snapshot and with 0.9.24. (Have not tried
other versions)
Btw, the same happens with TSelectDirectoryDialog
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
Menus, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var Form1: TForm1;
implementation
procedure TForm1.Button1Click(Sender: TObject);
var t : TOpenDialog;
begin
t := TOpenDialog.Create(Self);
try
t.execute;
finally
t.Free;
end;
end;
initialization
{$I unit1.lrs}
end.
gdb output
(gdb)
<-environment-cd .>
^done
(gdb)
<-environment-cd "C:/WinPrj/testopen/">
^done
(gdb)
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>
^done,value="0x0"
(gdb)
<-exec-arguments >
^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<info address main>
&"info address main\n"
~"Symbol \"main\" is a function at address 0x4025b0.\n"
^done
(gdb)
<-break-insert -t *4203952>
^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x004025b0",func="main",file="project1.lpr",fullname="C:\\WinPrj\\testopen/project1.lpr",line="13",times="0"}
(gdb)
<-break-insert FPC_RAISEEXCEPTION>
^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00408d06",func="fpc_raiseexception",file="except.inc",line="189",times="0"}
(gdb)
<-break-insert FPC_BREAK_ERROR>
^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x0040a1b0",func="HANDLEERRORADDRFRAME",file="system.inc",line="794",times="0"}
(gdb)
<-break-insert FPC_RUNERROR>
^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x0040a2a3",func="RUNERROR",file="system.inc",line="837",times="0"}
(gdb)
<info file>
&"info file\n"
~"Symbols from \"C:/WinPrj/testopen/project1.exe\".\n"
~"Local exec file:\n"
~"\t`C:/WinPrj/testopen/project1.exe', file type pei-i386.\n"
~"\tEntry point: 0x4f31c0\n"
~"\t0x00401000 - 0x004f31e0 is .text\n"
~"\t0x004f4000 - 0x00534ee8 is .data\n"
~"\t0x00535000 - 0x00549950 is .bss\n"
~"\t0x0054a000 - 0x0054c520 is .idata\n"
^done
(gdb)
<-exec-run>
^running
(gdb)
*stopped,thread-id="1",frame={addr="0x004025b0",func="main",args=[],file="project1.lpr",fullname="C:\\WinPrj\\testopen/project1.lpr",line="13"}
(gdb)
<info program>
&"info program\n"
~"\tUsing the running image of child thread 26416.0x671c.\n"
~"Program stopped at 0x4025b0.\n"
~"It stopped at a breakpoint that has since been deleted.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
^done
(gdb)
<-exec-continue>
^running
(gdb)
~"[Switching to thread 26416.0x6534]\n"
*stopped,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation
fault",thread-id="4",frame={addr="0x01fb4fa8",func="??",args=[]}
(gdb)
<-stack-info-depth>
^done,depth="5"
(gdb)
<-stack-list-arguments 1 0 0>
^done,stack-args=[frame={level="0",args=[]}]
(gdb)
<-stack-list-frames 0 0>
^done,stack=[frame={level="0",addr="0x01fb4fa8",func="??"}]
(gdb)
<-stack-list-arguments 1 1 1>
^done,stack-args=[frame={level="1",args=[]}]
(gdb)
<-stack-list-frames 1 1>
^done,stack=[frame={level="1",addr="0x021effb4",func="??"}]
(gdb)
<-stack-list-arguments 1 2 2>
^done,stack-args=[frame={level="2",args=[]}]
(gdb)
<-stack-list-frames 2 2>
^done,stack=[frame={level="2",addr="0x7c92761c",func="ntdll!RtlUpcaseUnicodeStringToAnsiString",from="C:\\WINDOWS\\system32\\ntdll.dll"}]
(gdb)
<-stack-list-arguments 1 3 3>
^done,stack-args=[frame={level="3",args=[]}]
(gdb)
<-stack-list-frames 3 3>
^done,stack=[frame={level="3",addr="0x7c927569",func="ntdll!RtlUpcaseUnicodeStringToAnsiString",from="C:\\WINDOWS\\system32\\ntdll.dll"}]
(gdb)
<-stack-list-arguments 1 4 4>
^done,stack-args=[frame={level="4",args=[]}]
(gdb)
<-stack-list-frames 4 4>
^done,stack=[frame={level="4",addr="0x00000000",func="??"}]
(gdb)
<-stack-list-frames 0 0>
^done,stack=[frame={level="0",addr="0x01fb4fa8",func="??"}]
(gdb)
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives