OgreOde compile problems

liu3xing3long

22-01-2009 17:16:17

i have installed ogre1.6final and i have downloaded ode0.10.0 and the latest ogreode .i do as you say http://www.ogre3d.org/wiki/index.php/Compile_OgreOde as someone else says ,what is wrriten there has something wrong.i can not comment visitRenderables,if i do ,compile will be ok,but if i run the app, it will crash saying the ESB problem.
then i have to overwrite this method where inherite from OgreMovableObject(body,debugcontact),that is fine.compiling is ok.
but when i run the demo,it crashes.
i wonder if you can do a test.Maybe it is the ode's problem.i run three demos with ogreode.simplescene works,but when i press key to add something into the scene it crashes on onexit.h,the other two demos i just can't run them.the landscape demo says "ODE INTERNAL ERROR1" "depthSamples>=2"failed in...i know maybe it is ode errors,but how to solve it and why.

dermont

23-01-2009 04:24:29

For ogreode you shouldn't be changing the Ogre source code whatever version of Ogre you are using. The wiki entry for "visitRenderables" is clearly wrong.

Make sure your using the latest trunk version of ogreode it's already patched for Ogre1.6 and visitRenderables:
http://ogreaddons.svn.sourceforge.net/v ... nk/ogreode

liu3xing3long

23-01-2009 16:48:27

so i do as you say.then compiling is ok.but when i run it.crash occures.
i run simplescene demo,when i add a sphere in the scene,it just appears a dialog saying
it is very strange,sometimes i run it ,it is just an assert saying songthing wrong in sphere.cpp,but mostly it is OgreOdeDemo_SimpleScenes.exe 中的 0x7c812aeb 处未处理的异常: Microsoft C++ 异常: 内存位置 0x0012e314 处的 std::bad_alloc。
i am going to die.thanks to anyone who helps me

liu3xing3long

23-01-2009 18:15:33

so i finally test it .in debug mode it is stable ,allways throw bad_alloc exception when i insert an object in the scene(in demo simple scene) .i run into it crashes from void registerItem(T* ptr)
{
assert(ptr->getID());
_map[ptr->getID()] = ptr;
_list.push_back (ptr);
}
it crashes from the second line when using stl map;

Pryo

07-09-2009 16:47:42

I am having the same problem. Did you ever manage to find out what was causing this?

I have fiddled with a whole range of things to try to get OgreOde to work at all without success. I am just making stabs in the dark. I wish I had some clue of how to fix this.

Pryo

07-09-2009 18:37:37

SOLVED

...my own problem at least. I've spent about 9 hours checking, rechecking, recompiling, shuffling files around etc, but kept missing a stupid mistake I made right at the start.

I wanted to have everything running with double precision so have been defining "dDOUBLE" for each project, and linked ode_doubled.lib after compiling ode with the configuration DebugDoubleDLL.

The one mistake I made that appears to have caused all my runtime errors is that I had "dSINGLE" defined for the ode project. I decided to try recompiling everything in single precision instead and OgreOde is now working.

So my advice to others is:

1) Make sure you consistently define either "dSINGLE" or "dDOUBLE" for all projects that will use ode (including ode itself).
2) Select a configuration for ode that corresponds to your choice of dSINGLE or dDOUBLE. E.g. I am currently using DebugSingleDLL for dSINGLE.
3) In the OgreOde_Core project, make sure you link to the lib file that corresponds to your choice of dSINGLE or dDOUBLE - E.g. either ode_single.lib or ode_singled.lib for dSINGLE. There should only be one choice available anyway if you only compile ode with one particular configuration.