Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

ice block explosion causes game to crush

Open Stavichh opened this issue 3 years ago • 1 comments

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [ ] My issue happened while using mods.

What happened?

when i attached a detonator with a c-4 in it, then attached wi-fi component to an ice block, then when i wired them together set wi-fi component to channel 999 and made a link to chat, after that i swam away a bit and wrote in channel 0999 "boom" - game crushed.

Reproduction steps

1.start a single player campaign in devils ridge 2.get a mining mission 3.get to the point with cave 4.take detonator with c-4, a wire, a screwdriver, and a wi-fi component. 5.swim to an ice block in the cave 6.attach wi-fi component and the detonator to it 7.wire them together 8.set wi-fi component to any channel and set a link to chat 9.type anything in the channel of wi-fi component 10. game crushes

Bug prevalence

Just once

Version

0.18.15.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

Barotrauma Client crash report (generated on 26.07.2022 17:44:19)


Barotrauma seems to have crashed. Sorry for the inconvenience! 


A3E1BD9914304826B1774DE813786E1D


Game version 0.18.15.0 (ReleaseWindows, branch release, revision a7b22109e9)
Graphics mode: 1920x1080 (BorderlessWindowed)
VSync ON
Language: English
Selected content packages: Vanilla
Level seed: ApepBerith
Loaded submarine: Humpback (C16C277D5F38ABE7EB9BB10A861DAAC9)
Selected screen: Barotrauma.GameScreen
SteamManager initialized


System info:
    Operating system: Microsoft Windows NT 10.0.19044.0 64 bit
    GPU name: AMD Radeon RX 6600
    Display mode: {Width:1920 Height:1080 Format:Color AspectRatio:1,7777778}
    GPU status: Normal


Exception: Collection was modified after the enumerator was instantiated. (System.InvalidOperationException)
Target site: Boolean MoveNext()
Stack trace: 
   at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()
   at Barotrauma.Items.Components.Connection.SendSignal(Signal signal) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Items\Components\Signal\Connection.cs:line 281
   at Barotrauma.Item.SendSignal(Signal signal, Connection connection) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Items\Item.cs:line 2352
   at Barotrauma.Items.Components.WifiComponent.TransmitSignal(Signal signal, Boolean sentFromChat) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Items\Components\Signal\WifiComponent.cs:line 228
   at Barotrauma.CrewManager.<>c__DisplayClass231_0.<InitProjectSpecific>b__2(GUITextBox textbox, String text) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameSession\CrewManager.cs:line 164
   at Barotrauma.GUITextBox.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUITextBox.cs:line 477
   at Barotrauma.GUI.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUI.cs:line 1229
   at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 898
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
   at Microsoft.Xna.Framework.Game.Tick() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 504
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 94
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 398
   at Microsoft.Xna.Framework.Game.Run() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 368
   at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 59


