[BUG] Infinite loop in trajectory simulation

Amoo

New member
I got a reply from Andrew to this issue in another thread, but I am moving it here since it is a separate issue so it doesn't get buried.

Basically, when I use the trajectory simulation on a grenade, I often but inconsistently get stuck in infinite loops, causing my game to studder for about a half second and produce stack overflow exceptions.

The trajectory simulation is getting stuck in an infinite loop for some reason. Not exactly sure what could be causing this. Can you try reproducing this with the demo frag grenade and copying over your grenade's values?

I haven't been able to reproduce it using the demo scene yet because the demo scene has 999+ errors on a fresh install in a brand new project, and constantly spits out so many errors that I am having trouble finding my one error in a haystack of endless errors. But I'm still trying.
 

Attachments

  • Unity_Zg26yLkfhD.png
    Unity_Zg26yLkfhD.png
    216.7 KB · Views: 5
  • Unity_4YhEwMPvmN.png
    Unity_4YhEwMPvmN.png
    41.9 KB · Views: 5
I take back being unable to reproduce it in a fresh project, I just reproduced it on my second attempt. This is a fresh install of UCC on a blank project in Unity 2019.4.4f1 3D template, using your own demo scene with no modifications except starting with grenades in the Inventory script.
 

Attachments

  • Unity_ejnw60viMf.png
    Unity_ejnw60viMf.png
    183.8 KB · Views: 3
From the demo scene how can I reproduce it? You added the grenade to the default loadout?
 
Yes, all I did was add frag grenades to the default loadout. Then to get stuck in the infinite loop and end up with a stack overflow exception, just hold right click and look around the room without throwing the grenade. It isn't immediate but it's also not super rare, but that's all you have to do.
 
Unfortunately I'm unable to reproduce this in the demo scene... which version of UCC are you using?
 
I'm using UCC version 2.2.4, published the 12th of July 2020. I'm pretty sure this is the latest version.

Again, it doesn't happen right away, but it usually takes me only about 2-3 tries and about 1-2 minutes per try before I can reproduce it.
 
Are you able to reproduce it within the demo scene? Can you take a video of where you are throwing it?
 
Hi, I had same or similar problem. TrajectoryObject.cs line 669 generated the stack overflow. I am sure my throwable items had correct
collider attached, but it seems that m_Collider variable wasn't properly initiated (or I had problem with something else), but after I deleted the collider and also TrajectoryObject script under all my throwable items and recreated them surprisingly it works... I have no clear idea what happened, don't really like these kind of miracles, but now it works properly. If I find out what happed I will post it.
 
Top