User forums > Using Code::Blocks
crash when I try to open a wxsmith file under C::B against wx 3.3.1
ollydbg:
I think I have reported the same issue here in 2025-09, see this post:
Re: code::blocks hangs at startup
So, this issue lasts for a long time.
ollydbg:
--- Quote from: gd_on on January 26, 2026, 07:49:43 pm ---Not extensivety tested, but it looks OK : wxs files are opened without crash.
Thanks
--- End quote ---
I try to build a debug version of wx 3.3.1 library, and later build C::B against this library.
When I try to run the debugging, I see this:
--- Code: ---Active debugger config: GDB/CDB debugger:Default
Selecting target:
src
Adding source dir: F:\code\codeblocks-src\codeblocks_sfmirror\src\
Adding source dir: F:\code\codeblocks-src\codeblocks_sfmirror\src\
Adding file: F:\code\codeblocks-src\codeblocks_sfmirror\src\devel33_64\codeblocks.exe
Changing directory to: F:/code/codeblocks-src/codeblocks_sfmirror/src/devel33_64
Set variable: PATH=.;F:\code\wxWidgets-3.3.1\lib\gcc_dll"";F:\code\codeblocks-src\codeblocks_sfmirror\src\devel33_64;F:\code\codeblocks-src\codeblocks_sfmirror\src\exchndl\win64\lib;...
--- End code ---
Then, it said the wx dll can't be find, so the debugee C::B can't started.
But if you looked at this:
--- Code: ---F:\code\wxWidgets-3.3.1\lib\gcc_dll""
--- End code ---
You see the trailing quotes, this quotes come from some global compiler variable those values are "".
It works OK when in compiling, I see such things when compiling:
--- Code: ---[100.0%] g++.exe -shared -Wl,--out-implib=devel33_64\libcodeblocks.a -Wl,--dll
-LF:\code\wxWidgets-3.3.1\lib\gcc_dll""
-Ldevel33_64
--- End code ---
Now, here is the crash call stack, I put it in the txt file in attachment.
ollydbg:
--- Code: ---#if WXWIN_COMPATIBILITY_3_2
// By call to obsolete function we want to check if user-overriden function is still in use
wxString wxPGProperty::ValueToStringWithCheck(wxVariant& variant, wxPGPropValFormatFlags flags) const
{
m_oldValueToStringCalled = false;
wxString res = ValueToString(variant, static_cast<int>(flags));
if ( m_oldValueToStringCalled )
{
// Our own function was called - this implies that call was forwarded to the new overriding
// function and there is no need to call it explicitly.
}
else
{ // User-overriden obsolete function was called
wxFAIL_MSG(wxString::Format("in %s use ValueToString with 'flags' argument as wxPGPropValFormatFlags", GetClassInfo()->GetClassName()));
}
return res;
}
#endif // WXWIN_COMPATIBILITY_3_2
--- End code ---
In the call stack frame 2, this function always cause assert, do you see this? I have update comments in github issue: https://github.com/wxWidgets/wxWidgets/issues/26108#issuecomment-3803542263
ollydbg:
With the help of some AI, I think I have got the idea, but I'm not tested yet.
See here:
https://github.com/wxWidgets/wxWidgets/issues/26108#issuecomment-3809535580
It looks like we have to set a member variable in the override functions.
BTW: VZ(wx developer) just thought that the crash should not happen, but In my test case, if run without the debugger, the assert just cause the crash, not sure why. Any ideas?
ollydbg:
I first found a workaround patch, see here:
* wxSmith: workaround an assert issue happens when showing asmwarrior/codeblocks_sfmirror@e627289
Tested and it won't crash/assert now.
But this is only a workaround, should find a better way. ;)
Navigation
[0] Message Index
[*] Previous page
Go to full version