Recent

Author Topic: GDB 7.7 Eating An Entire CPU Core On QT App Launch For A Solid 20 Seconds  (Read 3740 times)

Rails

  • Guest
What the subject line says. This prevents the application from actually appearing on the desktop, although a system monitor shows the app's process running. The 20 second period is 100% repeatable. It makes no difference if the app is compiled with debugging support or without.

Launching the application from the command line has no delay and it functions normally.  Other than the delay waiting for GDB to subside, it also functions normally running under the IDE. Actual GDB debugging also appears normal.

The issue only occurs with the application compiled for QT. It does not occur if the application is compiled for GTK2. It makes no difference if the IDE itself is compiled for GTK2 or QT.

Laz 1.2.4 from sourceforge yesterday. Same for FPC 2.6.4. Recent i386 Linux Mint Debian Edition w/XFCE4, fully updated this morning. When that didn't help, pulled in Debian Unstable and further updated. GDB now at 7.7.1-2 (Debian). No change.

I am assuming this is just another GDB problem, but if anyone has an idea or two, I'm all ears.



« Last Edit: July 28, 2014, 09:42:21 pm by Rails »

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Yes, as you say, this is just another GDB problem. I see a similar delay on Mac OS X with the carbon widgetset.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Try this
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working

no-solib

The wiki page refers to loading of DLLs under Windows. Do similar considerations apply to unixoid operating systems?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Rails

  • Guest
Thanks Martin and JW.

Setting DisableLoadSymbolsForLibraries to True took care of the problem for me. It's an imperfect solution, but I can always change back if need be.

BTW, before I did this, I tried a couple of older versions of gdb on the same machine without success. I have another 32 bit machine with Laz 1.2.4 (older download) and FPC 2.6.4 from the Debian repository. It doesn't have this problem for some reason.  'Tis a bit of a mystery it seems.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
GDB sucks. I wish ThinkPascal's LightsBug to be back, but this is a kind of illusion.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

 

TinyPortal © 2005-2018