Opened 8 years ago

Closed 8 years ago

#391 closed defect (fixed)

Error when selecting multiples of units

Reported by: Henri Owned by:
Priority: major Milestone:
Component: WarFoundry-GUI-WinForms Version: Trunk
Keywords: Cc:
Blocked By: Blocking:

Description

Get the following error when selecting a second copy of any unit. Using Nightly #35 and the sample datafile.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

Exception Text
System.ArgumentException: An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at IBBoard.Collections.SimpleSet`1.Add(TYPE val)
at IBBoard.WarFoundry.API.Objects.Army.GetAddingUnitRequirements(UnitType addingType)
at IBBoard.WarFoundry.API.Objects.Requirement.RequirementHandler.AllowsAdding(UnitType unitType, Army army, ICollection`1& failureMessages)
at IBBoard.WarFoundry.FrmNewUnit.setSelectUnitEnabledVal()
at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ListBox.WndProc(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)

Loaded Assemblies
mscorlib

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4216 (VistaSP2GDR.050727-4200)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll


WarFoundry

Assembly Version: 0.1.0.21923
Win32 Version: 0.1.0.21923
CodeBase: file:///C:/Users/Henri/WarFoundry-WinForms-nightly/WarFoundry.exe


System.Windows.Forms

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll


System

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4215 (VistaSP2GDR.050727-4200)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll


System.Drawing

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll


log4net

Assembly Version: 1.2.10.0
Win32 Version: 1.2.10.0
CodeBase: file:///C:/Users/Henri/WarFoundry-WinForms-nightly/log4net.DLL


System.Configuration

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll


System.Xml

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll


IBBoard

Assembly Version: 1.0.4410.41655
Win32 Version: 1.0.4410.41655
CodeBase: file:///C:/Users/Henri/WarFoundry-WinForms-nightly/IBBoard.DLL


IBBoard.WarFoundry.API

Assembly Version: 0.1.0.14928
Win32 Version: 0.1.0.14928
CodeBase: file:///C:/Users/Henri/WarFoundry-WinForms-nightly/IBBoard.WarFoundry.API.DLL


IBBoardWF

Assembly Version: 1.0.0.21880
Win32 Version: 1.0.0.21880
CodeBase: file:///C:/Users/Henri/WarFoundry-WinForms-nightly/IBBoardWF.DLL


ICSharpCode.SharpZipLib

Assembly Version: 0.86.0.518
Win32 Version: 0.86.0.518
CodeBase: file:///C:/Users/Henri/WarFoundry-WinForms-nightly/ICSharpCode.SharpZipLib.DLL


System.Data

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll


JIT Debugging
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Change History (1)

comment:1 Changed 8 years ago by ibboard

Resolution: fixed
Status: newclosed

Fixed this last night (I made a mistake while altering the IBBoard library, which wasn't unit tested). Somehow I didn't see the notification about this ticket! New build should be available now.

Note: See TracTickets for help on using tickets.