Opened 11 years ago

Closed 10 years ago

#1842 closed defect (fixed)

Crash in CBinarySerializerScriptImpl (multiplayer match)

Reported by: Dan Newman Owned by:
Priority: Must Have Milestone: Alpha 15
Component: Core engine Keywords: crash crashlog
Cc: Patch:

Description

The game crashed. I am trying to help by attaching the logs.

Attachments (2)

crashlog.dmp (50.3 KB ) - added by Dan Newman 11 years ago.
crashlog.txt (6.3 KB ) - added by Dan Newman 11 years ago.

Download all attachments as: .zip

Change History (16)

by Dan Newman, 11 years ago

Attachment: crashlog.dmp added

by Dan Newman, 11 years ago

Attachment: crashlog.txt added

comment:1 by historic_bruno, 11 years ago

Which map were you playing and were there AI players? How many AIs and which ones?

comment:2 by historic_bruno, 11 years ago

Priority: Release BlockerShould Have
Summary: CrashCrash in CBinarySerializerScriptImpl (multiplayer match)

comment:3 by ben, 11 years ago

In 13429:

Extends binary serializer to support some standard JS classes: Number, String, Boolean. Fixes #406.
Extends binary serializer to support typed arrays.
Extends binary serializer to support custom JS prototype objects in AIs, fixes #407.
Allows full serialization of AIs (not yet implemented). Refs #1089, #1886
Increases binary serializer script backref arena from 8 MB to 16 MB, refs #1842

comment:4 by Markus, 11 years ago

Keywords: crashlog added

Fixed with r13429? Closing with "needsinfo"/"fixed"?

Last edited 11 years ago by historic_bruno (previous) (diff)

in reply to:  4 comment:5 by historic_bruno, 11 years ago

Replying to Markus:

Fixed with r13429? Closing with "needsinfo"/"fixed"?

Probably we should wait until A14 is released and then see if anyone reports this problem or if updating to A14 fixes it.

comment:6 by historic_bruno, 11 years ago

Not fixed, I got this error today with r13758 on a random map, 4 humans vs 4 Aegis bots.

comment:7 by historic_bruno, 11 years ago

Easy way to reproduce this in single player: use serialization test mode in Atlas, on fast speed and wait a while.

comment:8 by historic_bruno, 11 years ago

Milestone: BacklogAlpha 15
Priority: Should HaveMust Have

So the problem is the arena allocator used by the binary serializer is failing. In the case of the serialization test, there was a memory leak in libXML2, this case should be fixed by r13817.

There must be a different cause in multiplayer games. We can do two things: 1) switch to a dynamic arena instead of a fixed 16 MB size, so it can start much smaller, 2) look for memory leaks and monitor memory usage during games. (1) is a good idea anyway since simulation messages also get serialized and they really don't need to be allocating 16 MB arenas all the time.

comment:9 by ben, 11 years ago

In 13866:

Fixes buggy operators and memory leak in Grid class, refs #1842

comment:10 by ben, 11 years ago

In 13869:

Better fix of Grid memory leak, refs #1842

comment:11 by historic_bruno, 11 years ago

r13869 should fix a major cause of this error in games against AIs.

comment:12 by ben, 11 years ago

In 13916:

Adds DynamicArena allocator that grows by fixed chunk size, fixes #2142.
Changes fixed size arenas to new dynamic arenas with reasonable chunk sizes (may require tuning), refs #1842

comment:13 by wraitii, 10 years ago

Milestone: Alpha 15Alpha 16

Is this still relevant? Pushing to A16 in the meantime.

comment:14 by historic_bruno, 10 years ago

Milestone: Alpha 16Alpha 15
Resolution: fixed
Status: newclosed

No sense keeping it open, before it was an indication of the game running out of memory due to memory leaks or fragmentation, but it will be seen less often now that every binary serialization isn't allocating 8+ MB of memory. We should just remember that if someone reports an error like this in the future, it is a likely indication of running out of memory.

Note: See TracTickets for help on using tickets.