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.72k stars 400 forks source link

Object reference not set (System.NullReferenceException) / Void AddExtraMissions #10661

Closed Krzeszny closed 1 year ago

Krzeszny commented 1 year ago

Disclaimers

What happened?

My game crashed on round end. AFAIK nobody else crashed at that time.

When I was outside of the submarine, the host chose the next location on the world map, if that's of any relevance.

Reproduction steps

unknown

Bug prevalence

Just once

Version

0.19.14.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 12/03/2022 21:12:37)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

7CB1A1D8EDB459DBB8FE6B7A40525156

Game version 0.19.14.0 (ReleaseWindows, branch master, revision c624ec6568)
Graphics mode: 1920x1080 (Fullscreen)
VSync OFF
Language: English
Selected content packages: Vanilla, BaroTraumatic Nightmare, Improved Husks, Barotraumatic Creature Pack, Lua For Barotrauma, CsForBarotrauma, AVP-Aliens, Neurotrauma, Neurotrauma Cybernetics, NT Pharmacy, Enhanced Armaments, Enhanced Armaments Neurotrauma Patch, Visual Variety Pack, ADV Beacon Stations, Beacons Extended, EK | Dockyard, EK | Gunnery, Alarms Extended, Custom Fins and Decals (New custom letters added), Submarine Weapon Sound Makeover, Stations from beyond, Movable and Sellable Wrecks, New Wrecks For Barotrauma (With sellable wrecks), Spoon's Pirate Vessels Expanded, Avali Posters, MoreMissionsMod, Dont Open Debug Console On Errors, BaroCraftables, Acolyte Job, BetterFabricatorUI, No Role Balance v2, BetterHealthUI
Level seed: YasaPhoenix Linea
Loaded submarine: Lucifer (72EC8E70DF927973488714547E0857D2)
Selected screen: Barotrauma.RoundSummaryScreen
SteamManager initialized
Client (Round hadn't been started)

System info:
    Operating system: Microsoft Windows NT 10.0.19045.0 64 bit
    GPU name: Radeon RX 580 Series
    Display mode: {Width:1920 Height:1080 Format:Color AspectRatio:1.7777778}
    GPU status: Normal

Exception: Object reference not set to an instance of an object. (System.NullReferenceException)
Target site: Void AddExtraMissions(Barotrauma.LevelData)
Stack trace: 
   at Barotrauma.CampaignMode.AddExtraMissions(LevelData levelData)
   at Barotrauma.GameSession.InitializeLevel(Level level)
   at Barotrauma.GameSession.StartRound(LevelData levelData, Boolean mirrorLevel, SubmarineInfo startOutpost, SubmarineInfo endOutpost)
   at Barotrauma.CampaignMode.<>c__DisplayClass32_0.<<SelectSummaryScreen>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Barotrauma.GameMain.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
   at Microsoft.Xna.Framework.Game.Tick() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 500
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 92
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397
   at Microsoft.Xna.Framework.Game.Run() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 367
   at Barotrauma.Program.Main(String[] args)

Last debug messages:
[12/03/2022 21:12:33] Generating an outpost for the end of the level... (Location: Phoenix Linea Prospecting Outpost, level type: LocationConnection)
[12/03/2022 21:12:32] Generating an outpost for the start of the level... (Location: Dank Fortification, level type: LocationConnection)
[12/03/2022 21:12:27] Level identifier: plateaubasic

[12/03/2022 21:01:10] Received invalid SetAttackTarget message. Target entity not found (ID 0)
[12/03/2022 21:01:10] Received invalid SetAttackTarget message. Target entity not found (ID 0)
[12/03/2022 21:01:10] Received invalid SetAttackTarget message. Target entity not found (ID 0)
[12/03/2022 21:01:10] Received invalid SetAttackTarget message. Target entity not found (ID 0)
[12/03/2022 21:01:10] Received invalid SetAttackTarget message. Target entity not found (ID 0)

[12/03/2022 20:56:22] Failed to load sound file "C:/Users/krzes/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2831987252/Characters/Clowns/ClownSuicide/beep.ogg" (file not found). {Sound file "C:/Users/krzes/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2831987252/Characters/Clowns/ClownSuicide/beep.ogg" doesn't exist!}
   at Barotrauma.Sounds.SoundManager.LoadSound(String filename, Boolean stream)
   at Barotrauma.RoundSound.Load(ContentXElement element, Boolean stream)
[12/03/2022 20:56:21] Failed to load sound file "C:/Users/krzes/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2831987252/Characters/Clowns/ClownSuicide/beep.ogg" (file not found). {Sound file "C:/Users/krzes/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2831987252/Characters/Clowns/ClownSuicide/beep.ogg" doesn't exist!}
   at Barotrauma.Sounds.SoundManager.LoadSound(String filename, Boolean stream)
   at Barotrauma.RoundSound.Load(ContentXElement element, Boolean stream)
Regalis11 commented 1 year ago

Thank you for the report!

Unfortunately the crash report is missing the line numbers for some reason, which makes it hard to pinpoint where exactly this exception was thrown from. I added some extra null checks and more descriptive error messages in https://github.com/Regalis11/Barotrauma-development/commit/f30712fae2b51633fb445aea6a90b6ccd829823d to help diagnose this.

Rokvach commented 1 year ago

This crash hasn't appeared in GA for a while now. I'd say we've somehow fixed it. Closing.