Compound collision problems after upgrading to newer build

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Wed Jun 05, 2019 11:22 am

I am let it run using vs 2013 in multi thread just liek you are doing.
I can let the log going for so long the file is huge. but so far I can't make this happend
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Wed Jun 05, 2019 1:28 pm

let us take a step back, this seem to start when I added
this #define DG_FIX_CONVEX_BUG

can you sync and go the begin of the file and comment out that define. let us see if that remove the bug. then we know is the last new code.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Wed Jun 05, 2019 11:17 pm

I let it running all day and when I came back the crash does happens. Now I will add soem test code so that I can reproduce it because this is was just a test run to see if It can be reproduced.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Wed Jun 05, 2019 11:27 pm

ok I found it, I am fixing it.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Wed Jun 05, 2019 11:49 pm

ok I think I found and fix it, I will let is run over night, to make sure is fixed.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby JernejL » Thu Jun 06, 2019 4:33 am

So far very good!! no crash after a few hours of testing, what was causing it?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Compound collision problems after upgrading to newer bui

Postby JernejL » Thu Jun 06, 2019 6:24 am

I said it too soon. Crashes in beamclipping function again:

Code: Select all
Unhandled exception at 0x546D19C8 (newton.dll) in TDC.exe: 0xC00002B5:  Multiple floating point traps (parameters: 0x00000000, 0x00009D33).


on line 286 - "edge = edge.Normalize();"

Code: Select all
>   newton.dll!dgCollisionConvexPolygon::BeamClipping(origin={...}, dist=0.000000000, parentMesh=0x17436200) Line 286   C++
    newton.dll!dgCollisionConvexPolygon::CalculateContactToConvexHullDescrete(world=0x17436060, parentMesh=0x17436200, proxy={...}) Line 743   C++
    newton.dll!dgWorld::CalculatePolySoupToHullContactsDescrete(proxy={...}) Line 2518   C++
    newton.dll!dgWorld::CalculateConvexToNonConvexContacts(proxy={...}) Line 2404   C++
    newton.dll!dgWorld::ConvexContacts(pair=0x1743fd9c, proxy={...}) Line 1770   C++
    newton.dll!dgWorld::CalculateContacts(pair=0x1743fd9c, threadIndex=0, ccdMode=false, intersectionTestOnly=false) Line 1900   C++
    newton.dll!dgBroadPhase::CalculatePairContacts(pair=0x1743fd9c, threadID=0) Line 1086   C++
    newton.dll!dgBroadPhase::AddPair(contact=0x146dc720, timestep, threadIndex=0) Line 1135   C++
    newton.dll!dgBroadPhase::UpdateRigidBodyContacts(descriptor=0x13f5fe18, nodePtr=0x1a5b8ea0, timeStep=6.33289843e-025, threadID=0) Line 1580   C++
    newton.dll!dgBroadPhase::UpdateRigidBodyContactKernel(context=0x13f5fe18, node=0x1539b500, threadID=0) Line 1507   C++
    newton.dll!dgThreadHive::dgWorkerThread::ConcurrentWork(threadId=1415870941) Line 242   C++
    newton.dll!dgThreadHive::dgWorkerThread::Execute(threadId=0) Line 260   C++
    newton.dll!dgThread::dgThreadSystemCallback(threadData=0x14ef2ba4) Line 166   C++
    newton.dll!std::_LaunchPad<std::_Bind<1,void *,void * (__cdecl*const)(void *),dgThread *> >::_Go() Line 187   C++
    newton.dll!_callthreadstartex() Line 376   C
    newton.dll!_threadstartex(ptd) Line 354   C
    kernel32.dll!@BaseThreadInitThunk@12()   Unknown
    ntdll.dll!__RtlUserThreadStart()   Unknown
    ntdll.dll!__RtlUserThreadStart@8()   Unknown



I will enable log and recompile.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Thu Jun 06, 2019 7:04 am

I wasn't fixed yet. now it is.
please sync and try again.
The bug happened because is possible that the result of a clipped face was a edge of a point, and the funtion was not dealing with those cases. because they will be reject later on, however the newer optimization for edge handling only assumed well formed conve polygon, so and edge or a point will make fail in the normalization. even produce logic bug on very small edges.
it is fixed now. I let it run over nigh and is still going thsi morning.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby JernejL » Thu Jun 06, 2019 7:28 am

Crash doesn't happen but now a assert is triggered in BeamClipping:

Code: Select all
Debug Assertion Failed!

Program: J:\AppBuilder\Delfi\Top Down City\Game\Libraries\Newton.dll
File: ..\..\dgPhysics\dgCollisionConvexPolygon.cpp
Line: 285

Expression: edge.DotProduct(edge).GetScalar() > dgFloat32(0.0f)


Assert is here:
Image

Call stack:

