access violations, assertions, memory leaks

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

access violations, assertions, memory leaks

Postby sova » Mon Mar 05, 2012 9:12 am

Hello! I compiled a simple example from
http://newtondynamics.com/wiki/index.ph ... _C_example

with MSVC 2008 Express and MSVC 2010 Pro

... and get "Debug Assertion Failed"

Code: Select all
void dgWorld::DestroyAllBodies()
...
  _ASSERTE(dgBodyCollisionList::GetCount() == 0); // <--- here


Preprocessor definitions are _NEWTON_USE_LIB;_WIN_32_VER;_SCALAR_ARITHMETIC_ONLY

Newton versions: 2.31, 2.35, latest from svn

What is wrong?
sova
 
Posts: 23
Joined: Mon Mar 05, 2012 8:58 am

Re: access violations, assertions, memory leaks

Postby Julio Jerez » Mon Mar 05, 2012 9:36 am

Code: Select all
NewtonWorld*   const   world   =   NewtonCreate();

NewtonCollision*   const   collision   =   NewtonCreateBox(world, 10, 10, 10, 0, NULL);
NewtonBody*   const   body   =   NewtonCreateBody(world, collision, initialTM);
// you forget this
NewtonReleaseCollision(world, collision)
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: access violations, assertions, memory leaks

Postby sova » Wed Mar 07, 2012 10:47 am

thank you for your help.
sova
 
Posts: 23
Joined: Mon Mar 05, 2012 8:58 am


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 13 guests

cron