Well, even if 0x0 nulls are OK in wxStrings, when we build a memory stream from the c_string version of the wxString, doesn't this chop off at the first 0x0?
buf = Manager::Get()->GetConfigManager(_T("app"))->ReadBinary(_T("/main_frame/layout"));
wxMemoryInputStream ms(buf.c_str(), buf.Length());
And then the ms memorystream wouldn't hold all it should, so it crashes a few lines below.
Edit:
When I put a watch on ms after those two lines, gdb gives <incomplete type>. Tracing into the wxSlideBar::LoadFromStream -> wxUtil::ReadString() call,
wxDockit/src/generic/util.cpp:34
stream.Read( &size, sizeof( size ) );
sets size to 1392520448. We then allocate a buffer:
char* psz = new char[size + 1];
whoops.