View Issue Details

IDProjectCategoryView StatusLast Update
0019883LazarusDebuggerpublic2011-09-03 17:15
ReporterMaxAssigned ToMartin Friebe 
Status resolvedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0019883: Debugger crashes after dynamically created Save Dialog
DescriptionCreate new project.
Add button1 on form1
Create onClick event like this:

procedure TForm1.Button1Click(Sender: TObject);
  //After form closing, gdb will be crashed
  //Also, you can close the form later
  //The GDB process is no longer running error
Additional InformationLazarus (win32) 0.9.31 SVN 31847 (20110802)
OS: Windows 7 (win64)
TagsNo tags attached.
Fixed in Revision32170
Attached Files


2011-08-03 16:12


GDBBug.7z (1,850 bytes)

Martin Friebe

2011-08-08 11:45

manager   ~0050607

Unfortunately I cna't reproduce the issue.

Can you please confirm:

From your decription "gdb" terminates (unexpected)? What is the exact error msg in Lazarus?
Have you verified using the process list, if gdb is running or disappeared?

Can you provide a logfile --debug-log= *and* the output of the "Debug output window", as detailed on:
(You do *not* need to recompile with the extra defines)

Does it occur for you with both stabs(-g) and dwarf(-gw)?

What is your fpc version?

If indeed gdb terminates unexpected, then this may be an issue with gdb, that may have to be reported there.
You may whish to try the latest gdb release 7.3 from mingw

2011-08-14 21:15


debug.7z (7,525 bytes)


2011-08-14 21:18

reporter   ~0050843

Last edited: 2011-08-14 21:34

Windows report about abnormal program termination (gdb.exe). You can choose Close or Debug. After closing (process will be killed) lazarus show message :'Opps{...} Save you work{...}'. Debug files in attach.
Error occur with -g and -gw keys.
FPC 2.4.4

Martin Friebe

2011-08-16 13:33

manager   ~0050869

GDB itself is hitting an assertion, which leads to its failure.
"../../gdb-7.2/gdb/printcmd.c:1916: internal-error: clear_dangling_display_expressions: Assertion `objfile->pspace == solib->pspace' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable."
I don't know if WMVCore is relevant:
"BFD: C:\Windows\SysWOW64\WMVCORE.DLL: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section .reloc"

I have no way to reproduce it on any of my machines, so I do not even know if it is a W7 or 64 bit issue, or something else entirely.

The best advice would be to:
- test with gdb 7.3 (I can mail the files 2.2MB)
- If still present in 7.3, report with mingw ( Unfortunately I can not help with this. Alternatively use the lazarus/fpc mailing list, to see if someone can assist.

Taking a wild guess:
It appears the crash happens when gdb unloads libraries, after the app terminated.
I can not even tell, if this happens due to a default lib (and will therefore happen on other w7 64 bit systems too), or if it relates to a library only present on your system due to other software that is installed.

Unless this is fixed in gdb 7.3, there is nothing that can currently be done to fix this issue in Lazarus or fpc.

I would therefore have to close this as "not fixable".
If you want to test 7.3, I can wait, and if 7.3 works close it after Lazarus (snapshot) are shipped with 7.3. There is no time estimate for that yet.


2011-08-17 10:44

reporter   ~0050895

Last edited: 2011-08-17 13:01

I try new SVN Lazarus-0.9.31-31999-fpc-2.5.1-20110817-win32.exe, but error is still present. I don't know version of GDB in this installation.


2011-08-17 13:09

reporter   ~0050898

GDB 7.3 works fine! I think, problem resolved.

Martin Friebe

2011-08-17 14:39

manager   ~0050903


I'll keep this open, until 7.3 will be added.

Martin Friebe

2011-09-03 17:14

manager   ~0051422

GDB 7.3.2 has been added to SVN trunk

Issue History

Date Modified Username Field Change
2011-08-03 16:12 Max New Issue
2011-08-03 16:12 Max Status new => assigned
2011-08-03 16:12 Max Assigned To => Marc Weustink
2011-08-03 16:12 Max File Added: GDBBug.7z
2011-08-03 16:12 Max Widgetset => Win32/Win64
2011-08-08 11:45 Martin Friebe LazTarget => -
2011-08-08 11:45 Martin Friebe Note Added: 0050607
2011-08-08 11:45 Martin Friebe Assigned To Marc Weustink => Martin Friebe
2011-08-08 11:45 Martin Friebe Status assigned => feedback
2011-08-14 21:15 Max File Added: debug.7z
2011-08-14 21:18 Max Note Added: 0050843
2011-08-14 21:32 Max Note Edited: 0050843
2011-08-14 21:34 Max Note Edited: 0050843
2011-08-16 13:33 Martin Friebe Note Added: 0050869
2011-08-17 10:44 Max Note Added: 0050895
2011-08-17 13:01 Max Note Edited: 0050895
2011-08-17 13:09 Max Note Added: 0050898
2011-08-17 14:39 Martin Friebe LazTarget - => 0.99.0
2011-08-17 14:39 Martin Friebe Note Added: 0050903
2011-08-17 14:39 Martin Friebe Status feedback => assigned
2011-08-17 14:39 Martin Friebe Target Version => 0.99.0
2011-09-03 17:14 Martin Friebe Fixed in Revision => 32170
2011-09-03 17:14 Martin Friebe Status assigned => resolved
2011-09-03 17:14 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2011-09-03 17:14 Martin Friebe Resolution open => fixed
2011-09-03 17:14 Martin Friebe Note Added: 0051422