Newton world break due to access violation

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Newton world break due to access violation

Postby chaiein » Tue Apr 17, 2012 5:13 am

Code: Select all
 
#include "newton.h"
...
..
..
int main()
{
NewtonWorld* nWorld=NewtonCreate();
}



When My execution point reaches this place it gives me warning as access violation and break there.
How to solve this problem?
chaiein
 
Posts: 2
Joined: Tue Apr 17, 2012 4:55 am

Re: Newton world break due to access violation

Postby Julio Jerez » Tue Apr 17, 2012 6:59 am

I never saw that case.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton world break due to access violation

Postby chaiein » Tue Apr 17, 2012 7:19 am

I am using newton sdk for games developed using Irrlicht graphics Engine.
chaiein
 
Posts: 2
Joined: Tue Apr 17, 2012 4:55 am

Re: Newton world break due to access violation

Postby Julio Jerez » Tue Apr 17, 2012 7:41 am

so far I know newton created does not crash on creation.
but if is does, the engine is open source you can link to a debug library and see where is crashing.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton world break due to access violation

Postby Sweenie » Tue Apr 17, 2012 11:49 am

That is usually the first function being called. Could it be that it doesn't find the Newton.dll?
Which version are you using, 2.xx or 3.0?
Sweenie
 
Posts: 503
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Newton world break due to access violation

Postby Stucuk » Wed Apr 18, 2012 11:31 am

NewtonCreate with 2.0 (At least since 2.11) has additional parameters. So it could be that the header and DLL are not compatible. I assume that if you tried to use a NewtonCreate() which doesn't supply the needed parameters that Newton would get the 2 parameters set with whatever is currently in the memory rather than being set to nil (Thus meaning that when newton tries to use them to create/free memory it will cause an access violation).
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Newton world break due to access violation

Postby Overhertz » Wed Apr 18, 2012 3:19 pm

I believe the later newton 2, does not expect parameters. From newton 2.35:

Code: Select all
NEWTON_API NewtonWorld* NewtonCreate ();


The most likely cause is an inaccessible dll (missing or corrupt)
Ziron Programming Language
Download the Assembler HERE
User avatar
Overhertz
 
Posts: 112
Joined: Mon Jul 06, 2009 11:19 am

Re: Newton world break due to access violation

Postby Stucuk » Thu Apr 19, 2012 2:19 am

Delphi header and the Wiki are wrong then(They still have the two parameters).
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests