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 409 forks source link

Attaching a shuttle to outposts/ruins crashes the game #9465

Closed ubertpendragon closed 1 year ago

ubertpendragon commented 2 years ago

Disclaimers

What happened?

Attaching a shuttle to outposts/ruins crashes the game

Reproduction steps

Use the mod: Ruins Enhanced.zip

Generate a level with Ruins in it If it tries generating the Alien_ShuttleEntranceN module the game will crash I isolated the module in that mod so it always generates it

image

Relevant error messages and crash reports

Barotrauma Client crash report (generated on 26-Jun-22 19:15:33)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

A382F735B43D8E3FAD0FC906B3E782B4

Game version 0.18.12.0 (ReleaseWindows, branch release, revision 85532fbcbc)
Graphics mode: 1920x1080 (BorderlessWindowed)
VSync ON
Language: English
Selected content packages: Vanilla, Ruins Enhanced
Level seed: 07QzR6vp
Loaded submarine: None
Selected screen: Barotrauma.LevelEditorScreen
SteamManager initialized

System info:
    Operating system: Microsoft Windows NT 10.0.19043.0 64 bit
    GPU name: NVIDIA GeForce GTX 1060 6GB
    Display mode: {Width:1920 Height:1080 Format:Color AspectRatio:1.7777778}
    GPU status: Normal

Exception: ID 65531 is taken by Barotrauma.Submarine (Ruinsshuttle, 2510) (System.Exception)
Target site: Void .ctor(Barotrauma.Submarine, UInt16)
Stack trace: 
   at Barotrauma.Entity..ctor(Submarine submarine, UInt16 id) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Entity.cs:line 122
   at Barotrauma.Submarine..ctor(SubmarineInfo info, Boolean showWarningMessages, Func`2 loadEntities, IdRemap linkedRemap) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Submarine.cs:line 1304
   at Barotrauma.OutpostGenerator.Generate(OutpostGenerationParams generationParams, LocationType locationType, Location location, Boolean onlyEntrance, Boolean allowInvalidOutpost) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Outposts\OutpostGenerator.cs:line 216
   at Barotrauma.RuinGeneration.Ruin.Generate(Level level, LocationType locationType, Point position, Boolean mirror) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Levels\Ruins\RuinGenerator.cs:line 40
   at Barotrauma.Level.GenerateRuin(Point ruinPos, Boolean mirror) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Levels\Level.cs:line 2015
   at Barotrauma.Level.Generate(Boolean mirror, Location startLocation, Location endLocation) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Levels\Level.cs:line 1097
   at Barotrauma.Level.Generate(LevelData levelData, Boolean mirror, Location startLocation, Location endLocation, SubmarineInfo startOutpost, SubmarineInfo endOutpost) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Map\Levels\Level.cs:line 444
   at Barotrauma.LevelEditorScreen.<.ctor>b__26_12(GUIButton btn, Object obj) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Screens\LevelEditorScreen.cs:line 223
   at Barotrauma.GUIButton.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIButton.cs:line 263
   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-Jun-22 19:15:33] Creating hulls between docking ports failed. Could not find a hull next to the docking port.
[26-Jun-22 19:15:26] Level identifier: coldcavernstutorial
[26-Jun-22 19:15:01] leveleditor
[26-Jun-22 19:13:40] Hash calculation for content package "EK | Dockyard" didn't match expected hash (059D749F62C8CCEE88FC5B9101130BD8 != F2DC874DC596C9F056A0326EA8EF077E)
[26-Jun-22 19:13:38] Attempting to open ALC device "OpenAL Soft on Headset Earphone (HyperX 7.1 Audio)"
[26-Jun-22 19:13:37] Logged in as hUbert (SteamID STEAM_1:0:17500415)
Regalis11 commented 1 year ago

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/edf89d350b15e2cc09c1ccb04d88a3d702541027

Fixed crashing when trying to generate an outpost/ruin that contains linked submarines. Happened when generating a suitable layout failed (which tends to happen often if you just add a shuttle to a random ruin module, without setting up the generation parameters in a way that places the shuttle somewhere where there's room for it) - we didn't remove the linked sub before trying to generate a new outpost, leading to an ID overlap.

Rokvach commented 1 year ago

Tested, working correctly. Closing.

Regalis11 commented 1 year ago

Reopening, doesn't seem to be working correctly. The game no longer crashes, but the shuttle doesn't spawn either.

ubertpendragon commented 1 year ago

image

image

image

ubertpendragon commented 1 year ago

The shuttle spawns now.

Problem: It shows up on sonar, and in the abyss rather than their docking location image

The shuttle spawned somewhere near the X origin of the level and started sinking image

Pictured sinking (the tiny dot in the middle): image

I'll try making an outpost module with shuttle and report on that

Regalis11 commented 1 year ago

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/0eedc19013444b081d956c5b17280884b8f45547

giists commented 1 year ago

Couldn't find any issues, closing.