Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#229 closed defect (released)

Crash on missing category

Reported by: Henri Owned by:
Priority: minor Milestone: WarFoundry 0.1
Component: WarFoundry-API Version: Unknown or N/A
Keywords: Cc:
Blocked By: Blocking:

Description

Another crash due to carelessness on the part of the datafile author. Me in this case. First bug from our new community. If the race file has a category not existing in the system file the following error is thrown:

:System.IO.InvalidDataException: Category with ID 'Steed' did
not exist for UnitType 'Giant Wolf'   bij
IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.LoadCoreVa\
luesForUnitType(XmlElement elem, UnitType type) in
Y:\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:\
regel 149   bij
IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CreateUnit\
TypeFromElement(XmlElement elem, String id, Race parentRace) in
Y:\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:\
regel 115   bij
IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.LoadContai\
nedUnitsForUnitType(XmlElement elem, UnitType type) in
Y:\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:\
regel 333   bij
IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CreateUnit\
TypeFromElement(XmlElement elem, String id, Race parentRace) in
Y:\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:\
regel 119   bij
IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CompleteLo\
ading(Race race) in
Y:\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:\
regel 80   bij
IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlFactory.CompleteLoadin\
g(IWarFoundryStagedLoadObject obj) in
Y:\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlFactory.cs:rege\
l 129   bij
IBBoard.WarFoundry.API.Objects.WarFoundryStagedLoadingObject.EnsureFully\
Loaded() in
Y:\IBBoard.WarFoundry.API\api\Objects\WarFoundryStagedLoadingObject.cs:r\
egel 40   bij IBBoard.WarFoundry.API.Objects.Race.HasCategoryOverrides()
in Y:\IBBoard.WarFoundry.API\api\Objects\Race.cs:regel 106   bij
IBBoard.WarFoundry.GUI.WinForms.FrmMain.FrmMain_ArmyChanged(Army
oldArmy, Army newArmy)   bij
IBBoard.WarFoundry.API.ArmyChangedDelegate.Invoke(Army oldValue, Army
newValue)   bij
IBBoard.WarFoundry.API.WarFoundryCore.set_CurrentArmy(Army value) in
Y:\IBBoard.WarFoundry.API\api\WarFoundryCore.cs:regel 71   bij
IBBoard.WarFoundry.GUI.WinForms.FrmMain.CreateNewArmy()   bij
IBBoard.WarFoundry.GUI.WinForms.FrmMain.toolBar_ButtonClick(Object
sender, ToolBarButtonClickEventArgs e)   bij
System.Windows.Forms.ToolBar.OnButtonClick(ToolBarButtonClickEventArgs
e)   bij System.Windows.Forms.ToolBar.WmReflectCommand(Message& m)   bij
System.Windows.Forms.ToolBar.WndProc(Message& m)   bij
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)  
bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

************** Geladen assembly's **************mscorlib   
Assembly-versie: 2.0.0.0    Win32-versie: 2.0.50727.4927
(NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll------\
----------------------------------WarFoundry    Assembly-versie:
0.0.1.37063    Win32-versie: 0.0.1.37063    CodeBase:
file:///C:/programma's/WarFoundry-WinForms-v0.1-beta-5/WarFoundry.exe---\
-------------------------------------System.Windows.Forms   
Assembly-versie: 2.0.0.0    Win32-versie: 2.0.50727.4927
(NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5\
c561934e089/System.Windows.Forms.dll------------------------------------\
----System    Assembly-versie: 2.0.0.0    Win32-versie: 2.0.50727.4927
(NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/Sy\
stem.dll----------------------------------------System.Drawing   
Assembly-versie: 2.0.0.0    Win32-versie: 2.0.50727.4927
(NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d\
50a3a/System.Drawing.dll----------------------------------------log4net
Assembly-versie: 1.2.10.0    Win32-versie: 1.2.10.0    CodeBase:
file:///C:/programma's/WarFoundry-WinForms-v0.1-beta-5/log4net.DLL------\
----------------------------------System.Configuration   
Assembly-versie: 2.0.0.0    Win32-versie: 2.0.50727.4927
(NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5\
f7f11d50a3a/System.Configuration.dll------------------------------------\
----System.Xml    Assembly-versie: 2.0.0.0    Win32-versie:
2.0.50727.4927 (NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e08\
9/System.Xml.dll----------------------------------------IBBoard   
Assembly-versie: 1.0.3612.37047    Win32-versie: 1.0.3612.37047   
CodeBase:
file:///C:/programma's/WarFoundry-WinForms-v0.1-beta-5/IBBoard.DLL------\
----------------------------------IBBoardWF    Assembly-versie:
1.0.0.37063    Win32-versie: 1.0.0.37063    CodeBase:
file:///C:/programma's/WarFoundry-WinForms-v0.1-beta-5/IBBoardWF.DLL----\
------------------------------------IBBoard.WarFoundry.API   
Assembly-versie: 0.0.1.37062    Win32-versie: 0.0.1.37062    CodeBase:
file:///C:/programma's/WarFoundry-WinForms-v0.1-beta-5/IBBoard.WarFoundr\
y.API.DLL----------------------------------------ICSharpCode.SharpZipLib
Assembly-versie: 0.85.5.452    Win32-versie: 0.85.5.452    CodeBase:
file:///C:/programma's/WarFoundry-WinForms-v0.1-beta-5/ICSharpCode.Sharp\
ZipLib.DLL----------------------------------------System.XML.resources
Assembly-versie: 2.0.0.0    Win32-versie: 2.0.50727.4927
(NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Xml.resources/2.0.0.0_nl_b77\
a5c561934e089/System.Xml.resources.dll----------------------------------\
------mscorlib.resources    Assembly-versie: 2.0.0.0    Win32-versie:
2.0.50727.4927 (NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll------\
----------------------------------System.Data    Assembly-versie:
2.0.0.0    Win32-versie: 2.0.50727.4927 (NetFXspW7.050727-4900)   
CodeBase:
file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089\
/System.Data.dll----------------------------------------System.Windows.F\
orms.resources    Assembly-versie: 2.0.0.0    Win32-versie:
2.0.50727.4927 (NetFXspW7.050727-4900)    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.\
0.0_nl_b77a5c561934e089/System.Windows.Forms.resources.dll--------------\
--------------------------

Change History (3)

comment:1 Changed 10 years ago by ibboard

Resolution: fixed
Status: newclosed

Fixed in r419 by other changes (part of ticket:226)

comment:2 Changed 10 years ago by ibboard

released: noyes

Release as part of v0.1b6

comment:3 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.