News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Crash on wxString related function frequently

Started by snakesin, May 11, 2010, 03:04:56 PM

Previous topic - Next topic

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:

    <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&amp;)" 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&amp;, bool)" offset="000000f4"/>
    <frame level="9" function="EncodingDetector::EncodingDetector(wxString const&amp;)" offset="0000006a"/>


Case 2:

    <frame level="2" function="wxStringBase::operator=(wxStringBase const&amp;)" offset="00000017"/>
    <frame level="3" function="wxString::operator=(wxString const&amp;)" 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&amp;, int)" offset="000000a4"/>
    <frame level="6" function="wxPropertyGridState::SetPropertyValue(wxPGProperty*, wxString const&amp;)" offset="0000006c"/>
    <frame level="7" function="wxPropertyGrid::SetPropertyValue(wxPGId, wxString const&amp;)" offset="00000045"/>
    <frame level="8" function="wxPropertyGridManager::SetPropertyValue(wxPGId, wxString const&amp;)" offset="00000075"/>


oBFusCATed

What about sharing some basic info like OS, CB, compiler versions?

We're magicians level 0 :-P
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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 ...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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.