A* Pathfinding Project

Error after upgrading: Caught exception while deserializing data


#1

Hey guys,

We’ve just purchased the latest version of the Pathfinding Projects and upgraded our files. It all seemed to go smoothly, but once we build out the game this error appears;


"Caught exception while deserializing data.
System.Exception: No graph of type ‘Pathfinding.LayerGridGraph’ could be created, type does not exist
at Pathfinding.Serialization.GraphMeta.GetGraphType (Int32 index, System.Type[] availableGraphTypes) [0x00076] in C:\Users\Suisieg\Documents\desync_project\DESYNC_2016_PROJECT\Assets\AstarPathfindingProject\Core\Serialization\JsonSerializer.cs:875
at Pathfinding.Serialization.AstarSerializer.DeserializeGraph (Int32 zipIndex, Int32 graphIndex, System.Type[] availableGraphTypes) [0x00009] in C:\Users\Suisieg\Documents\desync_project\DESYNC_2016_PROJECT\Assets\AstarPathfindingProject\Core\Serialization\JsonSerializer.cs:551
at Pathfinding.Serialization.AstarSerializer.DeserializeGraphs (System.Type[] availableGraphTypes) [0x0002c] in C:\Users\Suisieg\Documents\desync_project\DESYNC_2016_PROJECT\Assets\AstarPathfindingProject\Core\Serialization\JsonSerializer.cs:592
at Pathfinding.AstarData.DeserializeGraphsPartAdditive (Pathfinding.Serialization.AstarSerializer sr) [0x00049] in C:\Users\Suisieg\Documents\desync_project\DESYNC_2016_PROJECT\Assets\AstarPathfindingProject\Core\AstarData.cs:397
at Pathfinding.AstarData.DeserializeGraphsAdditive (System.Byte[] bytes) [0x00027] in C:\Users\Suisieg\Documents\desync_project\DESYNC_2016_PROJECT\Assets\AstarPathfindingProject\Core\AstarData.cs:368 "


The steps we took to upgrade were;

  • Deleted all pathfinding relevant files from the project
  • Reimported the new version
  • Everything worked fine in editor, levels working fine, node generation fine, enemies working fine

I’ve checked the Astar Path objects in the scenes and they all seem fine.

Do you have any idea what this error is or how to look into it?

Thanks!


#2

Also, worth noting - building your Layered Grid Graph example scene causes the same issue


#3

Our Unity version is: 2017.2.3f1


#4

Hi

Are you using any bytecode stripping in your project?
It’s possible that that is causing some problems. You can try reducing it.

I have a fix for it in the beta version, but it hasn’t reached the stable version yet.


#5

Hey mate - thanks for the reply, we’d really love to work this out

Sorry but no, we’re not using bytecode stripping as far as we can tell - and don’t even know what that would be

Do you have any other suggestions for this error? Anything that might need refreshing after importing a new version?

Our previous version was 3.8.1, which was now upgraded to 4.2.8


#6

Stripping level exists in the player settings

You could always enable the option under A* Inspector -> Optimizations -> ASTAR_FAST_NO_EXCEPTIONS. This will hard code a few things to reduce reflection usage, among other things the graph types. It’s a bit hacky, but it should work.