This object is in archive! 

Crash: NullReferenceException in OnEndShoot on client side on grinding an active (shooting) turret

Guest shared this bug 23 months ago
Solved

Game version: 1.200.032

A call to EndShoot is missing in MyLargeTurretBase.OnStopWorking on server side, which causes crash with NullReferenceException in MyLargeTurretBase.UpdateShooting when active (shooting) turrets are grinded. The client grinding the turret is the one crashing, nothing is logged on server side. The exception attached is for such a client.


A working fix (patch) is in MyLargeTurretBasePatch of https://github.com/viktor-ferenczi/performance-improvements


The OnStopWorkingPostfix patch method adds the missing call to EndShoot, which proved to fix the crash on a large multiplayer server.


The UpdateShootingPrefix is defensive code to prevent the NullReferenceException on client side in case the server would not have the plugin (fix) installed. You don't need this, obviously.


I cannot provide a world to reproduce the problem, since it happened only on on a large multiplayer server with many active players. In that case it happened 100% of the time a player grinded an active (shooting) turret.


We tested the fix on that populated multiplayer server. It has resolved the problem completely.


Regardless, you should be able to tell from the logic whether the fix is correct.

Replies (1)

photo
2

Hello, Viktor!


Thank you for your report. This crash should be fixed in an upcoming update 201.


Kind regards,

Keen Software House, QA Department

Replies have been locked on this page!