Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4169 closed defect (fixed)

[PATCH] MissileHit: TypeError: cmpHealth is null

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

Description

In the attached replay with r18625, this error occured a number of times throughout the game:

ERROR: Error in timer on entity 1, IID 57, function MissileHit: TypeError: cmpHealth is null
  Armour.prototype.TakeDamage@simulation/components/Armour.js:66:2
  Damage.prototype.CauseDamage@simulation/components/Damage.js:215:6
  Damage.prototype.CauseSplashDamage@simulation/components/Damage.js:194:4
  Damage.prototype.MissileHit@simulation/components/Damage.js:101:4
  Timer.prototype.OnUpdate@simulation/components/Timer.js:100:4

Attachments (2)

commands.txt (1.1 MB ) - added by elexis 8 years ago.
t4169_health.diff (498 bytes ) - added by bb 8 years ago.
This seems to be caused by a missing check. The entity in the replay are fishes accidentaly being hit by targetting ships, which indeed have no health. (testing this patch with the replay gives a oos instead of error, which is obvious and harmless)

Download all attachments as: .zip

Change History (5)

by elexis, 8 years ago

Attachment: commands.txt added

by bb, 8 years ago

Attachment: t4169_health.diff added

This seems to be caused by a missing check. The entity in the replay are fishes accidentaly being hit by targetting ships, which indeed have no health. (testing this patch with the replay gives a oos instead of error, which is obvious and harmless)

comment:1 by bb, 8 years ago

Keywords: patch rfc added
Summary: MissileHit: TypeError: cmpHealth is null[PATCH] MissileHit: TypeError: cmpHealth is null

comment:2 by leper, 8 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 18643:

Remove Armour from fish templates. Fixes #4169.

Given that Armour needs Health disabling one but not the other is an error.

comment:3 by leper, 8 years ago

Keywords: rfc removed

There is no check there because failing that line means there is a bug somewhere else, stop trying to hide such things but fix the root cause.

Note: See TracTickets for help on using tickets.