Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Crash when trying to autodetect required content packages for a sub

Open Randomhunter30 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?

trying to auto detect required content packages in submarine editor crashed my game don't know if i did something wrong or related to my error that is popping up every time I start my game (that wrote about yesterday)

Reproduction steps

No response

Bug prevalence

Happens every time I play

Version

0.18.15.1 / 0.18.15.2 on macOS

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

Barotrauma Client crash report (generated on 2022-10-05 09:57:33)


Barotrauma seems to have crashed. Sorry for the inconvenience! 


116B6C514DB831BB68D5A8F96ACE87C4


Game version 0.18.15.1 (ReleaseWindows, branch hf, revision 91a05f31ff)
Graphics mode: 1920x1080 (BorderlessWindowed)
VSync ON
Language: English
Selected content packages: Vanilla, Room, Ladder Room, Room A, Ladder Room A, Room B, Ladder Room B, Jummper, Da Blacktoof 3.2, Emperor titan 2.0, Info Junktion, MultiCam System, Autoairlock
Level seed: no level loaded
Loaded submarine: Emperor titan 2.0 (3FDAF5AD49983C6219916C3EF07A953C)
Selected screen: Barotrauma.SubEditorScreen
SteamManager initialized


System info:
    Operating system: Microsoft Windows NT 10.0.19043.0 64 bit
    GPU name: NVIDIA GeForce GTX 860M
    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: Barotrauma.ContentPackage <CreateSaveScreen>b__127_58(Barotrauma.MapEntity)
Stack trace: 
   at Barotrauma.SubEditorScreen.<>c.<CreateSaveScreen>b__127_58(MapEntity e) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Screens\SubEditorScreen.cs:line 2767
   at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.DistinctIterator`1.MoveNext()
   at System.Linq.Enumerable.OfTypeIterator[TResult](IEnumerable source)+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable`1 source, IEqualityComparer`1 comparer)
   at Barotrauma.SubEditorScreen.<>c__DisplayClass127_0.<CreateSaveScreen>b__57(GUIButton button, Object o) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Screens\SubEditorScreen.cs:line 2767
   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 500
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 92
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397
   at Microsoft.Xna.Framework.Game.Run() in <DEV>\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


Last debug messages:
[2022-10-05 07:27:38] Failed to load "" at C:/Users/jespe/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2481067504/filelist.xml: Name is null or empty:    at Barotrauma.ContentPackage.AssertCondition(Boolean condition, String errorMsg) in G:\Repositories\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\ContentManagement\ContentPackage\ContentPackage.cs:line 185
   at Barotrauma.ContentPackage..ctor(XDocument doc, String path) in G:\Repositories\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\ContentManagement\ContentPackage\ContentPackage.cs:line 69
   at Barotrauma.RegularPackage..ctor(XDocument doc, String path) in G:\Repositories\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\ContentManagement\ContentPackage\RegularPackage.cs:line 10
   at Barotrauma.ContentPackage.TryLoad(String path) in G:\Repositories\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\ContentManagement\ContentPackage\ContentPackage.cs:line 130
[2022-10-05 07:27:37] Attempting to open ALC device "OpenAL Soft on Hörlurar på headset (HyperX Virtual Surround Sound)"
[2022-10-05 07:27:33] Logged in as RandomHunter (SteamID STEAM_1:0:15108423)

Randomhunter30 avatar Oct 05 '22 08:10 Randomhunter30

Thank you for the report!

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/41177a02bb362fc95a563b0aaa31ee0d92a41fb5 (commit in our private repo). I think the underlying issue here is that old submarine mod you mentioned in https://github.com/Regalis11/Barotrauma/issues/9975: specifically, the name of the mod isn't defined in the filelist.xml file. It should be possible to fix this by editing that file, and adding something like name="The Name Of Your Sub" on the second line:

<contentpackage name="The Name Of Your Sub'" steamworkshopid="2860698170" corepackage="false"...

Regalis11 avatar Oct 05 '22 17:10 Regalis11

Tested, throws a error now instead of causing a crash, working correctly. Closing.

Rokvach avatar Oct 14 '22 07:10 Rokvach