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.76k stars 406 forks source link

[Unstable 0.1500.2.0] Crash when reload sprite or reset to prefab in sub-editor. #6625

Closed zhu-rengong closed 3 years ago

zhu-rengong commented 3 years ago

Description Crash when reload sprite or reset to prefab in sub-editor.

Crash Report:

Barotrauma Client crash report (generated on 2021-09-10 下午 05:46:16)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

868D239D92CFC0C3AE75EFD9C74DC78E

Game version 0.1500.2.0 (UnstableWindows, branch dev, revision 12c1bd4373)
Graphics mode: 1366x768 (Windowed)
VSync ON
Language: Simplified Chinese
Selected content packages: Vanilla 0.9
Level seed: no level loaded
Loaded submarine: Unnamed ()
Selected screen: Barotrauma.SubEditorScreen
SteamManager initialized

System info:
    Operating system: Microsoft Windows NT 10.0.19042.0 64 bit
    GPU name: Intel(R) UHD Graphics 620
    Display mode: {Width:1920 Height:1080 Format:Color AspectRatio:1.7777778}
    GPU status: Normal

Exception: The path is empty. (Parameter 'path') (System.ArgumentException)
Target site: System.String GetRelativePath(System.String, System.String, System.StringComparison)
Stack trace: 
   at System.IO.Path.GetRelativePath(String relativeTo, String path, StringComparison comparisonType)
   at System.IO.Path.GetRelativePath(String relativeTo, String path)
   at Barotrauma.XMLExtensions.ParseContentPathFromUri(XObject element) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Serialization\XMLExtensions.cs:line 16
   at Barotrauma.Sprite.ReloadXML() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Sprite\Sprite.cs:line 257
   at Barotrauma.Structure.<CreateEditingHUD>b__11_6(GUIButton button, Object data) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Map\Structure.cs:line 155
   at Barotrauma.GUIButton.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIButton.cs:line 262
   at Barotrauma.GUIComponent.UpdateAuto(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIComponent.cs:line 459
   at Barotrauma.GUI.<>c__DisplayClass158_0.<Update>b__0(GUIComponent c) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUI.cs:line 1246
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Barotrauma.GUI.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUI.cs:line 1246
   at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 1002
   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:
[2021-09-10 下午 05:45:05] (Msg) SDR RelayNetworkStatus:  avail=OK  config=OK  anyrelay=OK   (OK)
[2021-09-10 下午 05:45:05] (Msg) Ping location: hkg=36+3,sgp=70+7/66+3,tyo1=72+7,tyo=/72+7,maa=467+46/98+3,bom=450+45/115+3,dxb=151+15/141+3,syd=166+16/153+13,sea=179+17,iad=/247+17,fra=278+27/250+23,gru=403+40/377+17
[2021-09-10 下午 05:45:05] (Msg) Ping measurement completed
[2021-09-10 下午 05:45:04] (Verbose) Communications with routing cluster 'atl' established.
[2021-09-10 下午 05:45:04] (Debug) Destroying relay 'sof#4 (139.45.193.10:27018)' because initial_ping_timeout
[2021-09-10 下午 05:45:04] (Debug) Destroying relay 'tyo#38 (155.133.239.19:27052)' because initial_ping_timeout
[2021-09-10 下午 05:45:04] (Debug) Destroying relay 'iad#158 (162.254.192.70:27050)' because initial_ping_timeout
[2021-09-10 下午 05:45:03] (Debug) Destroying relay 'atl#74 (162.254.199.173:27042)' because initial_ping_timeout
[2021-09-10 下午 05:45:03] (Debug) Destroying relay 'eat#4 (155.133.235.18:27018)' because initial_ping_timeout
[2021-09-10 下午 05:45:03] (Debug) Destroying relay 'dfw#92 (155.133.253.54:27060)' because consecutive_ping_timeout
[2021-09-10 下午 05:45:01] (Verbose) Communications with routing cluster 'maa' established.
[2021-09-10 下午 05:45:01] (Verbose) Communications with routing cluster 'sgp' established.
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'tyo#181 (155.133.239.52:27027)' because initial_ping_timeout
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'sof#1 (139.45.193.10:27015)' because initial_ping_timeout
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'sgp#219 (103.10.124.100:27043)' because initial_ping_timeout
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'maa#3 (155.133.232.98:27017)' because initial_ping_timeout
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'iad#62 (162.254.192.67:27038)' because initial_ping_timeout
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'eat#15 (155.133.235.18:27029)' because initial_ping_timeout
[2021-09-10 下午 05:45:01] (Debug) Destroying relay 'atl#31 (162.254.199.170:27045)' because initial_ping_timeout
[2021-09-10 下午 05:45:00] (Verbose) Communications with routing cluster 'lax' established.
[2021-09-10 下午 05:45:00] (Verbose) Communications with routing cluster 'dfw' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'jnb' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'sto2' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'scl' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'sto' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'waw' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'vie' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'lim' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'bom' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'gru' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'mad' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'eze' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'par' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'sea' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'syd' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'lhr' established.
[2021-09-10 下午 05:44:59] (Verbose) Communications with routing cluster 'ord' established.
[2021-09-10 下午 05:44:58] (Verbose) Communications with routing cluster 'ams' established.
[2021-09-10 下午 05:44:58] (Verbose) Communications with routing cluster 'fra' established.
[2021-09-10 下午 05:44:58] (Verbose) Communications with routing cluster 'tyo1' established.
[2021-09-10 下午 05:44:58] (Verbose) Communications with routing cluster 'dxb' established.
[2021-09-10 下午 05:44:58] (Verbose) Communications with routing cluster 'hkg' established.
[2021-09-10 下午 05:44:58] (Msg) SDR RelayNetworkStatus:  avail=Attempting  config=OK  anyrelay=Attempting   (Performing ping measurement)
[2021-09-10 下午 05:44:58] (Msg) Performing ping measurement
[2021-09-10 下午 05:44:58] (Msg) Got SDR network config.  Loaded revision 330 OK
[2021-09-10 下午 05:44:57] (Warning) SDR network config fetch first attempt failed.  HTTP 504.  .  Trying again.
[2021-09-10 下午 05:44:40] Attempting to open ALC device "OpenAL Soft on 扬声器/听筒 (Realtek Audio)"
[2021-09-10 下午 05:44:39] Loaded languages: English, German, French, Russian, Polish, Brazilian Portuguese, Castilian Spanish, Latinamerican Spanish, Simplified Chinese, Traditional Chinese, Japanese, Turkish, Korean
[2021-09-10 下午 05:44:39] Loaded languages: English, German, French, Russian, Polish, Brazilian Portuguese, Castilian Spanish, Latinamerican Spanish, Simplified Chinese, Traditional Chinese, Japanese, Turkish, Korean
[2021-09-10 下午 05:44:37] Logged in as 2731412072 (SteamID STEAM_1:1:180612801)
juanjp600 commented 3 years ago

Should be fixed in https://github.com/Regalis11/Barotrauma-development/commit/a7c0915a3da7bd8902f9a94e88b690fc43422387

Rokvach commented 3 years ago

Tested, working correctly. Closing.

itchyOwl commented 3 years ago

No it doesn't. On the bugfixes branch it doesn't crash because ParseContentPathFromUri uses a different method that doesn't crash with empty paths. On the dev branch it crashes. Nevertheless, the issue is not the crash. The issue is that registering the BaseUri doesn't seem to work properly, as it's empty:

image.png

image.png

juanjp600 commented 3 years ago

Should be fixed in https://github.com/Regalis11/Barotrauma-development/commit/9d8b2c0e58ab6cb5b7f53fc8f59b464c928ab868

itchyOwl commented 3 years ago

Seems to be fixed now.

Rokvach commented 3 years ago

Tested again, didn't encounter any crashes again. Seems to be working, closing.