Last debug messages:
[26.07.2022 16:29:59] Could not find a spawn point for a SpawnAction (spawn location: BeaconStation (tag: beacon_bandit), skipping.
[26.07.2022 16:29:53] Generating an outpost for the start of the level... (Location: Станция Apep, level type: LocationConnection)
[26.07.2022 16:29:52] Generating an outpost for the end of the level... (Location: Станция Berith, level type: LocationConnection)
[26.07.2022 16:29:47] Level identifier: ridgebasic
[26.07.2022 16:29:37] Transitioning to ApepBerith (current location: Станция Berith, selected location: Станция Apep, leaving sub: Humpback, at start: True, at end: False, transition type: LeaveLocation)
[26.07.2022 16:16:07] Unlocked mission "Clear Ruin" in the location "Станция Berith".
[26.07.2022 16:16:01] Unlocked mission "Killing Hammerheads" in the location "Станция Berith".
[26.07.2022 16:15:57] Unlocked mission "Destroy a Mudraptor nest" in the location "Станция Berith".
[26.07.2022 16:15:53] Unlocked mission "Mining titanite" in the location "Станция Berith".
[26.07.2022 16:02:14] Generating an outpost for the start of the level... (Location: Станция Berith, level type: Outpost)
[26.07.2022 16:02:14] Level identifier: outpostlevel
[26.07.2022 16:02:04] Transitioning to Berith (current location: Аванпост St. May, selected location: Станция Berith, leaving sub: Humpback, at start: False, at end: True, transition type: ProgressToNextLocation)
[26.07.2022 15:45:07] Could not find a spawn point for a SpawnAction (spawn location: BeaconStation (tag: beacon_bandit), skipping.
[26.07.2022 15:45:03] Generating an outpost for the end of the level... (Location: Станция Berith, level type: LocationConnection)
[26.07.2022 15:45:03] Generating an outpost for the start of the level... (Location: Аванпост St. May, level type: LocationConnection)
[26.07.2022 15:45:02] Level identifier: ridgebasic
[26.07.2022 15:44:52] Transitioning to St. MayBerith (current location: Аванпост St. May, selected location: Станция Berith, leaving sub: Humpback, at start: True, at end: False, transition type: LeaveLocation)
[26.07.2022 14:21:33] Generating an outpost for the start of the level... (Location: Аванпост St. May, level type: Outpost)
[26.07.2022 14:21:33] Level identifier: outpostlevel
[26.07.2022 14:21:23] Transitioning to St. May (current location: Город Dunwice, selected location: Аванпост St. May, leaving sub: Humpback, at start: False, at end: True, transition type: ProgressToNextLocation)
[26.07.2022 13:54:01] Could not find a spawn point for a SpawnAction (spawn location: BeaconStation (tag: beacon_bandit), skipping.
[26.07.2022 13:53:54] Generating an outpost for the end of the level... (Location: Аванпост St. May, level type: LocationConnection)
[26.07.2022 13:53:54] Generating an outpost for the start of the level... (Location: Город Dunwice, level type: LocationConnection)
[26.07.2022 13:53:53] Level identifier: ridgebasic
[26.07.2022 13:53:30] Attempted to access a potentially removed character. Character: мини-электрик, id: 6641, removed: True. AnimController.Collider == null
   at System.Environment.get_StackTrace()
   at Barotrauma.Character.get_SimPosition() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 970
   at Barotrauma.Character.get_Position() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 987
   at Barotrauma.Entity.get_WorldPosition() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Entity.cs:line 45
   at Barotrauma.AIObjectiveRescue.GetPriority() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveRescue.cs:line 483
   at Barotrauma.AIObjective.<>c.<SortSubObjectives>b__114_0(AIObjective so) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjective.cs:line 226
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Barotrauma.AIObjective.SortSubObjectives() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjective.cs:line 227
   at Barotrauma.HumanAIController.Reset() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\HumanAIController.cs:line 1492
   at Barotrauma.CrewManager.SelectCharacter(Character character) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameSession\CrewManager.cs:line 1249
   at Barotrauma.CrewManager.SelectPreviousCharacter() in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameSession\CrewManager.cs:line 1239
   at Barotrauma.CrewManager.UpdateProjectSpecific(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameSession\CrewManager.cs:line 1375
   at Barotrauma.CrewManager.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\GameSession\CrewManager.cs:line 331
   at Barotrauma.CampaignMode.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameSession\GameModes\CampaignMode.cs:line 375
   at Barotrauma.SinglePlayerCampaign.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameSession\GameModes\SinglePlayerCampaign.cs:line 510
   at Barotrauma.GameSession.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\GameSession\GameSession.cs:line 716
   at Barotrauma.GameScreen.Update(Double deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Screens\GameScreen.cs:line 154
   at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 874
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 651
   at Microsoft.Xna.Framework.Game.Tick() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 504
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 94
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 398
   at Microsoft.Xna.Framework.Game.Run() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 368
   at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 59
[26.07.2022 13:42:06] Could not find a spawn point for a SpawnAction (spawn location: BeaconStation (tag: beacon_bandit), skipping.
[26.07.2022 13:41:53] Generating an outpost for the end of the level... (Location: Аванпост St. May, level type: LocationConnection)
[26.07.2022 13:41:51] Generating an outpost for the start of the level... (Location: Город Dunwice, level type: LocationConnection)
[26.07.2022 13:41:51] Level identifier: ridgebasic
[26.07.2022 13:41:03] Attempting to open ALC device "OpenAL Soft on Динамики (USB PnP Sound Device)"
[26.07.2022 13:40:59] Logged in as wannasex??? (SteamID STEAM_1:1:130013340)

Stavichh avatar Jul 26 '22 11:07 Stavichh

Tested in 0.19.0.0, can confirm this causes the game to crash.

In my case, I merely used a button and a detonator (with c-4 block) against an ice block in any random cave:

image

image

appears something removes the wires (Ice block destroyed and then removes the wires via detaching or something)? in the middle of a for loop.

NilanthAnimosus avatar Jul 28 '22 12:07 NilanthAnimosus

appears something removes the wires (Ice block destroyed and then removes the wires via detaching or something)

Yep, that was it: the explosion caused the detonator to drop and the wires to get deattach. Fixed in https://github.com/Regalis11/Barotrauma-development/commit/5c46460ffbf0f0a2e8dca34e0254b47fbbbd4cf9

Regalis11 avatar Aug 16 '22 06:08 Regalis11

Tested against dev commit https://github.com/Regalis11/Barotrauma-development/commit/bb09d83d99ad00711a0eb53b06788895d76d0ec1, works correctly, closing.

Tested both multiplayer and single player, with cave ice and ice spikes in the main level's route.

In one explosion the detonator remained attached despite the ice was gone, but no crashes occurred.

NilanthAnimosus avatar Aug 22 '22 17:08 NilanthAnimosus