(SOLVED?)Plugin working fine in OGRE, crashing in MOGRE.


20-05-2008 11:10:19

I am creating my own SceneManager. I extends class SceneManager and when I test it with Ogre it is working fine. As tutorial I used Plugin OctreeSceneManager.

But using mogre I get few issues.
1. I had to implement DLLMain function. Without it, it crashed probably(or I am sure) on LoadLibrary api function. In ogre log:
System Error: The specified procedure could not be found.

in DynLib::load at c:\proyectos\mogre\ogrenew\ogremain\src\ogredynlib.cpp (line 80)
After implementing DLLMain it is ok.

2. I extend class SceneManager and I did implement just constructor destructor and getTypeName method. When I tried to use my manager in Ogre it is everything ok. In mogre I got this:
Debug Error!

Program: ...
Module: ...005\Projects\mogre\example1\example1\bin\Debug\OgreMain_d.dll
File: c:\proyectos\mogre\ogrenew\ogremain\src\ogrescenemanagerenumerator.cpp
Line: 186

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

I can see the problem is on calling virtual method _setDestinationRenderSystem and the problem is about calling convention.
I tried to override that method but with same problem.

I am using VS 2005 Team Suite and for creating base of dll I used dll wizard in VS.

Thanks for help.



20-05-2008 17:33:21

Are you compiling your plugin with the modified Ogre sources from Mogre?


21-05-2008 09:44:05

Are you compiling your plugin with the modified Ogre sources from Mogre?

Yes, it is with sources from Mogre.


21-05-2008 16:49:17

After hours of recompiling whole ogre and mogre (many times), it is now working. Unfortunatelly I dont know why it didn't work and where was the problem.


21-05-2008 19:12:53

nice, maybe you forget do somenthing compiling MOGRe...