I recently switched my code over to using the PCZSceneManager or at least attempted to. It crashes when I call the init function. I traced it down to line 206 of OgrePCZSceneManager.cpp
I feel like I must be missing something somewhere before I'm supposed to init the SM, but I can't find an indication as to what. Any help would be appreciated.
EDIT: I neglected to put it in my post. The code there was a correct. I realized it wasn't terribly clear and people might see that and think the issue was resolved. It is not.
What platform are you on? I suspect that it may be related to your use of a string literal in the init call. Some plaforms (Mac? Linux?) seem to have a problem with string literals passed directly in... Try using an assigned String variable. This is what I use in my own project:
// We're going to use the Portal Connected Zone Manager
mSceneMgr = mRoot->createSceneManager("PCZSceneManager", "PCZSceneManager");
// initialize the scene manager using Default as default zone
String zoneTypeName = "ZoneType_Default";
((PCZSceneManager*)mSceneMgr)->init(zoneTypeName);
Thanks for the reply Chaster. I switched it to an assigned string unfortunately that didn't solve the issue. It's still crashing in the same spot. I'm using XP and VC8, by the way. I traced it to where it's crashing in PCZoneFactoryManager::createPCZone and it's this bit of code.
I'll try to get some time and track down what is going on here. I hate these kinds of bugs (works for me, not for you). If you could send me some sample code which duplicates your problem, that would probably be quite helpful.