AstarUpdateChecker NullReference in package

  • A* version: [5.3.6]
  • Unity version: [6000.0.44f1]

Hi, I’m making use of the Astar Pathfinding Project, and it started throwing nullreferences when I start my game scene up. at line 200:

“&hasNavmesh=” + (script != null && script.data.graphs.Any(g => g.GetType().Name == “NavMeshGraph”) ? 1 : 0) +

As for the easy solution being to put a “return” statement at the start of the update check, this doesn’t work in my scenario where we use the package manager approach (e.g. reference to this package, instead of having the package embedded into our project). I’d prefer to keep it this way, but as far as I see there is no way to actually disable the update checker itself?

Managed to add a temporary workaround by setting the “last check performed” date to 99 days in the future :v

Odd for that line to be throwing that in the first place from what I’m reading. Is this a new install of Astar? Fresh project? Existing project, etc?

Best I know, no there isn’t. Checked and didn’t see anything in the docs about it-- honestly I think your ‘temporary’ workaround is a good way to handle this. But I’d say we get to the bottom of why it’s throwing exceptions anyways.

It’s an existing project, with Astar being in it for about two weeks without any issues.

Regardless of when I start the game scene directly, or go through the main menu scene first, it will start throwing that exception endlessly because g is null in “script.data.graphs.Any(g => g”. As far as I can see, I only have one AstarPath script, with a single Recast Graph defined in it.

Because it throws an exception, it fails that code path execution, and will seemingly retry endlessly, resulting in quite quickly 1000+ logs.

If I can provide any more information, I’ll gladly do that! Debugging is hard without being able to reproduce the issue :v

Thanks.
This is a veeery old bug, but it hasn’t been triggered until recently due to a minor change in another part of the system. I’ll include a fix in the next update.

Until then, you can work around the issue by saving your graphs as a file, deleting your AstarPath component (optionally copying the settings), creating a new AstarPath component, and loading your graphs back in.

1 Like

Happy to hear it’s an easy fix! Thanks for the quick responses.