Page 1 of 1

Ogre crashes on Mono/Linux

Posted: Sat Feb 12, 2005 4:16 pm
by sim8
I have created a game engine DLL using Ogre, which works just fine when it is linked to a C application. Now I would like to try using the same DLL in .NET (Mono), but I am getting this error in OgreRoot::OgreRoot():

*** glibc detected *** free(): invalid pointer: 0x0815ec0
Aborted

I've tracked the problem down to the creation of the version string (OgreRoot.cpp, line 133). I'm guessing that the string object is not getting initialized properly, but I'm not positive yet. I thought I'd mention it in case someone with more knowledge about Ogre (just about everyone) might have a better idea what is going on.

I will keep investigating and report back.

Posted: Sat Feb 12, 2005 5:01 pm
by sim8
The problem seems to be in the '+' operator and only occurs when you mix String classes with string constants, like:

mVersion = StringConverter::toString(1) + "." + StringConverter::toString("0");

I haven't been able to locate the '+' operator yet though, so I can't be entirely certain yet.

Posted: Sat Feb 12, 2005 5:12 pm
by sim8
The '+' operator is actually part of the STL (std::string), and probably isn't the problem. I'm not sure how to proceed now. Does Linux have the same issue as Windows where modules can be linked with different run-time libraries, causing memory issues?

Any ideas would be much appreciated.

Posted: Sun Feb 13, 2005 11:35 pm
by PeterNewman
Search the forum for Axiom. Its a full port of Ogre to C#, which is known to work on .NET and Mono.

Posted: Mon Feb 14, 2005 9:43 pm
by sim8
I need a DLL that is accessible from both .NET and C++. Axiom, even if it were as mature and well-supported as Ogre, won't work for my project.