cpuDispatcher unhandled exeption

I have this function and I always got unhandled exeption on dispatcher create. Am I forgot about something?

void BoxApp::BuildPhysics()
gFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback,

	PxProfileZoneManager* profileZoneManager = &PxProfileZoneManager::createProfileZoneManager(gFoundation);

	gPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *gFoundation, PxTolerancesScale(),true,profileZoneManager);
	PxSceneDesc sceneDesc(gPhysics->getTolerancesScale());
	sceneDesc.gravity = PxVec3(0.0f, -9.81f, 0.0f);

	<b>gDispatcher = PxDefaultCpuDispatcherCreate(2);</b>
	sceneDesc.cpuDispatcher	= gDispatcher;
	sceneDesc.filterShader	= PxDefaultSimulationFilterShader;
	gScene = gPhysics->createScene(sceneDesc);

	gMaterial = gPhysics->createMaterial(0.5f, 0.5f, 0.6f);
	PxRigidStatic* groundPlane = PxCreatePlane(*gPhysics, PxPlane(0,1,0,0), *gMaterial);

Same problem with:

PxRigidDynamic* dynamic = PxCreateDynamic(*gPhysics, PxTransform(PxVec3(0,40,100)), PxSphereGeometry(10), *gMaterial, 10.0f);

I expect that is something wrong with gPhysics

My god sorry, I forgot about libs, i run release on CHECKED.

What is the exception? Does it have a useful message or error code?
What happens if you specify 0 threads instead of 2?
What happens if you say gDispatcher = new Ext::DefaultCpuDispatcher(2);?
Have you tried stepping through the physx source to determine exactly where the error occurs?

Thanks for reply but I wrote that I resolved this problem -I forgot about libs, I run release on CHECKED and preprocessor command NDEBUG crash application. Topic to close