User forums > General (but related to Code::Blocks)

C::B crashes after Debug - Next Line

<< < (2/3) > >>

oBFusCATed:
Please enable full (in the debugger's settings) and post it.

ollydbg:
I see such kind of issue one or two years ago when debugging C::B, but I don't see them right now, I believe it is a bug in GDB or GCC, but they are already fixed. ;)

benezan:
I also have the impression that somehow my installation of Mingw is broken. But I feel a bit overwhelmed fixing it. I tried to install the latest version of C::B. Here it's said that codeblocks-13.12mingw-setup.exe is recommended and that it comes with a stable, precompiled version (4.7.1) of MinGw.

When I install that my program doesn't run at all. I get an error message "_gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll". I googled and found some answers but, no , I don't have a 64 bit system, my compiler executables are set correctly (g++, not gcc) and I assume that the version of the dll should fit the compiler if it comes in the same archive. The computer was blank (no other version of C::B and no other compiler was ever installed on it) and I even searched the hard disk for different versions of libstdc++-6.dll, none found.

I gave up and completely deleted the Mingw installation. I re-installed from my archive "mingw-get-inst-20120426.exe" I saved last year. Surprisingly when I enter "gcc -v" the new installation displays 4.6.2 where on my other computer it says 4.7.2 (GDB 7.4 as opposed to 7.5). I suspect this has something to do with that's not a real archive but a "get-inst" that downloads from the internet... but anyway - now it works, I mean it compiles and runs with C::B V13.12. But I still get the same debugger error "input/output error...". :(

So I think Ollydbg is right, it's not a C::B bug but a GDB/GCC problem. So please excuse my ignorance, I know this question has surely been asked many times before: "Where do I get a stable version of MinGw and how do I install it so that it works?" :-\

The precompiled bundle "codeblocks-13.12mingw-setup.exe" doesn't seem to work. I don't want the latest "experimental" version (TDM 4.8.1) but the stable one, if possible. Can I expect the "_gxx_personality_v0" issue to be fixed if I build it on my own insead of using the precompiled one? Thank you very much for your patience.

benezan:
The full debug log is here:

--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\Projekte\BeamiconII\Source\Beamicon2\
Adding source dir: E:\Projekte\BeamiconII\Source\Beamicon2\
Adding file: E:\Projekte\BeamiconII\Source\Beamicon2\bin\Debug\Beamicon2.exe
Changing directory to: E:/Projekte/BeamiconII/Source/Beamicon2/.
Set variable: PATH=.;C:\Programme\wxWidgets-2.9.4\lib\gcc_dll;C:\Programme\MinGW\bin;C:\Programme\MinGW;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\Programme\AlteraQuartus\quartus\bin;C:\Programme\MinGW\GnuWin32\bin

[debug]Command-line: C:\Programme\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args E:/Projekte/BeamiconII/Source/Beamicon2/bin/Debug/Beamicon2.exe
[debug]Working dir : E:\Projekte\BeamiconII\Source\Beamicon2

Starting debugger: C:\Programme\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args E:/Projekte/BeamiconII/Source/Beamicon2/bin/Debug/Beamicon2.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from E:\Projekte\BeamiconII\Source\Beamicon2\bin\Debug\Beamicon2.exe...
[debug]done.
[debug](gdb)
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> source C:\Programme\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory E:/Projekte/BeamiconII/Source/Beamicon2/
[debug]Source directories searched: E:/Projekte/BeamiconII/Source/Beamicon2;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "E:/Projekte/BeamiconII/Source/Beamicon2/src/gcodeparser.cpp:275"
[debug]Breakpoint 1 at 0x456ac4: file E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp, line 275.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: E:\Projekte\BeamiconII\Source\Beamicon2\bin\Debug\Beamicon2.exe

Child process PID: 2796

[debug][New Thread 2796.0xb34]
[debug][New Thread 2796.0xbcc]
[debug][New Thread 2796.0xbd0]
[debug][New Thread 2796.0xc00]
[debug][New Thread 2796.0xbfc]
[debug][New Thread 2796.0x8a4]
[debug][New Thread 2796.0x9e0]
[debug][New Thread 2796.0xbc0]
[debug][New Thread 2796.0xb98]
[debug][New Thread 2796.0x8b0]
[debug][New Thread 2796.0x560]
[debug][New Thread 2796.0xe34]
[debug][New Thread 2796.0x8e0]
[debug][New Thread 2796.0x6bc]
[debug][New Thread 2796.0xe48]
[debug][New Thread 2796.0xe50]
[debug]Breakpoint 1, GCodeParser::ReadWord (this=0xad72850, code=@0x22f64b: 0 '\000', index=@0x22f638: -1, num=@0x22f63c: 8.9857092511642948e-316) at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275
[debug]E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275:8661:beg:0x456ac4
[debug]>>>>>>cb_gdb:

At E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275

[debug]> bt 30
[debug]#0  GCodeParser::ReadWord (this=0xad72850, code=@0x22f64b: 0 '\000', index=@0x22f638: -1, num=@0x22f63c: 8.9857092511642948e-316) at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275
[debug]#1  0x00457baa in GCodeParser::ParseLine (this=0xad72850) at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:492
[debug]#2  0x00459470 in GCodeParser::ExecuteProgram (this=0xad72850, label=0x4c89cf "%") at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:1117
[debug]#3  0x0040eb46 in Beamicon2Frame::OnMenuFileOpen (this=0xad72430, event=...) at E:\Projekte\BeamiconII\Source\Beamicon2\Beamicon2Main.cpp:847
[debug]#4  0x01403414 in wxAppConsoleBase::HandleEvent (this=0xad1c7a0, handler=0xad72430, func=(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x40e958 <Beamicon2Frame::OnMenuFileOpen(wxCommandEvent&)>, event=...) at ../../src/common/appbase.cpp:591
[debug]#5  0x01403470 in wxAppConsoleBase::CallEventHandler (this=0xad1c7a0, handler=0xad72430, functor=..., event=...) at ../../src/common/appbase.cpp:603
[debug]#6  0x014bba2d in wxEvtHandler::ProcessEventIfMatchesId (entry=..., handler=0xad72430, event=...) at ../../src/common/event.cpp:1333
[debug]#7  0x014bc3b2 in wxEvtHandler::SearchDynamicEventTable (this=0xad72430, event=...) at ../../src/common/event.cpp:1675
[debug]#8  0x014bbe0a in wxEvtHandler::TryHereOnly (this=0xad72430, event=...) at ../../src/common/event.cpp:1520
[debug]#9  0x01a2a488 in wxEvtHandler::TryBeforeAndHere (this=0xad72430, event=...) at ../../include/wx/event.h:3339
[debug]#10 0x014bbcb1 in wxEvtHandler::ProcessEventLocally (this=0xad72430, event=...) at ../../src/common/event.cpp:1457
[debug]#11 0x014bbc59 in wxEvtHandler::ProcessEvent (this=0xad72430, event=...) at ../../src/common/event.cpp:1430
[debug]#12 0x014bbe77 in wxEvtHandler::SafelyProcessEvent (this=0xad72430, event=...) at ../../src/common/event.cpp:1537
[debug]#13 0x016309d4 in wxWindowBase::HandleWindowEvent (this=0xad72430, event=...) at ../../src/common/wincmn.cpp:1496
[debug]#14 0x015fae82 in wxMenuBase::SendEvent (this=0xad628c0, itemid=447, checked=-1) at ../../src/common/menucmn.cpp:658
[debug]#15 0x015c38d7 in wxFrameBase::ProcessCommand (this=0xad72430, item=0xad82480) at ../../src/common/framecmn.cpp:280
[debug]#16 0x01545133 in wxFrame::HandleCommand (this=0xad72430, id=447, cmd=0, control=0x0) at ../../src/msw/frame.cpp:819
[debug]#17 0x0154553c in wxFrame::MSWWindowProc (this=0xad72430, message=273, wParam=447, lParam=0) at ../../src/msw/frame.cpp:921
[debug]#18 0x0151e706 in wxWndProc (hWnd=0x605a6, message=273, wParam=447, lParam=0) at ../../src/msw/window.cpp:2711
[debug]#19 0x7e368734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
[debug]#20 0x000605a6 in ?? ()
[debug]#21 0x00000111 in ?? ()
[debug]#22 0x000001bf in ?? ()
[debug]#23 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]Warning:
[debug]Cannot insert breakpoint -144.
[debug]Error accessing memory address 0x7816cd30: Input/output error.
[debug]Cannot insert breakpoint -143.
[debug]Error accessing memory address 0x785947d8: Input/output error.
[debug]0x00456ac7 in GCodeParser::ReadWord (this=0xad72850, code=@0x22f64b: 0 '\000', index=@0x22f638: -1, num=@0x22f63c: 8.9857092511642948e-316) at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275
[debug]E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275:8661:beg:0x456ac7
[debug]>>>>>>cb_gdb:

Error accessing memory address 0x7816cd30: Input/output error.
Error accessing memory address 0x785947d8: Input/output error.
At E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275

[debug]> bt 30
[debug]#0  0x00456ac7 in GCodeParser::ReadWord (this=0xad72850, code=@0x22f64b: 0 '\000', index=@0x22f638: -1, num=@0x22f63c: 8.9857092511642948e-316) at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:275
[debug]#1  0x00457baa in GCodeParser::ParseLine (this=0xad72850) at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:492
[debug]#2  0x00459470 in GCodeParser::ExecuteProgram (this=0xad72850, label=0x4c89cf "%") at E:\Projekte\BeamiconII\Source\Beamicon2\src\gcodeparser.cpp:1117
[debug]#3  0x0040eb46 in Beamicon2Frame::OnMenuFileOpen (this=0xad72430, event=...) at E:\Projekte\BeamiconII\Source\Beamicon2\Beamicon2Main.cpp:847
[debug]#4  0x01403414 in wxAppConsoleBase::HandleEvent (this=0xad1c7a0, handler=0xad72430, func=(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x40e958 <Beamicon2Frame::OnMenuFileOpen(wxCommandEvent&)>, event=...) at ../../src/common/appbase.cpp:591
[debug]#5  0x01403470 in wxAppConsoleBase::CallEventHandler (this=0xad1c7a0, handler=0xad72430, functor=..., event=...) at ../../src/common/appbase.cpp:603
[debug]#6  0x014bba2d in wxEvtHandler::ProcessEventIfMatchesId (entry=..., handler=0xad72430, event=...) at ../../src/common/event.cpp:1333
[debug]#7  0x014bc3b2 in wxEvtHandler::SearchDynamicEventTable (this=0xad72430, event=...) at ../../src/common/event.cpp:1675
[debug]#8  0x014bbe0a in wxEvtHandler::TryHereOnly (this=0xad72430, event=...) at ../../src/common/event.cpp:1520
[debug]#9  0x01a2a488 in wxEvtHandler::TryBeforeAndHere (this=0xad72430, event=...) at ../../include/wx/event.h:3339
[debug]#10 0x014bbcb1 in wxEvtHandler::ProcessEventLocally (this=0xad72430, event=...) at ../../src/common/event.cpp:1457
[debug]#11 0x014bbc59 in wxEvtHandler::ProcessEvent (this=0xad72430, event=...) at ../../src/common/event.cpp:1430
[debug]#12 0x014bbe77 in wxEvtHandler::SafelyProcessEvent (this=0xad72430, event=...) at ../../src/common/event.cpp:1537
[debug]#13 0x016309d4 in wxWindowBase::HandleWindowEvent (this=0xad72430, event=...) at ../../src/common/wincmn.cpp:1496
[debug]#14 0x015fae82 in wxMenuBase::SendEvent (this=0xad628c0, itemid=447, checked=-1) at ../../src/common/menucmn.cpp:658
[debug]#15 0x015c38d7 in wxFrameBase::ProcessCommand (this=0xad72430, item=0xad82480) at ../../src/common/framecmn.cpp:280
[debug]#16 0x01545133 in wxFrame::HandleCommand (this=0xad72430, id=447, cmd=0, control=0x0) at ../../src/msw/frame.cpp:819
[debug]#17 0x0154553c in wxFrame::MSWWindowProc (this=0xad72430, message=273, wParam=447, lParam=0) at ../../src/msw/frame.cpp:921
[debug]#18 0x0151e706 in wxWndProc (hWnd=0x605a6, message=273, wParam=447, lParam=0) at ../../src/msw/window.cpp:2711
[debug]#19 0x7e368734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
[debug]#20 0x000605a6 in ?? ()
[debug]#21 0x00000111 in ?? ()
[debug]#22 0x000001bf in ?? ()
[debug]#23 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:

--- End code ---

MortenMacFly:
Check you PATH environment variable and compiler settings in C::B. It looks like you have multiple instances of different compiler versions installed that conflict (which is normal in the case of multiple version in the PATH).

If unsure, search for gcc*.* across your whole PC.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version