Irrlict - Newton - Debugger Crash!

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dehseth
Posts: 130
Joined: Wed Dec 09, 2009 11:05 am
Contact:

Irrlict - Newton - Debugger Crash!

Post by dehseth »

I got a piece of code which works at home but crashes at work:

Unhandled exception at 0x00431400 in Newtond.exe: 0xC0000005: Access violation reading location 0x08dd7a00.


Here is the code:

Code: Select all

NewtonWorld* nWorld = NewtonCreate();

	float min[3];
	float max[3];
	min[0] = -2000.0;
	min[1] = -1000.0;
	min[2] = -2000.0;
	max[0] = 2000.0;
	max[1] = 1000.0;
	max[2] = 2000.0;
	NewtonSetWorldSize(nWorld, &min[0], &max[0]);

	int i = NewtonMaterialGetDefaultGroupID(nWorld);
	NewtonMaterialSetDefaultFriction   (nWorld, i, i, 0.8f, 0.4f);
	NewtonMaterialSetDefaultElasticity (nWorld, i, i, 0.3f);
	NewtonMaterialSetDefaultSoftness   (nWorld, i, i, 0.05f);

	float matrix[4][4];
	matrix[0][0] = 1;
	matrix[0][1] = 0;
	matrix[0][2] = 0;
	matrix[0][3] = 0;
	matrix[1][0] = 0;
	matrix[1][1] = 1;
	matrix[1][2] = 0;
	matrix[1][3] = 0;
	matrix[2][0] = 0;
	matrix[2][1] = 0;
	matrix[2][2] = 1;
	matrix[2][3] = 0;
	matrix[3][0] = 0;
	matrix[3][1] = 0;
	matrix[3][2] = 0;
	matrix[3][3] = 1;

	NewtonCollision* collFloor = NewtonCreateBox(nWorld, 2, 3, 2, 10, &matrix[0][0]);
It crashes at NewtonCreateBox function. And strange thing is if I open compiled exe it does not crash! I guess it has smt to do with debugger.. Any idea why?
dehseth
Posts: 130
Joined: Wed Dec 09, 2009 11:05 am
Contact:

Post by dehseth »

Problem solved... I changed Debugger Type To Mix type and now I don't get any crash :!:
Post Reply