Recent

Author Topic: [SOLVED] BGRABitmap - debugger error  (Read 14904 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1057
[SOLVED] BGRABitmap - debugger error
« on: March 31, 2012, 09:30:30 am »
Hi,

I used BGRABitmap 5.5. It worked fine but I could not debugg project. When I check some breakpoint and run project I got "Debugger error. Save your project etc....GDB process is no longer running". So I decided to upgrade BGRABitmap to 5.7.1 and Lazarus snapshot by the way. Now I have this same error but I even can't run project from lazarus. I just created empty project and added bgrabitmap_pack package into project requirements. Compiled binary works fine. I do not know how to analyze a problem. Any idea?

Kubuntu 11.10 64bit
Lazarus 0.9.31 from SVN (updated today) with QT interface. FPC 2.6.0 stable. BGRABitmap 5.7.1 stable

Regards

EDIT: I downloaded all latest stable versions of bgrabitmap and found that 5.6 works fine on my configuration. I stay on it for a while :)
« Last Edit: September 03, 2012, 03:05:51 pm by Dibo »

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: BGRABitmap - debugger error
« Reply #1 on: April 02, 2012, 09:43:30 pm »
Maybe it is linked to compiler optimizations. Try removing all optimizations to see if it debugs better.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: BGRABitmap - debugger error
« Reply #2 on: September 03, 2012, 09:18:12 am »
Sorry for a big dealy with this topic. I tried to don't use debugger in projects where I'm using BGRA Bitmap (I used own logger into file). But now, lack of debugging is become a nuisance. Have you any other idea what is the problem?

BGRA Bitmap version 5.9.2 Optimizations disabled.
Ubunt 12.04 64bit, GTK2
CodeTyphon 2.80 (Lazarus 1.1 from SVN, FPC 2.7.1 from SVN). But this same problem on stable lazarus 1.0 and stable FPC 2.6.0

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: BGRABitmap - debugger error
« Reply #3 on: September 03, 2012, 01:27:22 pm »
This is strange. I'm using Lazarus (including version 1.0) on Windows 7 and I have no problem with the debugger.

Does the problem happen with a minimal project (like just drawing a basic shape) ?

And is using version 5.6 too restrictive ?

I feel that this is out of the scope of my competence.
« Last Edit: September 03, 2012, 01:30:38 pm by circular »
Conscience is the debugger of the mind

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12398
  • Debugger - SynEdit - and more
    • wiki
Re: BGRABitmap - debugger error
« Reply #4 on: September 03, 2012, 02:03:32 pm »
Check your setup:
http://wiki.lazarus.freepascal.org/Debugger_Setup

-------------
Please specify Lazarus Revision, since 1.1 refers to more than 1000 revisions since April. If below 38415 then your version is pre 1.0 and should be upgraded.

Codetyphon uses unstable versions of both Lazarus and FPC. FPC 2.7.1 is not at all tested for debugging with Lazarus.
I can and will still try to look into your issue.

Also specify the exact version of GDB. It should be between 7.0 and 7.4.
GDB 7.5 is released and may work. But 7.5 was not yet fully tested. Though it is known that 7.5 for windows is not supported yet by the IDE (the IDE will report wrong results on win + gdb 7.5). On Ubunto, I do not know.

------------
Please run Lazarus with a logfile and debug-enable as described here: http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

Please try with stab and,or dwarf (can be set on the "linking" page of " compiler options")

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: BGRABitmap - debugger error
« Reply #5 on: September 03, 2012, 02:48:00 pm »
I am testing it on empty project. Everything works fine (I can debug) until I add BGRABitmap unit to uses.
I tested it now on BGRABitmap 5.6 and seems working ok. 5.7.1 too but when I close project I get error that GDB is crash "The GDB process is no longer running". And 5.9 doesn't work at all (I get this error when click "run" in lazarus)

I think this is not CodeTyphon problem. I also get this error on stable Lazarus 1.0 and FPC 2.6.0

Command "gdb --version" give me:
Quote
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".

I check if I can use 5.6, but I remember that I used 5.9 because this version has important fixes for BGRA Controls.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12398
  • Debugger - SynEdit - and more
    • wiki
Re: BGRABitmap - debugger error
« Reply #6 on: September 03, 2012, 02:54:23 pm »
Make sure that you have smart linking off, if you debug.
This can crash gdb.

