Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4269 closed defect (fixed)

[PATCH] Groups portrait - can't convert undefined to object

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

The following error stack was repeated onTick in an alpha 21 (r18802), reported by bb :

ERROR: JavaScript error: gui/session/session.js line 900
TypeError: can't convert undefined to object
  updateGroups/getCostSum@gui/session/session.js:900:10
  updateGroups/icon<@gui/session/session.js:918:13
  updateGroups@gui/session/session.js:916:31
  updateGUIObjects@gui/session/session.js:722:2
  onSimulationUpdate@gui/session/session.js:677:2
  __eventhandler116 (simulationupdate)@sn simulationupdate:0:1

It occured twice to bb (who got defeated and became an observer), when having a controlgroup on a hero garrisoned in a ship and (if he recalls correctly), when a hero garrisoned in a CC was selected. However we found no way to reproduce it yet.

The affected code comes from r18728, #2163.

Attachments (2)

commands.txt.7z (302.1 KB ) - added by elexis 8 years ago.
4269_fix.patch (626 bytes ) - added by Imarok 8 years ago.

Download all attachments as: .zip

Change History (6)

by elexis, 8 years ago

Attachment: commands.txt.7z added

comment:1 by elexis, 8 years ago

Description: modified (diff)
Summary: Groups - can't convert undefined to objectGroups portrait - can't convert undefined to object

by Imarok, 8 years ago

Attachment: 4269_fix.patch added

comment:2 by Imarok, 8 years ago

Keywords: patch review added
Milestone: BacklogAlpha 21
Summary: Groups portrait - can't convert undefined to object[PATCH] Groups portrait - can't convert undefined to object

To reproduce: change perspective to gaia, select to different resources and add them as control group

comment:3 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18809:

Add a missing check for undefined resource costs when picking the unit portrait in observermode. Patch by Imarok, fixes #4269.

comment:4 by elexis, 8 years ago

Keywords: review removed

Thanks!

Note: See TracTickets for help on using tickets.