Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
C::B runtime errors when WXWIN_COMPATIBILITY_2_4=0 or disable-compat24
stahta01:
FYI:
This thread is for troubleshooting crashes and errors when running Code::Blocks linked against wxWidgets 2.6 with WXWIN_COMPATIBILITY_2_4 set to 0. (WXWIN_COMPATIBILITY_2_4 is set in setup.h file.)
Tim S
Note: All known problems with WXWIN_COMPATIBILITY_2_4 set to 0 fixed by these two patches.
( Patches also work with wxWidgets 2.6 & wxWidgets 2.8 )
Patches to core Code::Blocks project and contrib Code::Blocks projects:
[ Patch #1655 ] wxHIDE_READONLY patch for wxWidgets 2.7 Submitted By: stahta01
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1655&group_id=5358
[ Patch #1661 ] wxCheckListBox patch for wxWidgets 2.7 Submitted By: stahta01
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1661&group_id=5358
[ Patch #1893 ] wxCheckListBox patch for wxWidgets 2.8 Submitted By: stahta01 found by wxLearner
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1893&group_id=5358
stahta01:
--- Quote from: afb on November 26, 2006, 05:12:11 pm ---You were right, it seems that the crashes with wxWidgets 2.8.0 are in fact general crashes when compat24 is turned off... I'm seeing the same ones in wxWidgets 2.6.3p2 now, that I did with wxWidgets 2.8.0rc1 earlier:
Settings > Environments *crash*
--- Code: ---../src/generic/listctrl.cpp(3699): assert "wxAssertFailure" failed: invalid item index in SetItem
--- End code ---
Settings > Editor *crash*
--- Code: ---../src/generic/listctrl.cpp(3699): assert "wxAssertFailure" failed: invalid item index in SetItem
--- End code ---
Settings > Compiler and Debugger *crash*
--- Code: ---../src/common/list.cpp(326): assert "wxAssertFailure" failed: invalid index in wxListBase::Item
--- End code ---
Settings > Global variables *crash*
--- Code: ---../src/mac/carbon/choice.cpp(217): assert "wxAssertFailure" failed: wxChoice::GetString(): invalid index
--- End code ---
So it seems that debugging/fixing Code::Blocks with this compat setting turned off in wxWidgets 2.6 is a good idea to start with, as it is both good now and will also help running with wxWidgets 2.8 later ?
--- End quote ---
afb:
--- Quote from: stahta01 on November 26, 2006, 11:56:34 pm ---WXWIN_COMPATIBILITY_2_4 set to 0. (WXWIN_COMPATIBILITY_2_4 is set in setup.h file.)
--- End quote ---
If you are building wxWidgets with autotools (./configure),
this instead corresponds to the --disable-compat24 flag...
stahta01:
Settings > Environments *crash* issue
File: src/src/environmentsettingsdlg.cpp
replaced line
wxCheckListBox* clb = XRCCTRL(*this, "chkDialogs", wxCheckListBox);
with lines
int xrcId = wxXmlResource::GetXRCID(wxT("chkDialogs"));
cbAssert(xrcId);
wxWindow* aWindow = (*this).FindWindow(xrcId);
cbAssert(aWindow != NULL);
wxCheckListBox* clb = (wxStaticCast(aWindow, wxCheckListBox));
cbAssert(clb != NULL);
The above is valid under windows, look in wx/xrc/xmlres.h to verify this substitution.
Note: under windows (*this).FindWindow(xrcId); is returning null.
See common/window.cpp for FindWindow code.
See wx/msw/window.h for wxWindowList
See wx/hash.h for WX_DECLARE_HASH
I am thinking it is a Hash table related error at this time, I am trying to compile wx26 with wxUSE_STL to help to confirm or deny my current theory. I am trying to add STLPort to minGW 3.4.5; downloading it from orge3d site. (Did NOT need STLPort to compile wx2.6 with wxUSE_STL=1, but C::B does NOT like wxUSE_STL=1)
Tim S
afb:
I think some of these were showing up as failed assertions before, well worth looking into:
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1538&group_id=5358
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1539&group_id=5358
Navigation
[0] Message Index
[#] Next page
Go to full version