NewtonCreateConvexHull crash

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 3:06 pm

I've juste updated the source via github and didn't changed anything but newton libs and dll.
Now I get a crash in NewtonCreateConvexHull. Callstack:
Code: Select all
    newton_d.dll!dgConvexHull3d::TessellateTriangle(int level, const dgVector & p0, const dgVector & p1, const dgVector & p2, int & count, dgBigVector * const ouput, int & start)  Line 533 + 0xf bytes   C++
    newton_d.dll!dgConvexHull3d::TessellateTriangle(int level, const dgVector & p0, const dgVector & p1, const dgVector & p2, int & count, dgBigVector * const ouput, int & start)  Line 521   C++
    newton_d.dll!dgConvexHull3d::BuildNormalList(dgBigVector * const normalArray)  Line 649   C++
    newton_d.dll!dgConvexHull3d::InitVertexArray(dgHullVertex * const points, const double * const vertexCloud, int strideInBytes, int count, void * const memoryPool, int maxMemSize)  Line 382 + 0x34 bytes   C++
    newton_d.dll!dgConvexHull3d::BuildHull(const double * const vertexCloud, int strideInBytes, int count, double distTol, int maxVertexCount)  Line 190 + 0x3a bytes   C++
    newton_d.dll!dgConvexHull3d::dgConvexHull3d(dgMemoryAllocator * const allocator, const double * const vertexCloud, int strideInBytes, int count, double distTol, int maxVertexCount)  Line 172   C++
    newton_d.dll!dgCollisionConvexHull::Create(int count, int strideInBytes, const float * const vertexArray, float tolerance)  Line 344 + 0x5c bytes   C++
    newton_d.dll!dgCollisionConvexHull::BuildHull(int count, int strideInBytes, float tolerance, const float * const vertexArray)  Line 145   C++
    newton_d.dll!dgCollisionConvexHull::dgCollisionConvexHull(dgMemoryAllocator * const allocator, unsigned int signature, int count, int strideInBytes, float tolerance, const float * const vertexArray)  Line 75   C++
    newton_d.dll!dgWorld::CreateConvexHull(int count, const float * const vertexArray, int strideInBytes, float tolerance, int shapeID, const dgMatrix & offsetMatrix)  Line 212 + 0x4d bytes   C++
    newton_d.dll!NewtonCreateConvexHull(const NewtonWorld * const newtonWorld, int count, const float * const vertexCloud, int strideInBytes, float tolerance, int shapeID, const float * const offsetMatrix)  Line 2549   C++
    NoxetEngineD.dll!NoxetEngine::ConvexHullCollision::ConvexHullCollision(NoxetEngine::PhysicWorld * const pWorld, NoxetEngine::Model * const pModel, const float & fResolution, const int & iShapeID)  Line 14 + 0x4f bytes   C++
    NoxetEngineD.dll!NoxetEngine::ObjectHandler::LoadModel(const NoxetEngine::NObjectHandler::EntityConfiguration * const config, bool & _return)  Line 273 + 0x3b bytes   C++
>   NoxetEngineD.dll!NoxetEngine::ObjectHandler::RegisterEntity(NoxetEngine::NObjectHandler::EntityRegistrationData * const registration)  Line 342 + 0x13 bytes   C++
    Editor.exe!AddOnObjectHandler::LoadEntities_(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & filename)  Line 354 + 0x1e bytes   C++
    Editor.exe!RenderWindow::InitObjectHandler()  Line 325 + 0x4d bytes   C++
    Editor.exe!NXEApp::OnInit()  Line 142   C++
    Editor.exe!wxAppConsoleBase::CallOnInit()  Line 93 + 0x32 bytes   C++
    Editor.exe!wxEntryReal(int & argc, wchar_t * * argv)  Line 479 + 0x1d bytes   C++
    Editor.exe!wxEntry(int & argc, wchar_t * * argv)  Line 188 + 0xd bytes   C++
    Editor.exe!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, HINSTANCE__ * __formal, int nCmdShow)  Line 415 + 0x10 bytes   C++
    Editor.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow)  Line 8 + 0x31 bytes   C++
    Editor.exe!__tmainCRTStartup()  Line 528 + 0x15 bytes   C
    Editor.exe!WinMainCRTStartup()  Line 377   C
    kernel32.dll!7606919f()    
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]   
    ntdll.dll!77aea22b()    
    ntdll.dll!77aea201()    


