Issue with Plugin_Octree and Plugin_Cg

Kerion

09-01-2008 18:14:46

So I am having some strange issues with these plugins, and I think they may be MOGRE related, so here goes.

First off, I am trying to use the OctreeSceneManager, using the follow blurb of code:


m_Root.LoadPlugin ("Plugin_OctreeSceneManager");

... // init root and such

m_SceneMgr = m_Root.CreateSceneManager ("OctreeSceneManager");


I get an SEHException on that last line, and my OGRE log reads:
12:05:18: OGRE EXCEPTION(5:ItemIdentityException): No factory found for scene manager of type 'OctreeSceneManager' in SceneManagerEnumerator::createSceneManager at ..\src\OgreSceneManagerEnumerator.cpp (line 181)

Hmm, well that's strange, because earlier in the log we have:
12:05:18: Loading library Plugin_OctreeSceneManager
12:05:18: Installing plugin: Octree & Terrain Scene Manager
12:05:18: Plugin successfully installed

So the plugin was installed, but the scene manager factories weren't installed? That seems very odd.

In addition, if I use the generic scene manager and get past this, I am getting a memory corruption crash whenever a Cg program is loaded. It happens with the call:


ResourceGroupManager.Singleton.AddResourceLocation (Path.Combine (Environment.CurrentDirectory, "Data\\MangoCore.zip"), "Zip", "Kernel");
ResourceGroupManager.Singleton.AddResourceLocation (Path.Combine (Environment.CurrentDirectory, "Data\\ET"), "FileSystem", "ET");

ResourceGroupManager.Singleton.InitialiseAllResourceGroups();


The exception is a System.AccessViolationException, and the OGRE log doesn't give much help:

12:10:51: Added resource location 'D:\Code\Mango\Bin\Debug\Data\ET' of type 'FileSystem' to resource group 'ET'
12:10:51: Parsing scripts for resource group ET
12:10:51: Parsing script ETShader.program

That's it, it crashes at that point, with no errors in the log. I suspect it has something to do with the Cg 2.0 move, but oddly enough lilljohan's MET seems to work just fine using the same binaries (I am in fact using that wrapper in this program).

Kerion

09-01-2008 18:31:02

Okay, I figured out the Cg crash. Because of the way my program starts up, there is some wierdness going on where I have to create a dummy render window, just to give OGRE something to work with (even though in reality the user may not see an actual render window for quite some time, depending on user input). I was trying to initialize the resource groups before I had setup this dummy render window, so it was crashing.

Still can't figure out why the OctreeSceneManager plugin isn't registering itself by name though.

Marioko

09-01-2008 18:37:36

nice, try find in OGRE forums about plugin issue.

Remenber, MOGRE is a one-to-one layer wrapper, a 99% of the bugs are because OGRE stuff. :D keep that in mind