OpenRA icon indicating copy to clipboard operation
OpenRA copied to clipboard

Crash when hovering over silo bar in TD

Open dragunoff opened this issue 3 years ago • 0 comments

Start a game of TD and try to trigger the tooltip by hovering over the silo bar (to the right of the minimap). Crash happens because we're passing Silo Usage: {$resources}/{$capacity}: {0}/{1} to the string formatting method.

System Information

  • OpenRA Version: bleed
  • OpenRA Mod: cnc

Exception log

Exception of type `System.FormatException`: Input string was not in a correct format.
   at System.Text.ValueStringBuilder.ThrowFormatError()
   at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object[] args)
   at OpenRA.Mods.Common.Widgets.ResourceBarWidget.<MouseEntered>b__16_0() in /home/ivaylo/code/OpenRA/OpenRA.Mods.Common/Widgets/ResourceBarWidget.cs:line 59
   at OpenRA.Mods.Common.Widgets.Logic.SimpleTooltipLogic.<>c__DisplayClass0_0.<.ctor>b__0() in /home/ivaylo/code/OpenRA/OpenRA.Mods.Common/Widgets/Logic/SimpleTooltipLogic.cs:line 34
   at OpenRA.Widgets.Widget.DrawOuter() in /home/ivaylo/code/OpenRA/OpenRA.Game/Widgets/Widget.cs:line 479
   at OpenRA.Widgets.Widget.DrawOuter() in /home/ivaylo/code/OpenRA/OpenRA.Game/Widgets/Widget.cs:line 481
   at OpenRA.Widgets.Widget.DrawOuter() in /home/ivaylo/code/OpenRA/OpenRA.Game/Widgets/Widget.cs:line 481
   at OpenRA.Game.RenderTick() in /home/ivaylo/code/OpenRA/OpenRA.Game/Game.cs:line 733
   at OpenRA.Game.Loop() in /home/ivaylo/code/OpenRA/OpenRA.Game/Game.cs:line 841
   at OpenRA.Game.Run() in /home/ivaylo/code/OpenRA/OpenRA.Game/Game.cs:line 873
   at OpenRA.Game.InitializeAndRun(String[] args) in /home/ivaylo/code/OpenRA/OpenRA.Game/Game.cs:line 308
   at OpenRA.Launcher.Program.Main(String[] args) in /home/ivaylo/code/OpenRA/OpenRA.Launcher/Program.cs:line 32

dragunoff avatar Sep 19 '22 14:09 dragunoff