Opened 2 years ago

Closed 2 years ago

#6416 closed defect (fixed)

Errors selecting an obstructor object in Atlas

Reported by: Langbart Owned by: Freagarach
Priority: Should Have Milestone: Alpha 26
Component: Simulation Keywords:
Cc: Patch: Phab:D4583

Description (last modified by Langbart)

to reproduce

  • Run scenarios/units_demo.xml in Atlas.
  • Select the object obstructors/placement. See picture below for more clarity. No errors should occur up to this point.
  • Press Play
  • Select it again --> Stream of errors
ERROR: Errors executing script event "Tick"

ERROR: JavaScript error: gui/session/unit_actions.js line 1943 entState.identity is undefined getActionInfo@gui/session/unit_actions.js:1943:50 actionCheck@gui/session/unit_actions.js:1228:34 hotkeyActionCheck@gui/session/unit_actions.js:1217:16 determineAction@gui/session/input.js:267:34 updateCursorAndTooltip@gui/session/input.js:111:31 onTick@gui/session/session.js:619:2 __eventhandler2 (Tick)@session Tick:1:1

The problem can be reproduced for A25b [25860]. The object was introduced with [25559]. I suspect this is the buggy commit.

Adding <Identity>

The errors disappear when adding an <Identity> tag to it.

Attachments (2)

obstructors_placement.jpg (346.3 KB ) - added by Langbart 2 years ago.
Identity.jpg (107.2 KB ) - added by Langbart 2 years ago.

Download all attachments as: .zip

Change History (6)

by Langbart, 2 years ago

Attachment: obstructors_placement.jpg added

comment:1 by Freagarach, 2 years ago

We assume (at more than one occasion) that every entity has cmpIdentity. So there are two possible fixes:

  • Don't assume the above.
  • Give the object/entity cmpIdentity.

comment:2 by Langbart, 2 years ago

Description: modified (diff)

<Identity> tag works.

by Langbart, 2 years ago

Attachment: Identity.jpg added

comment:3 by Langbart, 2 years ago

Patch: Phab:D4583

comment:4 by Freagarach, 2 years ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 26740:

Add identity tag to obstructor.

Introduced in r25559 / rP25559.

We assume at many places that an entity has cmpIdentity and as such we add it here as well.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4583
Fixes #6416

Note: See TracTickets for help on using tickets.