Multiple GraphUpdates issue on XboxOne

Hi

@Skalev mentioned that it was also being triggered on the PC build. Are you seeing that as well?
(I do not have an Xbox 1, so I cannot test it on one)

Unfortunately not.

Everything is working fine on PC and PS4, only the X1 version is giving us a hard time, and by hard time I mean the game crashes to home after like 30 sec of gameplay.

Can you at least have a look a the project. May be you can spot something we are doing wrong or may be some checks we can add so the multithreading is “safer” even if it means it will take more time.

Thanks again.

Laurent

Hi

I tested your project, however I cannot find anything wrong. I get no exceptions when I run it.
One thing you could try is to add a check in the PointNode.AddConnections method

if (node == null)
    throw new System.Exception ("!!");

and see if that triggers anything.

Hi

Was this ever fully resolved? We are currently using version 3.8.8.1 and occasionally get game crashes with call stacks that match the previous posts. I have set astar threads to none. We are using recast graph and RVO controllers. RVO simulator threads also set to none still can crash our game. When pathfinding is disabled, no crashes occur. This occurs on our Xbox One builds only.

Our game pre-generates recast graphs for a number of room scenes and serializes it in memory. Then deserializes as the player transitions between rooms.

Thanks,
Andrew

Hi

I am not sure. I don’t have an Xbox myself, so I have not been able to test it.
I cannot recall any other users mentioning that it doesn’t work since that post however (I might be wrong though).

Do you think you could post the exact code that you use and the exact stack trace?

A few other things to try:

  • Enable the ASTAR_NO_POOLING option under the ‘Optimizations’ tab. This will increase allocations, but may uncover some rare bug.
  • After each call to seeker.StartPath or AstarPath.StartPath, add a call to AstarPath.WaitForPath(pathObject). This will cause paths to be calculated immediately.
  • Have you checked the log to make sure that this exception was the first error? There might be another exception further up.
  • Would it be possible for you to upgrade to 3.8.10 (available here: https://www.arongranberg.com/astar/download). There is one fix in particular which might be relevant for you if you deserialize and serialize a lot of graphs. If not I could share the diff with you as it is just one line of code.

Hi Aron,

Thanks for the response. I’m currently in progress of testing out your suggestions.
As for upgrading, we are too far along in our project to risk upgrading the whole project, but the diff change would be great if you could post it here or PM what and where to me.

Thanks!
-Andrew

Hi

Ok. Here are all the diffs from 3.8.6 to 3.8.10: https://send.firefox.com/download/c828f3cbb3/#WmWEaVt9cWPCuszXzWdbWg
Here is the single diff that I mentioned above: https://pastebin.com/WNdEy52W
Essentially you just need to add a single ‘break’ in the AstarData.cs file.

Hey Aron! Just wanted to update. I tried all your suggestions and enabling the ASTAR_NO_POOLING define made our crash bug stop happening. Thanks for all your help in resolving this issue.

-Andrew

Huh. Ok.
Glad that it helped, though it seems that should have been caused by some script not using pooling correctly…