Updating grid graph on Android crashes game

I am creating a simple tower defense game in Unity 5.3.5f1 with A* project 3.8.1.

I am using a grid graph to navigate between the towers. Everything works fine in the editor, but when deploying for Android, it crashes the game when I try to update the graph.

It happens when I instantiate a tower with DynamicGridObstacle or if I try to check if the instantiated tower blocks the path from entry to exit using GraphUpdateUtilities.UpdateGraphsNoBlock.

When I get the logs from the Android device, I can see the graph being scanned message and me clicking where the tower should be created and then some error messages.

I/Unity (13881): Scanning - Process took 137 ms to complete

I/Unity (13881): Tower base placement point clicked

F/libc (13881): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc0000058 in tid 13921 (UnityMain)
W/libc (13881): Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
I/libc (13881): Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
D/Process ( 701): killProcessQuiet, pid=13881
E/InputEventReceiver( 1084): Looper::removeFd(73) is failed, result(0), input channel ‘ClientState{13187cbd uid 10482 pid 13881} ©’
I/ActivityManager( 701): Recipient 13881
W/InputMethodManagerService( 701): Got RemoteException sending setActive(false) notification to pid 13881 uid 10482

If I disable DynamicGridObstacle and don’t use GraphUpdateUtilities.UpdateGraphsNoBlock then it works fine, but monsters run through my towers as the graph is not updated.

Any suggestions on how to get this to work?

Other than this, I have never had any problems with the path finding, it works amazingly well.

Best regards


Possibly this is caused by a very old Unity bug that causes android applications to crash when using the Capsule mode for collision testing.
See Graph scan crashes the app on Android
Try switching the Grid Settings -> Collision Testing -> Mode from Capsule to something else (like Sphere).
If that does turn out to be the problem, it would be really nice if you could also send a bug report to Unity so that they could get around to fixing this bug at some point.

Thanks for the very fast reply.

I tried updating A* project to 3.8.2, something I probably should have done before asking questions. That fixed the DynamicGridObstacle problem.

I tried using a sphere for collision testing and that fixed the last problem with GraphUpdateUtilities.UpdateGraphsNoBlock. Not sure how those to thinks are connected, but it worked.

Thanks for the help, A* Pathfinding Project is an amazing asset that I have never regretted spending money on. Keep up the good work.

Best regards

Great that it is working now! :slight_smile:

I’m glad you like my package.
If you want to support the project even more, a review and/or rating on the Unity Asset Store helps a lot :slight_smile:

5 star rating and review is done :slight_smile:

1 Like