Crash in dVector Normalize

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Crash in dVector Normalize

Postby FSA » Wed Sep 15, 2021 12:16 am

The function "Normalize" in dVectorSimd.h caused a crash in the self balancing ragdoll demo. Crash was because of zero division. I just picked up the rag doll while it was still colliding with the floor when the crash happened.

I created a video and dump file with VS2019 (Build: Release x64). Please let me know when you grabbed it and if it is enough:

Dump: https://drive.google.com/file/d/1QrDraD ... sp=sharing
Video: https://youtu.be/vtCOF6sQEvE
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Crash in dVector Normalize

Postby Julio Jerez » Wed Sep 15, 2021 9:15 am

Yes, that is ok.

It is not the normalize function error.

The active ragdoll is a state machine that cover few different states the player can be in.

The only one valid is standing in two feet.
An I am working on that.

When you lift it, the conditions to be consider standing in two feed change, he should change state, but those are not cided yet. You did not get the state change assert because you are running a release build.

So what happens is that the code is trying to do calculations in a wrong state.

As all the states are completed this should not happens.

If you want to know.

In that state the player is an a equilibrium point standing in his two feet.

Here the condition are that he can make small movement around a region, and as long as the center of mass state in that region any small movement cause it potential energy increase, So he tend to go back.

An analogy is, imagine a hill, and a beat on the apex,
The beat is the center of mass.

Any nudge will make the ball displace and it's potential energy will decrease, so it will just keep going doing.

Now imagine a small dent at the apex. Now the beat can make small displacement and as long as is does not reach the bolder of the dent, it will go back naturally.

This is what that state represents. It is the simplest state.
There it should be posible to feed an idle animation and it should play it, so that is my next step.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Crash in dVector Normalize

Postby FSA » Wed Sep 15, 2021 7:13 pm

It is not the normalize function error.

I did not really check anything and just "copied" the message from VS :D
But yes of course that function itself is not the problem.

The only one valid is standing in two feet.
An I am working on that.

OK I got why the crash happens. Next time I will run the debug version first and look for an assert and also won't report bugs about the ragdoll so fast :P
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 11 guests

cron