Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Crash on wxString related function frequently
(1/1)
snakesin:
Hello everyone,
I had encounter a crash problem frequently, the call stack in crash reports are almost point the problem to wxString.
But I can not figure out the root cause of this issue. This codeblocks was use wxWidget 2.8.10. thanks.
Case 1:
--- Code: --- <frame level="2" function="wcslen" offset="00000058"/>
<frame level="3" function="wxStringBase::InitWith(wchar_t const*, unsigned int, unsigned int)" offset="0000008d"/>
<frame level="4" function="wxStringBase" offset="00000000" file="/usr/local/include/wx-2.8/wx/string.h" line="368"/>
<frame level="5" function="wxString::wxString(wxWCharBuffer const&)" offset="0000002c"/>
<frame level="6" function="EncodingDetector::ConvertToWxStr(unsigned char const*, unsigned int)" offset="000000bc"/>
<frame level="7" function="EncodingDetector::DetectEncoding(unsigned char const*, unsigned int, bool)" offset="000003b1"/>
<frame level="8" function="EncodingDetector::DetectEncoding(wxString const&, bool)" offset="000000f4"/>
<frame level="9" function="EncodingDetector::EncodingDetector(wxString const&)" offset="0000006a"/>
--- End code ---
Case 2:
--- Code: --- <frame level="2" function="wxStringBase::operator=(wxStringBase const&)" offset="00000017"/>
<frame level="3" function="wxString::operator=(wxString const&)" offset="00000000" file="/usr/local/include/wx-2.8/wx/string.h" line="660"/>
<frame level="4" function="wxLongRcStringPropertyClass::SetColor(wxString)" offset="0000009b"/>
<frame level="5" function="wxLongRcStringPropertyClass::SetValueFromString(wxString const&, int)" offset="000000a4"/>
<frame level="6" function="wxPropertyGridState::SetPropertyValue(wxPGProperty*, wxString const&)" offset="0000006c"/>
<frame level="7" function="wxPropertyGrid::SetPropertyValue(wxPGId, wxString const&)" offset="00000045"/>
<frame level="8" function="wxPropertyGridManager::SetPropertyValue(wxPGId, wxString const&)" offset="00000075"/>
--- End code ---
oBFusCATed:
What about sharing some basic info like OS, CB, compiler versions?
We're magicians level 0 :-P
snakesin:
Sorry for incomplete information :?
The OS was fedora 11
code::blocks 8.02
compiler was gcc 4.4.0
I had add some plugin to make my c::b meet my requirement. Maybe I misuse the wxString in some places ?
Does it caused by the difference of unicode or other encoding ?
oBFusCATed:
Can you try a nightly build, the encoding detector has been improved/changed after the release of 8.02 ...
Jenna:
If you use threads, make sure not to access gui-elements directly from inside the thread and be aware that wxString is *not* threadsafe.
Navigation
[0] Message Index
Go to full version