Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#135 closed defect (released)

Closing army crashes WinForms

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-GUI-WinForms Version:
Keywords: crash close army Cc:
Blocked By: Blocking: #88

Description

The WinForms UI currently crashes if you close an army from the menu item. This is caused by a modified collection that is being iterated over in the army tree dialog.

Change History (6)

comment:1 Changed 10 years ago by ibboard

Lines 142/143 need to work over a copy of the collection, as closing the dialogs triggers the unitForm_Closing() method, which removes the form from the "open forms" collection.

foreach (FrmUnit window in htUnitWindows.Values)

comment:2 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:3 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r241) Fixes #135: Closing army crashes WinForms

  • Simple solution: Cache the open windows as an array then close them from the array to avoid iterating over an collection that gets modified!

comment:4 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:5 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:6 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.