Page 1 of 1

possible bug?

Posted: Tue Nov 28, 2006 06:24
by arbuckle911
I'm getting some extremely odd crashes with my CEGUI code.
Read the comments in what I post below

-----------------------------
bool DirectConnect(const CEGUI::EventArgs& args)
{
using namespace CEGUI;
WindowManager& winMgr = WindowManager::getSingleton();
CEGUI::String playStr, ipStr;
Editbox* ipBox = static_cast<Editbox*>(winMgr.getWindow("IPBox"));//THIS CODE WORKS
Editbox* nameBox = static_cast<Editbox*>(winMgr.getWindow("PlayerNameBox"));//THIS CODE WORKS
nameBox->setText("some text");//THIS CODE WORKS
ipBox->setText("some text"); //THIS CODE WORKS
ipStr = nameBox->getText();//THIS CODE CRASHES!
playStr = ipBox->getText();//THIS ALSO CRASHES!
return true;
};
--------------------------------------------
I'm at a loss here because my pointers are working (I can set text) but it crashes with an access violation when reading the data. Even stranger, I can run this just fine in debug mode, I only get the errors with release mode.

EDIT: There are no errors in the log file either...

Posted: Tue Nov 28, 2006 06:34
by lindquist
the obvious question would be if you are linking against the correct libraries.
CEGUIBase.lib for Release, CEGUIBase_d.lib for Debug. Also the runtime library has to be the same as you built cegui with (Multithreaded DLL, debug for Debug as well)

Posted: Tue Nov 28, 2006 06:45
by arbuckle911
I double checked the debug and release links, they are fine. I downloaded the pre-compiled dll version, and my release runtime is set to Multi-threaded and my debug is multi-threaded debug.

I just tried a release Multithreaded DLL runtime compile and got the exact same results.

EDIT: I'm using VS.NET 2003 (not express)

Posted: Tue Nov 28, 2006 08:46
by arbuckle911
ok, I've just built CEGUI from source, and used Multithreaded DLL in both, but same problem.

Posted: Thu Nov 30, 2006 20:48
by Pompei2
Hmmm some time ago i read something of problems with VS2003 and some libraries ... i can't help much but be sure that alle libraries (even 3rd party used by CEGUI) are compiled to use the same memory routines. sorry, can't help more and i know these are the most awful problems, but i am quite sure that is a link error :(