Crash Unity

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Crash Unity

Postby Sweenie » Mon Oct 29, 2018 11:13 am

Update the plugin and test again.
I found some odd code in dNewtonBody.cpp that might have been the reason. At first glance it shouldn't be the cause of the crash but i haven't managed to get a crash on my stresstest after I remove that code and as soon as I add it back it starts crashing again.
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Crash Unity

Postby pysnoo » Tue Nov 06, 2018 7:19 am

Hey,

I updated the plugin (it works) and the SDK. However, I still have some issues with the latest version of the SDK. See below for crash report. You can find a captured gif here. As you can see the vehicle explodes.
Thanks for your reply.

Code: Select all
========== OUTPUTING STACK TRACE ==================

0x00007FFB0F989E0C (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F98A5E4 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F9A5541 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F8C2D64 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F8F093C (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F99A4FB (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F8EDAAC (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB8342B (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F8EAD4E (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F905FE5 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F90AF9C (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0F90C501 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB8B156 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB89ED6 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB8AC55 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB8A8DD (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB8A889 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB1709C (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB0FB16C43 (NewtonWrapper) CSharp_dNewtonJointBallAndSocket_SWIGUpcast
0x00007FFB86A13034 (KERNEL32) BaseThreadInitThunk
0x00007FFB888B1431 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby Sweenie » Tue Nov 06, 2018 9:01 am

Hmm, it's difficult to figure out what's going on based on the gif and the callstack.
That callstack is weird by the way since it only list CSharp_dNewtonJointBallAndSocket_SWIGUpcast over and over. I assume the BallandSocket joint isn't even used in that scene.

Can you reproduce the crash in a simpler scene and send a download link?
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Crash Unity

Postby pysnoo » Tue Nov 06, 2018 11:21 am

Yes, indeed, I don't use BallAndSocket in that scene.
I uploaded an archive with a simplier project :
https://we.tl/t-BACB0lDxRF

You can initialize Newton Dynamics by clicking the button in Initializer object inspector (at runtime to handle the crash).
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby Sweenie » Wed Nov 07, 2018 4:50 am

Odd, I'm not getting the error you display in the gif but get this assert
Code: Select all
dgAssert (dgAbs(relCentr) < dgFloat32 (1.0e-3f));

which happens during SubmitContraints for the HingeActuator(the mast).

I fetched the latest Newton code and recompiled both Newton and the Unityplugin.
After that the assert doesn't happen anymore but I get an assert about an invalid inertia value.
I tracked it down to the NewtonBody component for the "Translateur_default_sabot" which had a zero value for it's Izz inertia.
Try updating Newton and the plugin and add a nonzero value for the inertia of the "Translateur" and see if that works.
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Crash Unity

Postby pysnoo » Wed Nov 07, 2018 5:31 am

I'll update the plugin, thanks.
Then, I'll test asap.

Keep in touch :)

[EDIT] Did you push your changes in your repo ?
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby Sweenie » Wed Nov 07, 2018 5:49 am

I didn't make any changes to the plugin.
I downloaded(git pulled) the lastest Newton SDK and recompiled the SDK and the Plugin.
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Crash Unity

Postby pysnoo » Wed Nov 07, 2018 5:51 am

So did I. I'm testing.

[EDIT] It seems to work with the crash test project. Trying with the real one.
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby pysnoo » Thu Nov 08, 2018 7:31 am

Code: Select all
dgAssert (dgAbs(relCentr) < dgFloat32 (1.0e-3f));


I still have this assert. I changed all my Ixx, Iyy, Izz from 0 to 1 for each body.
It occurs when the vehicle is colliding with an significant velocity.

However, it works with crash test project :|
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby Julio Jerez » Thu Nov 08, 2018 7:51 am

why done you use the function that set the inertia to the proper shape?
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Crash Unity

Postby Julio Jerez » Thu Nov 08, 2018 7:54 am

are you making a driving vehicle app?

in the next few days I will get the special vehicle module, that I have high hope for it and that we will add to the unity plug in.

can you use something like tgat
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Crash Unity

Postby Sweenie » Thu Nov 08, 2018 9:01 am

Julio Jerez wrote:are you making a driving vehicle app?

in the next few days I will get the special vehicle module, that I have high hope for it and that we will add to the unity plug in.

can you use something like tgat


Forklift simulation.

Are you a colleague of Blackbird(Mr. Lemerle)? I saw his name in the gif animation.
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Crash Unity

Postby pysnoo » Thu Nov 08, 2018 9:21 am

As Sweenie said, we're working on a forklift simulation.
Yes, I am.

[EDIT] With the latest version of newton-dynamics, I can't control my NewtonSliderActuator - SOLVED
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby pysnoo » Fri Nov 09, 2018 7:39 am

Julio Jerez wrote:why done you use the function that set the inertia to the proper shape?


How can I set the inertia properly ?
pysnoo
 
Posts: 24
Joined: Mon Oct 08, 2018 9:08 am

Re: Crash Unity

Postby Sweenie » Fri Nov 09, 2018 7:54 am

Just tick the checkbox "Calc inertia" on the body.
That will ignore any manually entered inertia values and calculate them based on colliders and mass.
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

PreviousNext

Return to Bugs and Fixes

Who is online

Users browsing this forum: Lax and 11 guests