subchannel13 / Stareater

4X turn based strategy
GNU General Public License v3.0
32 stars 7 forks source link

bug - creating design, #97

Closed mariomalnar closed 7 years ago

mariomalnar commented 7 years ago

selected cruiser, maxed out everything, crashes in end.

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Stareater.AppData.Expressions.Variable.Evaluate(IDictionary2 variables) at Stareater.AppData.Expressions.Product.<>cDisplayClass16.b14(Double subProduct, IExpressionNode element) at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func3 func) at Stareater.AppData.Expressions.Product.Evaluate(IDictionary2 variables) at Stareater.GameLogic.PlayerProcessor.refitComponentCost[T](Component1 fromComponent, Component1 toComponent, Func2 costFormula, Var extraVars, ShipFormulaSet shipFormulas) at Stareater.GameLogic.PlayerProcessor.refitComponentCost[T](List1 fromComponents, List1 toComponents, Func`2 costFormula, Var extraVars, ShipFormulaSet shipFormulas) at Stareater.GameLogic.PlayerProcessor.refitCost(Design fromDesign, Design toDesign, ShipFormulaSet shipFormulas) at Stareater.GameLogic.PlayerProcessor.calcRefitCosts(Design design, ShipFormulaSet shipFormulas) at Stareater.GameLogic.PlayerProcessor.Analyze(Design design, StaticsDB statics) at Stareater.Controllers.ShipDesignController.Commit() at Stareater.GUI.FormShipDesignList.newDesignButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

subchannel13 commented 7 years ago

Got it reproduced, special equipment causes it.