User forums > Help

GDB Crash when using wxWidgets 2.9.x

(1/4) > >>

Feneck91:
I make a project with wxWidgets 2.8.12, all working fine.
But... to be able to use wxAny (see topic here) and prepare my project to use the future wxWidgets 3.0 release, I have modified all my application to use wxWidgets 2.9.3.
After corrected all crash due to wxWidgets interface modifications, all working fine.
Can run the app in debug mode without debugger.
Can run the app in debug mode with debugger running without code::blocks.
But cannot run gdb inside Code::Blocks (svn 7286, but other version have same problems), the debugger crash.

WxWidgets compilation batch (in build\Win32 folder):
--- Code: ---@ECHO OFF

REM Record current folder path
pushd .
cd ../../
CALL Build/Win32/Settings.bat

ECHO WxWidgets path = %WXWIN%
cd /D %WX_DIR%\build\msw

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1 clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1 clean

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1

REM Restore initial path
popd

pause
--- End code ---
Setting.bat
--- Code: ---@ECHO OFF
REM ------------------
REM     SETTINGS
REM ------------------

REM ------------------
REM       MINGW
PATH=C:\MinGW\bin;C:\MinGW\mingw32\bin

REM ------------------
REM      TTGEST
SET TTGEST_ROOT_PATH=%cd%

REM ------------------
REM     WXWIDGETS
SET WX_WIDGETS_VERSION=2.9.2
SET WXWIN=%TTGEST_ROOT_PATH%\wxWidgets-%WX_WIDGETS_VERSION%
ECHO WXWIN=%WXWIN%
SET WX_DIR=%WXWIN%
SET WX_WIDGETS_VENDOR_NAME=TTGEST

--- End code ---
All wxWidgets compilation is working fine. May I miss some new options ? It works with wxWidgets 2.8.12

Debugger window :
--- Code: ---Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Win32 Unicode Debug
Adding source dir: D:\Dev\TTGest\trunk\TTGest\
Adding source dir: D:\Dev\TTGest\trunk\TTGest\
Adding file: ..\Application\Debug\TTGestd.exe
Starting debugger:
done
Registered new type: STL WString
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.0.50.20100202
Debugger finished with status 1

--- End code ---

And debugger log (activated into code::blocks debugger options)
--- Code: ---PATH=.;D:\Dev\TTGest\trunk\CAnsiPort\lib;D:\Dev\TTGest\trunk\wxETK\lib;D:\Dev\TTGest\trunk\wxCAnsiPortETK\lib;D:\Dev\TTGest\trunk\TTGestLib\lib;D:\Dev\TTGest\trunk\wxWidgets-2.9.2\lib\gcc_dll;C:\MinGW\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Subversion\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live\Shared;C:\Program Files\Internet Explorer
Command-line: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet -args ../Application/Debug/TTGestd.exe
Working dir : D:\Dev\TTGest\trunk\TTGest\
> set prompt >>>>>>cb_gdb:
Reading symbols from D:\Dev\TTGest\trunk\TTGest/../Application/Debug/TTGestd.exe...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.0.50.20100202
Copyright (C) 2010 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../../gdb-7.0.50.20100202/gdb/breakpoint.c:6481: internal-error: expand_line_sal_maybe: Assertion `found' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

--- End code ---

A way : if I remove "Catch C++ exception" the debugger run fine inside Code::Blocks.
Strange, isn't it ?


eranif:
BTW, you probably want to use:


--- Code: ---mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1 DEBUG_FLAG=0
--- End code ---

for building release version (otherwise you will get wxDEBUG_LEVEL=1 in release build which enable assertions)

Eran

Feneck91:
I build wxWidgets for several years like this :?
Ok, added. Is DEBUG_FLAG=1 must be set to build in debug mode ?

But, it is a release problem, my problem is in debug mode, using gdb under Code::Blocks.

Anyway, thanks for your reply, have update my build batch for release mode ;)
--- Code: ---@ECHO OFF

REM Record current folder path
pushd .
cd ../../
CALL Build/Win32/Settings.bat

ECHO WxWidgets path = %WXWIN%
cd /D %WX_DIR%\build\msw

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1 clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1 DEBUG_FLAG=0 clean

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release VENDOR=%WX_WIDGETS_VENDOR_NAME% USE_XRC=1 DEBUG_FLAG=0

REM Restore initial path
popd

pause
--- End code ---

oBFusCATed:
I guess the problem is in GDB, not in C::B, please report it to the GDB devs, we can't do anything about it.

Feneck91:
Ok, it is in GDB.
Why with wxWidgets 2.8.x it's work fine ?
Why with gdb out of Code::Blocks it's work fine ?
Why with "Catch C++ Exception" disabled inside Code::Blocks IDE it's work fine ?

I think it is a gdb configuration process into Code::Blocks that make it crashed.
Is gdb_types.script is up to date with wxWidgets 2.9.x and don't make exceptions ?
Strange, when remove C:\Program Files\CodeBlocks\share\CodeBlocks\scripts\gdb_types.script file, this doesn't remove the following lines when gdb start :

--- Code: ---Registered new type: STL WString
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
--- End code ---

I'm not sure it is only a gdb poblem else it will crash in the same way with wxWidgets 2.8.x, isn't it ?
Some peaple already report this kind of problem ?

Navigation

[0] Message Index

[#] Next page

Go to full version