[x] I have searched the issue tracker to check if the issue has already been reported.
Description
The crash appears to have been due to FixtureList being null on a physics body for a removed item, crashing the game from the physics library.
I am hazarding a guess based on information below it was due to a character changing their moving direction in the same update as an items use that removed the item, triggering process remove bodies before trying to rotate the item which body (and item) had been removed.
Steps To Reproduce
Unknown, an AI was using a medical item on another AI as it simutainiously turned which it grabbed from a cabinet (Antibiotic glue)
Version
Closed Alpha 0.8.9.3
Additional information
I looked through the code and found out the following:
body is Enabled
FixtureList is only nulled in Farseer Physics World.cs ProcessRemovedBodies()
ContactList & JointList are also null supporting the above.
The AI character was changing direction during the crash
The selected item for the AI characters hand has Removed = true (HumanAnimController line 1881).
The medical items Health = 0
Callstack information from visual studio:
FarseerPhysics MonoGame.dll!FarseerPhysics.Dynamics.Body.SetTransformIgnoreContacts(ref Microsoft.Xna.Framework.Vector2 position = -505.8242 340.7642, float angle = 4.74076653) Line 804 C#
FarseerPhysics MonoGame.dll!FarseerPhysics.Dynamics.Body.SetTransform(ref Microsoft.Xna.Framework.Vector2 position = -505.8242 340.7642, float rotation = 4.74076653) Line 768 C#
FarseerPhysics MonoGame.dll!FarseerPhysics.Dynamics.Body.SetTransform(Microsoft.Xna.Framework.Vector2 position = -505.8242 340.7642, float rotation = 4.74076653) Line 784 C#
Barotrauma.exe!Barotrauma.PhysicsBody.SetTransform(Microsoft.Xna.Framework.Vector2 simPosition = -505.8242 340.7642, float rotation = 4.74076653) Line 610 C#
> Barotrauma.exe!Barotrauma.HumanoidAnimController.Flip() Line 1881 C#
Barotrauma.exe!Barotrauma.HumanoidAnimController.UpdateAnim(float deltaTime = 0.0166666675) Line 492 C#
Barotrauma.exe!Barotrauma.Character.UpdateAnimAll(float deltaTime = 0.0166666675) Line 1775 C#
Barotrauma.exe!Barotrauma.GameScreen.Update(double deltaTime = 0.016666666666666666) Line 165 C#
Barotrauma.exe!Barotrauma.GameMain.Update(Microsoft.Xna.Framework.GameTime gameTime = {Microsoft.Xna.Framework.GameTime}) Line 612 C#
[External Code]
Barotrauma.exe!Barotrauma.Program.Main() Line 46 C#
Description The crash appears to have been due to FixtureList being null on a physics body for a removed item, crashing the game from the physics library.
I am hazarding a guess based on information below it was due to a character changing their moving direction in the same update as an items use that removed the item, triggering process remove bodies before trying to rotate the item which body (and item) had been removed.
Steps To Reproduce Unknown, an AI was using a medical item on another AI as it simutainiously turned which it grabbed from a cabinet (Antibiotic glue)
Version Closed Alpha 0.8.9.3
Additional information
I looked through the code and found out the following:
Callstack information from visual studio:
Crash Location:
Red is the crashing character: