A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by dehseth » Thu Dec 24, 2009 7:34 am
I am trying to create a box in newton using irrlicht engine but it crashes
Any idea what's happening
- Code: Select all
NewtonWorld* nWorld = NewtonCreate();
float min[3];
float max[3];
min[0] = -200.0;
min[1] = -100.0;
min[2] = -200.0;
max[0] = 200.0;
max[1] = 100.0;
max[2] = 200.0;
NewtonSetWorldSize(nWorld, &min[0], &max[0]);
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]);
NewtonBody* bodyFloor = NewtonCreateBody(nWorld, collFloor);
NewtonReleaseCollision(nWorld, collFloor);
I also tried to pass NULL value to last matrix parameter but still it crashes

-
dehseth
-
- Posts: 14
- Joined: Mon Dec 21, 2009 6:32 am
by Stucuk » Thu Dec 24, 2009 1:44 pm
Ignore This Post. (Delete Me)
Last edited by
Stucuk on Thu Dec 24, 2009 5:45 pm, edited 1 time in total.
-

Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by Julio Jerez » Thu Dec 24, 2009 2:25 pm
That sould no crash, try the lastest version 2.15
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by dehseth » Fri Dec 25, 2009 2:20 am
Ok I have tried the same code at home (with a different computer) it did not crash!
What can I do to work it in this computer? Any ideas?
-
dehseth
-
- Posts: 14
- Joined: Mon Dec 21, 2009 6:32 am
by dehseth » Fri Dec 25, 2009 5:49 am
Well it only crashes in Visual C Express Edition. If I use Visual Stıdio IDE the same code won't crash. And also compiled exe file does not crash, so it has smt to do with Express edition debugger.
-
dehseth
-
- Posts: 14
- Joined: Mon Dec 21, 2009 6:32 am
by dehseth » Fri Dec 25, 2009 6:51 am
News flash: it crashes on visual studio too

Any idea why

Complied exe works fine but seems like visual studio debugger makes it crash... I tried Newton 2.15 and 2.14 result came up same.
Any idea

-
dehseth
-
- Posts: 14
- Joined: Mon Dec 21, 2009 6:32 am
by dehseth » Fri Dec 25, 2009 8:53 am
Ok I have solved the problem...
This is what one should do in case of an error like I got:
1. Open Options->Properties
2. Select Debugging tab
3. Select Debugger Type = MixedNow it works

-
dehseth
-
- Posts: 14
- Joined: Mon Dec 21, 2009 6:32 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests