Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help!)

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help!)

Postby joepaddyroe » Wed Feb 16, 2011 8:11 am

Hi, this is my first post and I hope I have posted in the right section!?

I am technically a 3d artist/animator but I like to dabble in code from time to time, mainly to show off my 3d stuff!

I hav just started using irrlicht and I have been going well.

I tried to include some Newton and I have scowered the net for differnet tutorials, all of which I tried have failed!

I have tried Newton 2.21,2.28 and 2.30 and all have given me the same results.

The error tends to come post compile, when the program starts to run:

Eg. Unhandled exception at 0x10003fe9 in NewtonIrrlicht1.exe: 0xC0000005: Access violation reading location 0x00000000.

This happens at this line: body1 = NewtonCreateBody(nWorld,NewtonCreateBox(nWorld,1,1,1,0,NULL)) ;

Other similar exceptions have been thrown, usually when creating something like NewtonCreateBody() or NewtonCreateBox()

I have included paths to the right directories and I have set the path to Newton.

I am using windows 7 Ultimate N, VS 2008 Express and Irrlicht 1.7.2.

Any help would be much appreciated!
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am


Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby Julio Jerez » Wed Feb 16, 2011 8:58 am

download SDK 2.31 from google source, it has the source code and you can see where teh crash happens
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby ledahut » Wed Feb 16, 2011 9:12 am

Yes use visual studio+debug with code source.
But its look like your pointer nWorld point to 0x00000000.
ledahut
 
Posts: 98
Joined: Mon Jun 21, 2010 8:03 am
Location: France

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby joepaddyroe » Wed Feb 16, 2011 10:00 am

Hi and thanks for all your quick replies!

I downloaded 2.31 from the google area, set my include directory to the new directory and now when I open tutorial 101, I set it to startup project and try to compile.

I get this message: File not found - dJointLibrary_d.dll

Do i need to add some other include or what else?

Thanks!
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby Overhertz » Wed Feb 16, 2011 10:08 am

hi joepaddyroe,

there is another dll "dJointLibrary_d.dll" which you should place in the same directory as newton.dll
Ziron Programming Language
Download the Assembler HERE
User avatar
Overhertz
 
Posts: 112
Joined: Mon Jul 06, 2009 11:19 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby joepaddyroe » Wed Feb 16, 2011 11:06 am

Hi Overhertz,

I'm looking through the 2.31 folder and I can seem to find dJointLibrary_d.dll

Should I use the one from 2.30? And if so which folder shou;d I take it from: lib_vs9_md or lib_vs9_mt

Thanks
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby joepaddyroe » Wed Feb 16, 2011 11:34 am

Ok, so I've managed to fix that issue(dJointLibrary_d.dll)

Embarassing as it is, I hadn't set my path variable correctly.

It now points to 2.30\sdk\x32\lib_vs9_mt which contains dJointLibrary_d.dll

Is this wrong?

Anyway, the program compiles and it first complained about not having sdl.dll and newton.dll etc so I copied these into the out directory with the final .exe

The program now starts, tutorial 101 that is, but an exception is thrown:

Unhandled exception at 0x00403834 in Tutorial_101_GettingStarted.exe: 0xC0000005: Access violation writing location 0x00000000.

This is triggered by this code:

void GetWorkingFileName (const char* name, char* outPathName)
{
char path[256];
GetModuleFileNameA(NULL, path, 256);

char* ptr = strstr (path, "bin");
ptr [0] = 0; /////////THIS LINE HERE!!!!!!!!!!!!!
sprintf (outPathName, "%sbin/%s", path, name);
}

In this file: OpenGlUtil.cpp

I've obviously done something stupid, but I'm also too ignorant to know what!

Any Help?
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby Julio Jerez » Wed Feb 16, 2011 11:43 am

joepaddyroe
I did not have time to fix the totorial projects,
There are all fix now (excep the raycas car whi is broken, I will fix that afte I finish wi the updates)

I check tht in is SVN, if you download the SVN you will ge the new project with relative path, no longer enviroment variable will be needed

after I finish everything including the QT frontend for the demos, I will put another version of SDK 2.32

sorry about the missing path.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby joepaddyroe » Wed Feb 16, 2011 11:57 am

Hi Julio,

Thanks for the answer, but the only problem I have now is hat because I am so inexperienced, I'm not sure where to start.

Could you point me to a very basic tutorial or something that will test to see if I have everything setup right?

My problem is that I'm not sure if it's my code or any code or if it's the setup in my IDE?

Does the SVN release have all of the dll's and stuff?

Thanks
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby Julio Jerez » Wed Feb 16, 2011 12:22 pm

The svn does not have teh binaries, but they build with no errors
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby joepaddyroe » Wed Feb 16, 2011 12:57 pm

Hey All.

Thanks for your help, I have the tutorials compiling now.

My problem was that I wasn't specifying the right output folder, in my case Debug.

No the next step, irrlicht integration!

I don't suppose anyone could point me in the right direction?

Cheers!
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby ledahut » Thu Feb 17, 2011 4:51 am

I don't suppose anyone could point me in the right direction?

what do you want?
ledahut
 
Posts: 98
Joined: Mon Jun 21, 2010 8:03 am
Location: France

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby joepaddyroe » Thu Feb 17, 2011 8:35 am

Hi ledahut,

sorry my last messag should have read, Now rather than No.

What I'm looking for is a newer tutorial that takes all of the newer changes in Newton into account.

For example, I have run into this issue now:

g_newtonmapbody = NewtonCreateBody(nWorld, g_newtonmap, NULL);

Throws this exception:

Unhandled exception at 0x10003fe9 in Irrlicht1.exe: 0xC0000005: Access violation reading location 0x00000000.

g_newtonmapbody is registered at 0x00000000

I'm not sure what goes in the 3rd input of NewtonCreateBody()

Can it be NULL?

Every example I have seen to date shows NEwtonCreateBody taking just 2 variables.

Thanks!
joepaddyroe
 
Posts: 16
Joined: Wed Feb 16, 2011 7:54 am

Re: Irrlicht 1.7.2 and Newton 2.XX (Complete NOOB needs help

Postby Julio Jerez » Thu Feb 17, 2011 8:40 am

g_newtonmapbody = NewtonCreateBody(nWorld, g_newtonmap, NULL);

last argument is the matrix, and can not be NULL, you can set it to and identity matrix

that is a change that is important for 3.0 and to make
3.00 and 2.00 compatible I promotyed back to 2.00 so that I can use the same demos.

basically in 3.00 the BroadPhase is the same Scene collision tree of 2.00
and it need to know the location of the node at insertion time.
whiel is teh mutigrid teh body was just added to teh root node.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests