Ogre crashes on Mono/Linux

Problems building or running the engine, queries about how to use features etc.
Post Reply
sim8
Gnoblar
Posts: 9
Joined: Mon Dec 06, 2004 11:13 pm
Contact:

Ogre crashes on Mono/Linux

Post 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.
sim8
Gnoblar
Posts: 9
Joined: Mon Dec 06, 2004 11:13 pm
Contact:

Post 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.
sim8
Gnoblar
Posts: 9
Joined: Mon Dec 06, 2004 11:13 pm
Contact:

Post 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.
User avatar
PeterNewman
Greenskin
Posts: 128
Joined: Mon Jun 21, 2004 2:34 am
Location: Victoria, Australia
Contact:

Post by PeterNewman »

Search the forum for Axiom. Its a full port of Ogre to C#, which is known to work on .NET and Mono.
sim8
Gnoblar
Posts: 9
Joined: Mon Dec 06, 2004 11:13 pm
Contact:

Post 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.
Post Reply