Server crash: InvalidCastException MyCharacter -> MyForageableEntity in MyForageableEnvironmentProxy

David Steven Pellew-Johansen shared this bug 37 hours ago
Need More Information

While playing on a Torch dedicated server, the server crashes during gameplay (observed during on-foot combat; shortly after killing a bot). Torch logs show an unhandled Keen exception:


System.InvalidCastException: Unable to cast object of type 'Sandbox.Game.Entities.Character.MyCharacter' to type 'Sandbox.Game.Entities.MyForageableEntity'. at Sandbox.Game.WorldEnvironment.Modules.MyForageableEnvironmentProxy.CreateForageableEntitiesData.FinishEntitiesCreation() at Sandbox.Game.WorldEnvironment.Modules.MyForageableEnvironmentProxy.FinishForageableEntities(WorkData workData) at ParallelTasks.Parallel.RunCallbacks()


This appears to be a mismatch in the forageables/environment entity pipeline (character entity being processed as forageable).

Replies (1)

photo
1

Hello David,

Thank you for reaching out on the forum.

To investigate this further, could you please send us the full server log file? This will help us confirm whether any mods, scripts, or plugins were involved at the time the issue occurred.

We would also like to know whether this happened only once, or if you are able to reproduce it consistently by following the same steps as before.

This information will help us better understand the situation and continue the investigation.

Kind regards,

Keen Software House: QA Department

Leave a Comment
 
Attach a file