Night Elf
30-08-2007 21:10:39
I'm having a strange problem when creating an instance of World. I followed the constructor step by step and I could see the following execution:
I create a World with passing no parameters to the constructor, so it takes the default ones:
The constructor of World looks like this:
The default value for driverParams is a string, so this takes us to the followind constructor:
Inside process(), the last line calls parse(pm), so we end up in the PhysXDriverParams::parse() method:
The definition of NxUnderConstruction is
The weird thing is that the first time I do new World, the code executes NxUnderConstruction without throwing any exception and continues to work as if nothing happened...
When I delete the world instance (when I exit the game to the main menu) and then create it again (starting a new game), the code reaches that line and now it does trigger an exception.
I can't make sense of what's happening. Any help, please?
I create a World with passing no parameters to the constructor, so it takes the default ones:
g_nxWorld = new NxOgre::World;
The constructor of World looks like this:
World::World(PhysXDriverParams driverParams) { ...etc... }
The default value for driverParams is a string, so this takes us to the followind constructor:
PhysXDriverParams(const char* p){process(p);}
Inside process(), the last line calls parse(pm), so we end up in the PhysXDriverParams::parse() method:
void PhysXDriverParams::parse(Parameters P) {
NxUnderConstruction;
...etc...
}
The definition of NxUnderConstruction is
#define NxDebug(a) NxThrow(a, 3, __FUNCTION__, __LINE__);
#define NxUnderConstruction NxDebug("This function called contains no or little code.");
The weird thing is that the first time I do new World, the code executes NxUnderConstruction without throwing any exception and continues to work as if nothing happened...
When I delete the world instance (when I exit the game to the main menu) and then create it again (starting a new game), the code reaches that line and now it does trigger an exception.
I can't make sense of what's happening. Any help, please?