Skip to content

Non-deterministic crashes when loading very large maps (width+height=512) #2219

@CCCP84

Description

@CCCP84

While testing very large maps, I noticed unstable and inconsistent crashes related to map size. I created maps where width + height = 512. Sometimes the map loads and runs normally without any issues, but other times the game crashes either during loading or shortly after the match starts (20-30 sec).

The behavior is non-deterministic and seems to depend on the game state rather than the map itself. If a large map successfully launches once, it will usually continue working on subsequent launches. If it crashes once, it will usually keep crashing repeatedly. However, launching a different map and then returning to the large map can change the behavior again. This suggests that some initial conditions or memory state inside the game affect whether the map works or fails.

In one case RA2 crashed while Yuri’s Revenge loaded the same map normally. Maps with more terrain detail, height variation, cliffs, and similar features appear to trigger crashes more often.

One possible explanation is that the game writes beyond memory allocated for map cells or related structures, causing memory corruption and unpredictable behavior. Since the maps sometimes work correctly, it feels like the engine is very close to supporting these sizes already, but becomes unstable depending on memory layout.

Here are test maps. The "01" is less prone to errors, while the "12" is very prone. However, both of them can produce errors or not:

TEST MAPS.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions