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.75k stars 407 forks source link

Changing target when multiple motion detectors are selected in sub editor crashes the game #9426

Closed Evicol closed 2 years ago

Evicol commented 2 years ago

Disclaimers

What happened?

I have multiple vanilla motion detectors on my sub. When i selected all of them(CTRL+click) to change the target from HUMAN, WALL, MONSTER to only HUMAN, the game crashed. Bug has happened every time I try it. changing them one-by-one works.

Reproduction steps

1.Open sub editor 2.Place more than one motion detector(I checked with 6) 3.Select all of them with CTRL+click 4.Go into proprieties and try to change the "Target" under the "MOTIONSENSOR" tab.

Bug prevalence

Happens every time I play

Version

0.18.12.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 20-Jun-22 2:30:21 PM)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

A382F735B43D8E3FAD0FC906B3E782B4

Game version 0.18.12.0 (ReleaseWindows, branch release, revision 85532fbcbc)
Graphics mode: 1920x1080 (Fullscreen)
VSync ON
Language: English
Selected content packages: Vanilla, Lua For Barotrauma, Meaningful Upgrades, Calic's Resource Storage Containers, Duffle Bag 2.0, Backpack & WaistBelt - Balanced, Backpacks, Shreksophone, Better Vanilla Weapons, Breaking Bad Guitar, Performance Fix, More Calic's Resource Storage Containers, Combinable Ammo Revived (NOW WORKS WITH ALL AMMO), Room FX, EK | Armory, EK | Utility, EK | Gunnery, EK | Dockyard, EV SHUTTLE, [EV]Atlas, ev sub, SUIT, windowed button doors with warning
Level seed: no level loaded
Loaded submarine: ev sub (AE4B6222C8A373A0ABFE69EFF3991199)
Selected screen: Barotrauma.SubEditorScreen
SteamManager initialized

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

Exception: Object of type 'System.String' cannot be converted to type 'Barotrauma.Items.Components.MotionSensor+TargetType'. (System.ArgumentException)
Target site: System.Object TryChangeType(System.Object, System.Reflection.Binder, System.Globalization.CultureInfo, Boolean)
Stack trace: 
   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   at Barotrauma.SerializableEntityEditor.MultiSetProperties(SerializableProperty property, Object parentObject, Object value) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Serialization\SerializableEntityEditor.cs:line 1444
   at Barotrauma.SerializableEntityEditor.SetPropertyValue(SerializableProperty property, Object entity, Object value) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Serialization\SerializableEntityEditor.cs:line 1348
   at Barotrauma.SerializableEntityEditor.<>c__DisplayClass28_0.<CreateEnumFlagField>b__0(GUIComponent selected, Object val) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Serialization\SerializableEntityEditor.cs:line 644
   at Barotrauma.GUIDropDown.<AddItem>b__64_0(GUITickBox tb) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIDropDown.cs:line 290
   at Barotrauma.GUITickBox.set_Selected(Boolean value) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUITickBox.cs:line 39
   at Barotrauma.GUITickBox.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUITickBox.cs:line 231
   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:
[20-Jun-22 2:29:01 PM] Hash calculation for content package "EK | Dockyard" didn't match expected hash (059D749F62C8CCEE88FC5B9101130BD8 != F2DC874DC596C9F056A0326EA8EF077E)
[20-Jun-22 2:29:01 PM] Attempting to open ALC device "OpenAL Soft on Speakers (Realtek(R) Audio)"
[20-Jun-22 2:29:00 PM] Logged in as Evicol (SteamID STEAM_1:1:86944196)
Regalis11 commented 2 years ago

Duplicate of https://github.com/Regalis11/Barotrauma/issues/9401