Code: Select all
    newton.dll!dgCollisionConvexPolygon::BeamClipping(origin={...}, dist=0.343024731, parentMesh=0x1850cfa0) Line 285   C++
    newton.dll!dgCollisionConvexPolygon::CalculateContactToConvexHullDescrete(world=0x14bbc120, parentMesh=0x1850cfa0, proxy={...}) Line 743   C++
>   newton.dll!dgWorld::CalculatePolySoupToHullContactsDescrete(proxy={...}) Line 2517   C++
    newton.dll!dgWorld::CalculateConvexToNonConvexContacts(proxy={...}) Line 2404   C++
    newton.dll!dgWorld::ConvexContacts(pair=0x1850fbdc, proxy={...}) Line 1770   C++
    newton.dll!dgWorld::CalculateContacts(pair=0x1850fbdc, threadIndex=1, ccdMode=false, intersectionTestOnly=false) Line 1892   C++
    newton.dll!dgBroadPhase::CalculatePairContacts(pair=0x1850fbdc, threadID=1) Line 1086   C++
    newton.dll!dgBroadPhase::AddPair(contact=0x14cf74c0, timestep=0.0166666675, threadIndex=1) Line 1135   C++
    newton.dll!dgBroadPhase::UpdateRigidBodyContacts(descriptor=0x1402fd90, nodePtr=0x15140580, timeStep=0.0166666675, threadID=1) Line 1580   C++
    newton.dll!dgBroadPhase::UpdateRigidBodyContactKernel(context=0x1402fd90, node=0x15140580, threadID=1) Line 1507   C++
    newton.dll!dgThreadHive::dgWorkerThread::RunNextJobInQueue(threadId=1) Line 224   C++
    newton.dll!dgThreadHive::dgWorkerThread::ConcurrentWork(threadId=1) Line 243   C++
    newton.dll!dgThreadHive::dgWorkerThread::Execute(threadId=1) Line 260   C++
    newton.dll!dgThread::dgThreadSystemCallback(threadData=0x14d0321c) Line 165   C++
    newton.dll!std::_Bind<1,void *,void * (__cdecl*const)(void *),dgThread *>::_Do_call<,0>(_Myfargs={...}, __formal={...}) Line 1149   C++
    newton.dll!std::_Bind<1,void *,void * (__cdecl*const)(void *),dgThread *>::operator()<>() Line 1138   C++
    newton.dll!std::_LaunchPad<std::_Bind<1,void *,void * (__cdecl*const)(void *),dgThread *> >::_Run(_Ln=0x01f4f3ec) Line 196   C++
    newton.dll!std::_LaunchPad<std::_Bind<1,void *,void * (__cdecl*const)(void *),dgThread *> >::_Go() Line 187   C++
    newton.dll!_Call_func(_Data=0x01f4f3ec) Line 28   C++
    newton.dll!_callthreadstartex() Line 376   C
    newton.dll!_threadstartex(ptd=0x1498a8d8) Line 359   C
    kernel32.dll!@BaseThreadInitThunk@12()   Unknown
    ntdll.dll!__RtlUserThreadStart()   Unknown
    ntdll.dll!__RtlUserThreadStart@8()   Unknown

Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Thu Jun 06, 2019 7:52 am

that should not be possible, contact out is teh output buffer that has no changed in years.
I take this happen in debug, because is an assert.
I will let it run to see if I get it.

do I have to do anythong other than let is play?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby JernejL » Thu Jun 06, 2019 8:06 am

I uploaded a new build of the game, release build seems ok (so far), only in debug mode i got that assert.

https://we.tl/t-bh6CUJh9Io

I have moved all dlls to Libraries folder (they are all dynamicly linked), so to test, put your dll in there now.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Thu Jun 06, 2019 9:50 am

ok downloaded the last demo, no sound on this one,
I am running it and so far no assert.
I will let is go while I go to work. Is some special I need to do to make it happens?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby JernejL » Thu Jun 06, 2019 12:27 pm

it happens even if you just leave it running, but not in background as it pauses - if you click start server it will not go to pause so there is that
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Compound collision problems after upgrading to newer bui

Postby Julio Jerez » Thu Jun 06, 2019 1:08 pm

yes I noticed the action stop after a while when I let it run, I guess I was lucking I have it braking on the assert before.

I will click the server button tonight if it no assert happens, I am still so confuse as to while that assert happens when the pointer is the destination points for the joint to place the contacts calculate by the collision routine. I know I will not happens in release but a null pointe should generate a memory violation exception.
can you try comment opu the assert in debug and see if is crashes in the next loop? until I run with the serve option?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound collision problems after upgrading to newer bui

Postby JernejL » Fri Jun 07, 2019 2:11 am

Looks like i made a some kind of bug related to audio system, it is also the reason why game starts to be slow after a while - i will try to fix this.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests