Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Threadsearch plugin cause crash when initilized (wx3.1,C::B svn head)
ollydbg:
Hi, BlueHazzard, thanks for the tests, so this happens only in release version of wx(either in wx3.1 or wx git head), I will ask the question to wx maillist.
EDIT: posted here: https://groups.google.com/d/msg/wx-users/LUxm6fUhirk/FJRFNIt6AAAJ
ollydbg:
I just build a debug version of wx3.1 with the following command: (note I have -std=gnu++11)
--- Code: ---mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-keep-inline-dllexport -std=gnu++11" >log-debug-cxx11.txt 2>&1
--- End code ---
And then I just rebuild the C::B against this wx3.1, and I don't see the crash. While, if I add the -std=gnu++11 option to build a release version of wx3.1, the crash still happens.
Guess: Do I need to add the option "-fno-keep-inline-dllexport" to build the C::B or the plugins? That's was too complex if both the wx library and C::B need the exact same build option. :(
EDIT: please note that my wx3.1 source was already applied a patch to avoid a crash (in wxWidgets-3.1.0\include\wx\rtti.h, see #17483 (wxDynamicCast segfault with mingw64 5.3.0 release build) – wxWidgets):
--- Code: --- bool IsKindOf(const wxClassInfo *info) const
{
if ( info == this )
return true;
if ( m_baseInfo1 )
{
if ( m_baseInfo1->IsKindOf(info) )
return true;
}
if ( m_baseInfo2 )
{
if ( m_baseInfo2->IsKindOf(info) )
return true;
}
return false;
}
--- End code ---
ollydbg:
Oh my god, it looks like I meet a similar gcc bug, I just find the cause of this bug, see here:
in wxWidgets's ticket #17483 and https://groups.google.com/d/msg/wx-users/LUxm6fUhirk/GOX_obajAAAJ in wx-user maillist.
BlueHazzard:
So if you apply this optimization patch the crash goes away? So this should be reported to gcc?
stahta01:
--- Quote from: BlueHazzard on October 14, 2017, 05:44:30 pm ---So if you apply this optimization patch the crash goes away? So this should be reported to gcc?
--- End quote ---
The second one I would vote no, because I think the GCC crew would rightly say it is a wxWidgets bug.
The first one, I have no idea what the cause is; but, I would guess the right solution is to disable optimization.
Note: That might also fix the second bug. IIRC, someone found the right optimization to disable already.
Might that optimization only be needed on the second bug on wxWidgets's code.
Since, it is not in a header file.
I would try "-fno-delete-null-pointer-checks" in building wxWidgets and see if the second problem goes away.
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version