And also a crash in NewtonBodySetCollisionScale again but I cant start my application now because of the ConvexHull crash.
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 3:57 pm

was it ever working with the same data?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 4:13 pm

Yes I didn't change anthing. Just updated newton.
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 4:22 pm

there area where you show the crash is impossible to happens.
are you getting the code form GitHub?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 4:32 pm

Yes I did. Man thats strange.
By the error NewtonTreeCollisionEndBuild I get the following output:
Run-Time Check Failure #2 - Stack around the variable 'polyhedra' was corrupted.

I always think that this sort of error is my fault, but I didn't change any code. :o
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby pHySiQuE » Sat Sep 13, 2014 4:39 pm

Clean and rebuild your project.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 4:40 pm

It is unlike that it will break in so many place at once.
are you reading serialized data? that did changed and will make it crash.

can you make a small test so that I can debug it?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 4:48 pm

@physique: Did it. No help :(

No I do not read serialized data. OK so now I'm 100% sure this is not my fault. I started an exe that just builds a tree collision but put old DLL's in. This works. Then I rebuild an only overwrite the DLL's and it crashes. I'll made a demo in the next minutes...
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 5:01 pm

There you go. This program just loads a model and build a tree collision.
https://www.dropbox.com/s/r1h46fxiadjf1 ... h.zip?dl=0
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 5:13 pm

I get this error
Creating graphics module

Create D3D Device with IDXGIFactory 1.1
ERROR: Call D3D11CreateDevice throws error Unknown Description: n/a (direct3dmanager.cpp, Line 201, function NoxetEngine::Direct3DManager::BuildDeviceAndDeviceContext)

The window say d3d11 fail to initialize

I installed d3d 11 on my system, Is there something I have to do.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 5:26 pm

Normally this should work just fine.
Please download this version and tell me the value of HRESULT in the console that pops up.

https://www.dropbox.com/s/3hs7a51doj0wh ... p.zip?dl=0

It should look like this:
Code: Select all
NoxetEngine Terminal
Versions
Engine version: 200
Renderer version: 1
Shader version: 1



Init NoxetEngine
Creating engine modules

Creating engine device...

--------------------------------------------------------


  Creating graphics module

Create D3D Device with IDXGIFactory 1.1
HRESULT: 0
  ------------------------------------------------------
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 5:32 pm

--------------------------------------------------------


Creating graphics module

Create D3D Device with IDXGIFactory 1.1
HRESULT: -2005270483
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateConvexHull crash

Postby FSA » Sat Sep 13, 2014 5:47 pm

Okay this is a mismatch in DirectX Debug things. A bit hard to say why this happens.
Try this link: https://www.dropbox.com/s/r1h46fxiadjf1 ... h.zip?dl=0
If it doesn't work, it semms that you need to install the Windows 8.1 SDK:
http://msdn.microsoft.com/en-us/windows ... 62891.aspx

Give me a short answer if it works or not. :)
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 6:00 pm

ok I am installing windows8.1 sdk first, see if that fix it.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateConvexHull crash

Postby Julio Jerez » Sat Sep 13, 2014 6:28 pm

Ok after I install window8.1 sdk it does no crash in d3d anymore.

Now when I run the original demo is crash very bad, however when I copy the newton_d.dll in place of the one you have, it does not crash anymore.

The demo does no make a conve hull, instead it make a collision tree. But it build it jus fine.

The demo crash on exit by that's because you delete the newton world before you destroy the newton assets.
you call NewtonDestroy, and the you call DestroyCollision, but the work in no valid.

other that that, I do no know why that dll you have crash, the one in source control seem right.
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 0 guests

cron