FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.77k stars 408 forks source link

[MODDED] Game tries to access already deleted character #13035

Closed PanmanS closed 11 months ago

PanmanS commented 1 year ago

Disclaimers

What happened?

My modded gun has smart bullets that delete themselves after hit, but game tries to delete them too - causing error like below:

Attempted to access a potentially removed character. Character: smartround939, id: 1364, removed: True. AnimController.Collider == null
   at System.Environment.get_StackTrace()
   at Barotrauma.Character.get_SimPosition() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 1125
   at Barotrauma.Character.get_Position() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 1142
   at Barotrauma.Entity.get_WorldPosition() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Entity.cs:line 49
   at Barotrauma.StatusEffect.UpdateAllProjSpecific(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\StatusEffects\StatusEffect.cs:line 215
   at Barotrauma.StatusEffect.UpdateAll(Single deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\StatusEffects\StatusEffect.cs:line 2396
   at Barotrauma.GameScreen.Update(Double deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Screens\GameScreen.cs:line 197
   at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 859
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 651
   at Microsoft.Xna.Framework.Game.Tick() in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 500
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 93
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397
   at Microsoft.Xna.Framework.Game.Run() in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 367
   at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 58

Reproduction steps

  1. download Combat Overhaul Legacy and item assembly test_gun.zip then activate them.
  2. load in sub editor on any sub, place the item assembly and the start testing
  3. go outside of submarine with gun and fire it
  4. wait till "bullet" dies
  5. observe the issue

Bug prevalence

Happens every time I play

Single player or multiplayer?

Happens in both single player and multiplayer

-

No response

Version

v1.1.19.3 (Treacherous Tides Hotfix 2)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

Regalis11 commented 1 year ago

Thank you for the report! I'm afraid I could not reproduce the issue, I'm not getting any errors at my end. Have there been some changes to the mod that could've fixed the issue since you created the ticket?

PanmanS commented 1 year ago

Shouldnt be any changes. Try using any smart ammunition from mod (for example 40mm smart grenade). This error doesnt open console, it just appears in it.

PanmanS commented 1 year ago

rrg-85 guided grenade should be good example too (use underwater)

Regalis11 commented 1 year ago

40mm smart grenade

There does not seem to be an item with this name in the mod. Got it to happen with the guided grenade now though, thanks for the extra info!