createStaticBody crashes sporadically - trying debug mode

ocrim74

20-02-2007 11:10:57

Hi,

today I have two problems. One runtime problem and a building problem in debug mode.

I am using NxOgre 0.4 RC3 with PhysX 2.6.2 and Ogre1.2.4SDK.

Problem one

I have created a method to create bodies by oFusion import. I am importing hundreds of objects and on my development machine it runs perfect. On four different system sometimes it crases while creating a static body object. It happens sporadically. The names of the objects are unique. I try to handle this by using a tyr-catch block, but it does not work. The application crashes.

Here are the most important lines of code. It is not complete, but I want to show the declarations of the variables for better understanding.


try
{
const char *pszName = pMeshElem->Attribute("name");
const char *pszFileName = pMeshElem->Attribute("filename");

....

Vector3 pos;

// try to create the body
pBody = mScene->createStaticBody(pszName, pszFileName, new meshShape(pszFileName, mScene),pos);[/b]

if(pBody==0)
{
LogManager::getSingleton().logMessage("pBody == 0");
continue;
}
else if(pBody!=0)
{
LogManager::getSingleton().logMessage("pBody != 0");
LogManager::getSingleton().logMessage("pBody->mName: " + pBody->getName());
}
else
{
LogManager::getSingleton().logMessage("pBody undefined");
}


pBody = NULL;
} catch(...)
{
Ogre::String myOutput = "ERROR while creating static body";
LogManager::getSingleton().logMessage(myOutput);
pBody = NULL;
continue;

}
}


I wonder that it is running on my Notebook with a pentium M processor and not always running on other systems. Why does the try-catch block not work? Is it a known problem? Are there memory leaks?

Problem two


To solve the problem I try to build my code in debug version. I hope that I can step through the code. But I got compilation errors. I have been looking at the tutorials and tried to create the same setting like in the debug versions of the tutorials.

The building process stops because I have 107 errors.

May be someone has an idea what is missing:

1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : error C2238: unexpected token(s) preceding ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(496) : warning C4002: too many actual parameters for macro 'malloc'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(496) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(496) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(496) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(496) : error C2535: 'void *NxUserAllocator::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : see declaration of 'NxUserAllocator::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(497) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(516) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(516) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(516) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(516) : error C2535: 'void *NxUserAllocator::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : see declaration of 'NxUserAllocator::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(516) : error C2238: unexpected token(s) preceding ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(528) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(528) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(528) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(528) : error C2556: 'void NxUserAllocator::instance(void)' : overloaded function differs only by return type from 'void *NxUserAllocator::instance(void)'
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(480) : see declaration of 'NxUserAllocator::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(528) : error C2040: 'NxUserAllocator::instance' : 'void (void)' differs in levels of indirection from 'void *(void)'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxuserallocator.h(528) : error C2238: unexpected token(s) preceding ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(36) : warning C4002: too many actual parameters for macro 'malloc'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(36) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(36) : error C3254: 'NxAllocatorDefault' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(36) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(37) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(76) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(76) : error C3254: 'NxAllocatorDefault' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(76) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(76) : error C2535: 'void *NxAllocatorDefault::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(36) : see declaration of 'NxAllocatorDefault::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(77) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(88) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(88) : error C3254: 'NxAllocatorDefault' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(88) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(88) : error C2556: 'void NxAllocatorDefault::instance(void)' : overloaded function differs only by return type from 'void *NxAllocatorDefault::instance(void)'
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(36) : see declaration of 'NxAllocatorDefault::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(88) : error C2040: 'NxAllocatorDefault::instance' : 'void (void)' differs in levels of indirection from 'void *(void)'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(89) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(59) : error C2589: '::' : illegal token on right side of '::'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\foundation\include\nxallocatordefault.h(59) : error C2059: syntax error : '::'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2544: expected ')' for operator '()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2143: syntax error : missing ';' before 'Ogre::MemoryManager::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2433: 'NxAllocateable::()' : '__forceinline' not permitted on data declarations
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C3254: 'NxAllocateable' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : warning C4183: 'instance': missing return type; assumed to be a member function returning 'int'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2059: syntax error : ')'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : error C2760: syntax error : expected '{' not ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2144: syntax error : 'void' should be preceded by '}'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2544: expected ')' for operator '()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2143: syntax error : missing ';' before 'Ogre::MemoryManager::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2433: 'NxAllocateable::()' : '__forceinline' not permitted on data declarations
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2086: 'void *NxAllocateable::()' : redefinition
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C3254: 'NxAllocateable' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2535: 'int NxAllocateable::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : warning C4183: 'instance': missing return type; assumed to be a member function returning 'int'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2059: syntax error : ')'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(30) : error C2760: syntax error : expected '{' not ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2144: syntax error : 'void' should be preceded by '}'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2544: expected ')' for operator '()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2143: syntax error : missing ';' before 'Ogre::MemoryManager::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2182: '()' : illegal use of type 'void'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2433: 'NxAllocateable::()' : '__forceinline' not permitted on data declarations
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2040: 'NxAllocateable::()' : 'int' differs in levels of indirection from 'void *'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C3254: 'NxAllocateable' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2535: 'int NxAllocateable::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : warning C4183: 'instance': missing return type; assumed to be a member function returning 'int'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2059: syntax error : ')'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(31) : error C2760: syntax error : expected '{' not ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2144: syntax error : 'void' should be preceded by '}'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2544: expected ')' for operator '()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2143: syntax error : missing ';' before 'Ogre::MemoryManager::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2182: '()' : illegal use of type 'void'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2433: 'NxAllocateable::()' : '__forceinline' not permitted on data declarations
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2040: 'NxAllocateable::()' : 'int' differs in levels of indirection from 'void *'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C3254: 'NxAllocateable' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2535: 'int NxAllocateable::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : warning C4183: 'instance': missing return type; assumed to be a member function returning 'int'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2059: syntax error : ')'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(32) : error C2760: syntax error : expected '{' not ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2144: syntax error : 'void' should be preceded by '}'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2544: expected ')' for operator '()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2143: syntax error : missing ';' before 'Ogre::MemoryManager::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2433: 'NxAllocateable::()' : '__forceinline' not permitted on data declarations
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2086: 'void *NxAllocateable::()' : redefinition
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2143: syntax error : missing ';' before '.'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C3254: 'NxAllocateable' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2838: 'instance' : illegal qualified name in member declaration
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2535: 'int NxAllocateable::instance(void)' : member function already defined or declared
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : warning C4183: 'instance': missing return type; assumed to be a member function returning 'int'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2059: syntax error : ')'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(34) : error C2760: syntax error : expected '{' not ';'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(35) : error C2144: syntax error : 'void' should be preceded by '}'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(35) : error C2544: expected ')' for operator '()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(35) : error C2143: syntax error : missing ';' before 'Ogre::MemoryManager::instance'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(35) : error C2433: 'NxAllocateable::()' : '__forceinline' not permitted on data declarations
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(35) : error C2086: 'void *NxAllocateable::()' : redefinition
1> c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(29) : see declaration of 'NxAllocateable::()'
1>c:\program files\ageia technologies\ageia physx sdk\v2.6.2\sdks\physics\include\nxallocateable.h(35) : fatal error C1003: error count exceeds 100; stopping compilation

Thank you in advance,

ocrim74

betajaen

20-02-2007 11:20:21

The second problem is probably due to the memory macros Ogre have, so try adjusting the top of NxOgre_Includes.h to this:

// Include Ogre double-yay!
#include <Ogre.h>

#include <OgreNoMemoryMacros.h>
#include <NxPhysics.h>
#include "ControllerManager.h"
#include <OgreMemoryMacros.h>



Your first problem seems to indicate to me; that there is some bug with the cooking, perhaps to the processor type. But if it successfully works in Debug, then we can consider that cooking to memory may be the problem.

betajaen

20-02-2007 11:26:24

Right, looking over the Release Notes for 2.7.0, I noticed that Ageia has rewritten the triangle and convex cooking code.

Perhaps the bug was fixed in then. Obviously you can't try 2.7.0 with RC3, but check your PM.

ocrim74

20-02-2007 12:01:24

Ok, now I changed the nxOgre_includes.h and recompiled nxOgre in debug mode and then recomiled my application. There is no difference.

The code looks like this now:

// I don't like warnings, let's disable some of them.
#pragma warning( disable: 4267 )
#pragma warning( disable: 4800 )
#pragma warning( disable: 4793 )

// Include Ogre double-yay!
#include <Ogre.h>

#include <OgreNoMemoryMacros.h>
#include <NxPhysics.h>
#include "ControllerManager.h"
#include <OgreMemoryMacros.h>


// Typedef ControllerManager to NxControllerManager, Ogre has a class like this and PhysX seems to be alergic to namespaces.

typedef ::ControllerManager NxControllerManager;

// Include your preferences
#include "nxOgre_configuration.h"
#include "nxOgre_pose.h"

// DLL bits. You've gotta have DLL bits.

# if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
# if defined( NXOGRE_EXPORTS )
# define _nxOgreExport __declspec( dllexport )
# else
# define _nxOgreExport __declspec( dllimport )
# endif
# else
# define _nxOgreExport
# endif


You think that PhysX 2.7.0 could solve the problem of crashing? What do mean by PM? Project Management? It seems that problems occured since upgrading. If it solves the problem I can try it. ;-)

By the way. For my application I still do not use the tutorialapplication classes as basis. The application runs and compiles in release mode, but not in debug mode. What may be the difference? ;-)

Thanks,

ocrim74

betajaen

20-02-2007 12:12:08

Yep, I think it may be PhysX. If some of your computers the cooking works and some don't. It's worth checking out the PhysX part of it all.

Private Message, at the top of the page.