Recent

Author Topic: Debugger crashes on Window 10  (Read 6830 times)

aducom

  • Full Member
  • ***
  • Posts: 155
    • http://www.aducom.com
Debugger crashes on Window 10
« on: September 06, 2015, 08:14:12 am »
Since the update of W10 today I cannot debug my (pretty large) application any more as it crashes 'Could not send a command to GDB'. I tried a hello world which does work so obviously there's someting in one of the components/libaries.

Editing, compiling and running the exe stand-alone does work so it's purely a debugger issue. Any suggestions how to trace this issue?

b.r. Albert

aducom

  • Full Member
  • ***
  • Posts: 155
    • http://www.aducom.com
Re: Debugger crashes on Window 10
« Reply #1 on: September 06, 2015, 08:28:13 am »
I did some more investigation, and initially I can set a breakpoint on the project code. Stepping through the code sometimes works, sometimes crashes somewhere in application.inc. I have a feeling that it has to do with some kind of timing issue. as if I hit run it always fails. The errors of GDB are also a bit obscure, because when I terminate the program:

While executing the command:
"TGDBMIDebuggerInstruction: "-file-exec-and-symbols ", "
gdb reported:
"&"../../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 tried to do a fresh full recompile of the full setup but that doesn't seem to help. If I just keep on trying to hit the runbutton then some times, the applications fires and I can debug.... The most basic error I get is :

The GDB command:
"-thread-info"
did not return any result.

The GDB process is no longer running.

Just to make sure that I'm running the latest version I did a full uninstall/install of the latest lazarus (1.4.2) but the problem persists. The statement things are crashsing:

        if not InitResourceComponent(Self, TForm) then

(line 1964 customform.inc).

Traced further to

NotifyGlobalLoading

line 3159 in LResources.inc


I tried some options from the wiki on
http://wiki.freepascal.org/GDB_Debugger_Tips
and that solved the issue (well, more or less).
« Last Edit: September 06, 2015, 09:39:10 am by aducom »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9874
  • Debugger - SynEdit - and more
    • wiki
Re: Debugger crashes on Window 10
« Reply #2 on: September 06, 2015, 01:11:23 pm »
Assuming you run a 32bit Lazarus (on either 32 or 64 bit hardware)
There are 2 ways to solve this.

1) http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#internal-error:_clear_dangling_display_expressions

2) http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/

---
If you run a 64 bit Lazarus (without cross compile, i.e. you run 64 bit exe in 64 bit gdb), then either try (1) or you need to find a later gdb yourself.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: Debugger crashes on Window 10
« Reply #3 on: November 08, 2015, 12:03:10 am »
 Tip 1 worked for me!

 

TinyPortal © 2005-2018