Also have you tried stabs vs dwarf?
If you do, also open the options of the BGRA package, change the setting for the package, and recompile the package

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: BGRABitmap - debugger error
« Reply #7 on: September 03, 2012, 03:01:47 pm »
More details:

From error window:
Quote
The GDB command:
"-break-insert +0"
did not return any result.

From debugger log:
Quote
=thread-group-added,id="i1"
(gdb)
<-gdb-set confirm off>
^done
(gdb)
<-gdb-set new-console off>
^error,msg="No symbol table is loaded.  Use the \"file\" command."
(gdb)
<set width 50000>
&"set width 50000\n"
^done
(gdb)
<-gdb-version>
~"GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04\n"
~"Copyright (C) 2012 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nFor bug reporting instructions, please see:\n"
~"<http://bugs.launchpad.net/gdb-linaro/>.\n"
^done
(gdb)
<-gdb-set env COLORTERM=gnome-terminal>
^done
(gdb)
<-gdb-set env COMPIZ_CONFIG_PROFILE=ubuntu>
^done
(gdb)
<-gdb-set env DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-s7WDgrGOkW,guid=8eeb6ce1c37c50588870390600000018>
^done
(gdb)
<-gdb-set env DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path>
^done
(gdb)
<-gdb-set env DESKTOP_SESSION=ubuntu>
^done
(gdb)
<-gdb-set env DISPLAY=:0>
^done
(gdb)
<-gdb-set env GDMSESSION=ubuntu>
^done
(gdb)
<-gdb-set env GNOME_DESKTOP_SESSION_ID=this-is-deprecated>
^done
(gdb)
<-gdb-set env GNOME_KEYRING_CONTROL=/tmp/keyring-l6T1UP>
^done
(gdb)
<-gdb-set env GNOME_KEYRING_PID=1878>
^done
(gdb)
<-gdb-set env GPG_AGENT_INFO=/tmp/keyring-l6T1UP/gpg:0:1>
^done
(gdb)
<-gdb-set env HOME=/home/dibo>
^done
(gdb)
<-gdb-set env LANG=pl_PL.UTF-8>
^done
(gdb)
<-gdb-set env LIBOVERLAY_SCROLLBAR=0>
^done
(gdb)
<-gdb-set env LOGNAME=dibo>
^done
(gdb)
<-gdb-set env MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path>
^done
(gdb)
<-gdb-set env PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games>
^done
(gdb)
<-gdb-set env PWD=/home/dibo>
^done
(gdb)
<-gdb-set env SESSION_MANAGER=local/dibo-ubuntu:@/tmp/.ICE-unix/1889,unix/dibo-ubuntu:/tmp/.ICE-unix/1889>
^done
(gdb)
<-gdb-set env SHELL=/bin/bash>
^done
(gdb)
<-gdb-set env SHLVL=1>
^done
(gdb)
<-gdb-set env SSH_AGENT_PID=1929>
^done
(gdb)
<-gdb-set env SSH_AUTH_SOCK=/tmp/keyring-l6T1UP/ssh>
^done
(gdb)
<-gdb-set env TERM=xterm>
^done
(gdb)
<-gdb-set env TOMBOY_PATH=/home/dibo/tc_home/notatki>
^done
(gdb)
<-gdb-set env UBUNTU_MENUPROXY=libappmenu.so>
^done
(gdb)
<-gdb-set env USER=dibo>
^done
(gdb)
<-gdb-set env _=/usr/bin/startlazarus64>
^done
(gdb)
<-gdb-set env WINDOWID=81788934>
^done
(gdb)
<-gdb-set env XAUTHORITY=/home/dibo/.Xauthority>
^done
(gdb)
<-gdb-set env XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg>
^done
(gdb)
<-gdb-set env XDG_CURRENT_DESKTOP=Unity>
^done
(gdb)
<-gdb-set env XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/>
^done
(gdb)
<-gdb-set env XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0>
^done
(gdb)
<-gdb-set env XDG_SESSION_COOKIE=44eb14c7ed4039c0be6febce0000000c-1346647991.573323-1381701028>
^done
(gdb)
<-gdb-set env XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0>
^done
(gdb)
<-file-exec-and-symbols "/home/dibo/programowanie/projects/tmp2/project1">
^done
(gdb)
<-environment-cd .>
^done
(gdb)
<-environment-cd "/home/dibo/programowanie/projects/tmp2/">
^done
(gdb)
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>
^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."
(gdb)
<info functions FPC_CPUINIT>
&"info functions FPC_CPUINIT\n"
~"All functions matching regular expression \"FPC_CPUINIT\":\n"
^done
(gdb)
<info functions $$_RUNERROR$>
&"info functions $$_RUNERROR$\n"
~"All functions matching regular expression \"$$_RUNERROR$\":\n"
^done
(gdb)
<-exec-arguments >
^done
(gdb)
<set inferior-tty /dev/pts/1>
&"set inferior-tty /dev/pts/1\n"
^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<ptype TObject>
&"ptype TObject\n"
~"type = ^TOBJECT = class \n"
~"  public\n"
~"    function  CREATE () : TOBJECT;\n"
~"    procedure DESTROY (); virtual;\n"
~"    function  NEWINSTANCE () : TOBJECT; virtual;\n"
~"    procedure FREEINSTANCE (); virtual;\n"
~"    function  SAFECALLEXCEPTION () : HRESULT; virtual;\n"
~"    procedure DEFAULTHANDLER (); virtual;\n"
~"    procedure FREE ();\n"
~"    function  INITINSTANCE () : TOBJECT;\n"
~"    procedure CLEANUPINSTANCE ();\n"
~"    function  CLASSTYPE () : TCLASS;\n"
~"    function  CLASSINFO () : POINTER;\n"
~"    function  CLASSNAME () : SHORTSTRING;\n"
~"    function  CLASSNAMEIS () : BOOLEAN;\n"
~"    function  CLASSPARENT () : TCLASS;\n"
~"    function  INSTANCESIZE () : INT64;\n"
~"    function  INHERITSFROM () : BOOLEAN;\n"
~"    function  STRINGMESSAGETABLE () : PSTRINGMESSAGETABLE;\n"
~"    function  METHODADDRESS () : POINTER;\n"
~"    function  METHODNAME () : SHORTSTRING;\n"
~"    function  FIELDADDRESS () : POINTER;\n"
~"    procedure AFTERCONSTRUCTION (); virtual;\n"
~"    procedure BEFOREDESTRUCTION (); virtual;\n"
~"    procedure DEFAULTHANDLERSTR (); virtual;\n"
~"    procedure DISPATCH (); virtual;\n"
~"    procedure DISPATCHSTR (); virtual;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACEBYSTR () : BOOLEAN;\n"
~"    function  GETINTERFACEWEAK () : BOOLEAN;\n"
~"    function  GETINTERFACEENTRY () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACEENTRYBYSTR () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACETABLE () : PINTERFACETABLE;\n"
~"    function  UNITNAME () : ANSISTRING;\n"
~"    function  EQUALS () : BOOLEAN; virtual;\n"
~"    function  GETHASHCODE () : INT64; virtual;\n"
~"    function  TOSTRING () : ANSISTRING; virtual;\n"
~"end\n"
^done
(gdb)
<ptype Exception>
&"ptype Exception\n"
~"type = ^EXCEPTION = class : public TOBJECT \n"
~"  private\n"
~"    FMESSAGE : ANSISTRING;\n"
~"    FHELPCONTEXT : LONGINT;\n"
~"    HELPCONTEXT : LONGINT;\n"
~"    MESSAGE : ANSISTRING;\n"
~"\n"
~"  public\n"
~"    function  CREATE () : EXCEPTION;\n"
~"    function  CREATEFMT () : EXCEPTION;\n"
~"    function  CREATERES () : EXCEPTION;\n"
~"    function  CREATERESFMT () : EXCEPTION;\n"
~"    function  CREATEHELP () : EXCEPTION;\n"
~"    function  CREATEFMTHELP () : EXCEPTION;\n"
~"    function  CREATERESHELP () : EXCEPTION;\n"
~"    function  CREATERESFMTHELP () : EXCEPTION;\n"
~"end\n"
^done
(gdb)
<ptype Shortstring>
&"ptype Shortstring\n"
~"type = ShortString = record \n"
~"    length : BYTE;\n"
~"    st : array [0..-1] of CHAR;\n"
~"end\n"
^done
(gdb)
<ptype pointer>
&"ptype pointer\n"
~"type = ^pointer\n"
^done
(gdb)
<ptype byte>
&"ptype byte\n"
~"type = BYTE\n"
^done
(gdb)
<info file>
&"info file\n"
~"Symbols from \"/home/dibo/programowanie/projects/tmp2/project1\".\n"
~"Local exec file:\n"
~"\t`/home/dibo/programowanie/projects/tmp2/project1', file type elf64-x86-64.\n"
~"\tEntry point: 0x443a20\n"
~"\t0x00000000004001c8 - 0x00000000004001e4 is .interp\n"
~"\t0x00000000004001e4 - 0x0000000000400204 is .note.ABI-tag\n"
~"\t0x0000000000400208 - 0x00000000004051f8 is .hash\n"
~"\t0x00000000004051f8 - 0x00000000004170f0 is .dynsym\n"
~"\t0x00000000004170f0 - 0x000000000042b760 is .dynstr\n"
~"\t0x000000000042b760 - 0x000000000042cf4a is .gnu.version\n"
~"\t0x000000000042cf50 - 0x000000000042cfb0 is .gnu.version_r\n"
~"\t0x000000000042cfb0 - 0x0000000000437d50 is .rela.dyn\n"
~"\t0x0000000000437d50 - 0x000000000043ee90 is .rela.plt\n"
~"\t0x000000000043ee90 - 0x0000000000443a20 is .plt\n"
~"\t0x0000000000443a20 - 0x000000000081a050 is .text\n"
~"\t0x000000000081a050 - 0x000000000081a090 is .eh_frame\n"
~"\t0x0000000000a1a090 - 0x0000000000a1a2d0 is .dynamic\n"
~"\t0x0000000000a1a2d0 - 0x0000000000a1dc98 is .got\n"
~"\t0x0000000000a1dc98 - 0x0000000000a20270 is .got.plt\n"
~"\t0x0000000000a20270 - 0x0000000000bd4800 is .data\n"
~"\t0x0000000000bd4800 - 0x0000000000bf7508 is fpc.resources\n"
~"\t0x0000000000bf7510 - 0x0000000000c23cd0 is .bss\n"
~"\t0x0000000000c23cd0 - 0x0000000000c23d28 is fpc.reshandles\n"
^done
(gdb)
<-data-evaluate-expression sizeof(POINTER)>
^done,value="8"
(gdb)
<-break-insert -f foo>
&"Function \"foo\" not defined.\n"
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="foo",times="0",original-location="foo"}
(gdb)
<-break-delete 1>
^done
(gdb)
<-break-insert main>
^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000443ac9",func="main",file="project1.lpr",fullname="/home/dibo/programowanie/projects/tmp2/project1.lpr",line="16",times="0",original-location="main"}
(gdb)
<-break-insert +0>
&"/build/buildd/gdb-7.4-2012.04/gdb/buildsym.c:696: internal-error: failed internal consistency check\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable."
&"\n"

