Opened 13 years ago
Last modified 13 years ago
#980 new defect
Game crash when attack command is sent with an entity instead of entity id
Reported by: | Jonathan Waller | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
If a malformed command is sent (from an AI script) using
Engine.PostCommand({"type": "attack", "entities": tasked, "target": ent, "queued": false});
instead of
Engine.PostCommand({"type": "attack", "entities": tasked, "target": ent.id(), "queued": false});
then the game crashes with: unhandled exception (Access violation reading 0x00000008)
Attachments (2)
Change History (3)
by , 13 years ago
Attachment: | crashlog.txt added |
---|
by , 13 years ago
Attachment: | crashlog.dmp added |
---|
comment:1 by , 13 years ago
Note:
See TracTickets
for help on using tickets.
Ah, looks like WriteStructuredClone is failing silently (because the serialized object contains an object reference?), we don't handle this condition and end up with an empty StructuredClone - there's a TODO in the code about this. Then ReadStructuredClone crashes when the command is processed. If WriteStructuredClone fails then the whole command fails, so I guess we should report the error and ignore the command.