Package: lazarus-ide-2.2 Version: 2.2.6+dfsg2-2+b1 Severity: important X-Debbugs-Cc: p...@jbechtel.de
Dear maintainers, I recently wanted to start a little notekeeping program in Free Pascal (Object Pascal) but was very quickly stopped by gdb not working. After some search for the problem I found that the array initialization was the problem, actually following line: var scopes: Array of integer = (); // <-- this line causes the crash Following conditions have to be met to reproduce the problem: * The line must be in an extra unit (not application form class unit) * gdb 13 must be installed (gdb 10 does not crash) After the system information I copy the most important code files and the last part of debug log. It is basically a new graphical project with an extra unit. I have set Severity to "important" because intermediately I was thinking that dynamic arrays are not allowed in fpc Object Pascal which was irritating. When installing gdb 10, however, world looks different. Feel free to ask for details. Please don't mind high reaction times. Best regards Jonas Bechtel -- System Information: Debian Release: 12.2 APT prefers stable-security APT policy: (1202, 'stable-security'), (1201, 'stable-updates'), (1200, 'stable'), (1199, 'stable-debug'), (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable-debug'), (500, 'testing'), (500, 'oldstable') Architecture: i386 (x86_64) Foreign Architectures: amd64 Kernel taint flags: TAINT_WARN, TAINT_UNSIGNED_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: sysvinit (via /sbin/init) LSM: AppArmor: enabled Versions of packages lazarus-ide-2.2 depends on: ii fp-compiler-3.2.2 [fp-compiler] 3.2.2+dfsg-20 ii libatk1.0-0 2.46.0-5 ii libc6 2.36-9+deb12u3 ii libcairo2 1.16.0-7 ii libgdk-pixbuf-2.0-0 2.42.10+dfsg-1+b1 ii libglib2.0-0 2.74.6-2 ii libgtk2.0-0 2.24.33-2 ii libpango-1.0-0 1.50.12+ds-1 ii libx11-6 2:1.8.6-1 Versions of packages lazarus-ide-2.2 recommends: ii fpc 3.2.2+dfsg-20 ii fpc-3.2.2 [fpc] 3.2.2+dfsg-20 ii gdb 13.1-3 Versions of packages lazarus-ide-2.2 suggests: ii fp-utils-3.2.2 [fp-utils] 3.2.2+dfsg-20 -- no debconf information -- sortierfenster.pas unit sortierfenster; {$mode objfpc}{$H+} interface uses Forms; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.lfm} uses StorageFile; procedure TForm1.FormCreate(Sender: TObject); begin TSFile_load; end; end. -- StorageFile.pas unit StorageFile; {$mode ObjFPC}{$H+} interface procedure TSFile_load(); implementation procedure TSFile_load(); var scopes: Array of integer = (); // <-- this line causes the crash begin // SET BREAKPOINT HERE to make gdb 13 crash end; end. -- Output log (last part) (gdb) <-stack-list-arguments 1 0 0> ^done,stack-args=[frame={level="0",args=[]}] (gdb) <-stack-list-locals 1> &"\n\n" &"Fatal signal: " &"Segmentation fault" &"\n" &"----- Backtrace -----\n" &"Backtrace unavailable\n" &"---------------------\n" &"A fatal error internal to GDB has been detected, further\ndebugging is not possible. GDB will now terminate.\n\n" &"This is a bug, please report it." &"This is a bug, please report it." &" For instructions, see:\n"