Opened 9 years ago

Last modified 9 years ago

#313 confirmed defect

Crash caused by requirement conflicts in datafile

Reported by: Henri Owned by:
Priority: minor Milestone:
Component: WarFoundry-GUI-WinForms Version: WarFoundry 0.1RC2
Keywords: Cc:
Blocked By: Blocking:

Description

In certain circumstances the program crashes on load if the datafile is "incorrectly" written. I don't even get to see what the issues is as jsut says "Warfoundry Winforms has stopped working".

Attached datafile does this when you try to add a Dreadnaught from heavysupport.
Now I know why it does this, it has to do with the equipment options being all required and none being zero or something like that. If I add a absoluteLimite min=0 max=1 to each of the items it will work.

Attachments (1)

Blood Angels.race (4.7 KB) - added by Henri 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Henri

Attachment: Blood Angels.race added

comment:1 Changed 9 years ago by ibboard

Status: newconfirmed

If you run it from the console then you get a huge stack trace (I killed it before it crashed and I had over 10,000 lines). It looks like there is an infinite loop in its calculations:

...
  at IBBoard.WarFoundry.API.Util.UnitEquipmentUtil.GetMaxEquipmentCount (IBBoard.WarFoundry.API.Objects.Unit,IBBoard.WarFoundry.API.Objects.UnitEquipmentItem) <0x0005b>
  at IBBoard.WarFoundry.API.Objects.UnitEquipmentRatioSelection.CalculateNumberTaken (IBBoard.WarFoundry.API.Objects.Unit,IBBoard.WarFoundry.API.Objects.UnitEquipmentItem,double) <0x00087>
  at IBBoard.WarFoundry.API.Objects.UnitEquipmentRatioSelection.get_NumberTaken () <0x0003f>
  at IBBoard.WarFoundry.API.Objects.Unit.GetSelectionTotal (System.Collections.Generic.List`1<IBBoard.WarFoundry.API.Objects.AbstractUnitEquipmentItemSelection>) <0x0004f>
  at IBBoard.WarFoundry.API.Objects.Unit.GetEquipmentAmountInSlotExcludingItem (IBBoard.WarFoundry.API.Objects.UnitEquipmentItem) <0x000ab>
  at IBBoard.WarFoundry.API.Util.UnitEquipmentUtil.GetEquipmentCountLimit (IBBoard.WarFoundry.API.Objects.Unit,int,IBBoard.WarFoundry.API.Objects.UnitEquipmentItem) <0x000d3>
  at IBBoard.WarFoundry.API.Util.UnitEquipmentUtil.GetMaxEquipmentCount (IBBoard.WarFoundry.API.Objects.Unit,IBBoard.WarFoundry.API.Objects.UnitEquipmentItem) <0x0005b>
...
Note: See TracTickets for help on using tickets.