#228 closed defect (released)
Crash with missing abilityID
Reported by: | Henri | Owned by: | ibboard |
---|---|---|---|
Priority: | minor | Milestone: | WarFoundry 0.1 |
Component: | WarFoundry-API | Version: | Trunk |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
So new toys to play with and I finally managed to crash the program. I know what the error is this time, I changed the abilityID in one place so it was referring to a non existing abilityID in the <abilities> list. A "nicer" handling would be nice though. I assume the same would be true for the <notes> tag?
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at IBBoard.WarFoundry.API.Objects.UnitType.AddAbility(Ability ability, Boolean isRequired) in C:\Users\Henri\Downloads\tortoise\warfoundry\IBBoard.WarFoundry.API\api\Objects\UnitType.cs:line 345 at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.LoadAbilitiesForUnitType(XmlElement elem, UnitType type) in C:\Users\Henri\Downloads\tortoise\warfoundry\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:line 334 at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CreateUnitTypeFromElement(XmlElement elem, String id, Race parentRace) in C:\Users\Henri\Downloads\tortoise\warfoundry\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:line 125 at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CompleteLoading(Race race) in C:\Users\Henri\Downloads\tortoise\warfoundry\IBBoard.WarFoundry.API\api\Factories\Xml\WarFoundryXmlRaceFactory.cs:line 80 at IBBoard.WarFoundry.API.Objects.WarFoundryStagedLoadingObject.EnsureFullyLoaded() in C:\Users\Henri\Downloads\tortoise\warfoundry\IBBoard.WarFoundry.API\api\Objects\WarFoundryStagedLoadingObject.cs:line 47 at IBBoard.WarFoundry.API.Objects.Race.HasCategoryOverrides() in C:\Users\Henri\Downloads\tortoise\warfoundry\IBBoard.WarFoundry.API\api\Objects\Race.cs:line 106 at IBBoard.WarFoundry.GUI.WinForms.FrmMain.FrmMain_ArmyChanged(Army oldArmy, Army newArmy) at IBBoard.WarFoundry.API.ArmyChangedDelegate.Invoke(Army oldValue, Army newValue) at IBBoard.WarFoundry.GUI.WinForms.FrmMain.CreateNewArmy() at System.Windows.Forms.MenuItem.OnClick(EventArgs e) at System.Windows.Forms.Command.Invoke() at System.Windows.Forms.Control.WmCommand(Message& m) at System.Windows.Forms.Control.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.4200 (NetFxQFE.050727-4200) CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll ---------------------------------------- WarFoundry Assembly Version: 0.0.1.29101 Win32 Version: 0.0.1.29101 CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/WarFoundry.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000) 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.4016 (NetFxQFE.050727-4000) 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/IBBoard.WarFoundry.GUI.WinForms/bin/Release/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.3623.29101 Win32 Version: 1.0.3623.29101 CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/IBBoard.DLL ---------------------------------------- IBBoardWF Assembly Version: 1.0.0.29101 Win32 Version: 1.0.0.29101 CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/IBBoardWF.DLL ---------------------------------------- IBBoard.WarFoundry.API Assembly Version: 0.0.1.29101 Win32 Version: 0.0.1.29101 CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/IBBoard.WarFoundry.API.DLL ---------------------------------------- ICSharpCode.SharpZipLib Assembly Version: 0.85.5.452 Win32 Version: 0.85.5.452 CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/ICSharpCode.SharpZipLib.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 (11)
comment:1 Changed 10 years ago by
Owner: | set to ibboard |
---|---|
Status: | new → accepted |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
comment:4 Changed 10 years ago by
comment:5 Changed 10 years ago by
comment:6 Changed 10 years ago by
comment:7 Changed 10 years ago by
comment:8 Changed 10 years ago by
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
(In r449) Fixes #228: Crash on invalid ability ID
- Replace zipped Race and System files with unpackaged XML
- Add helper class to create WarFoundry objects from XML files for tests
- Use new helper classes to make test pass
comment:11 Changed 10 years ago by
Resolution: | fixed → released |
---|
Mark fix as released under a previous version
Note: See
TracTickets for help on using
tickets.
(In r425) Re #228: Crash with missing abilityID
TODO:
Problem shouldn't occur for <notes> because it is just a block of text and isn't referenced anywhere