I have changed from stabs to dwarf and seems that was a problem! Thanks!

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: BGRABitmap - debugger error
« Reply #8 on: September 03, 2012, 03:04:56 pm »
I don't even must use dwarf. It works even if I change from stabs to automatic. BGRABitmap package had "stabs" by default. Don't know why. I'm changing subject to "SOLVED". Thanks to everyone!

BTW: 5.6 worked because debug options in this version were disabled ;)
« Last Edit: September 03, 2012, 03:12:43 pm by Dibo »

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: [SOLVED] BGRABitmap - debugger error
« Reply #9 on: September 03, 2012, 08:43:36 pm »
Cool.  :)
Conscience is the debugger of the mind

bp

  • New member
  • *
  • Posts: 8
Re: [SOLVED] BGRABitmap - debugger error
« Reply #10 on: November 23, 2012, 05:05:43 pm »
I've had beaten by the same issue, but now on 64-bit platform. Developers say, that stabs aren't well supported on 64-bit systems http://bugs.freepascal.org/view.php?id=23365.

May be it is worth, to set the type of symbols to 'System default'?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: [SOLVED] BGRABitmap - debugger error
« Reply #11 on: November 23, 2012, 05:47:45 pm »
May be it is worth, to set the type of symbols to 'System default'?
I think that's an extremely good idea.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: [SOLVED] BGRABitmap - debugger error
« Reply #12 on: November 26, 2012, 09:50:41 pm »
Is "System default" the option "-g" ?
Conscience is the debugger of the mind

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: [SOLVED] BGRABitmap - debugger error
« Reply #13 on: November 27, 2012, 10:19:01 am »
Is "System default" the option "-g" ?
Yes, that's right.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: [SOLVED] BGRABitmap - debugger error
« Reply #14 on: December 02, 2012, 07:57:35 pm »
Ok.  :)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018