Skip to content

Crash on save on Windows after long playtime, pure virtual method called #1863

@DonBellozi

Description

@DonBellozi

Crash on save on Windows after long playtime, not reproducible on Linux

Description

RTTR crashes on Windows during a save operation with the following runtime error:

pure virtual method called
terminate called without an active exception

The same savegame behaves differently on Linux: it loads and saves correctly.
After re-saving the game on Linux and copying the savefile back to Windows, the crash no longer occurs (at least so far).

This suggests platform-dependent behavior, possibly related to savegame serialization or object lifetime handling.


Environment

Windows (crash occurs)

  • OS: Windows 11 Pro (also reproduced on Windows 10)
  • RTTR version: v20260114-5452ee9
  • Architectures tested: x86_64 and i386
  • CPU: Intel Core i11 (11th gen)
  • GPU: NVIDIA GeForce RTX 4070
  • Graphics backend: SDL2 OpenGL (OpenGL 4.6 supported)
  • Audio backend: SDL2_mixer
  • Install path: E:\Settlers2
  • User data path:
    C:\Users\Bell®\Saved Games\Return To The Roots

Linux (no crash observed)

  • OS: Ubuntu 24.04.3
  • RTTR version: v20260114-5452ee9
  • Runtime: VMware® Workstation 17 Pro
    Version 17.6.4 (build-24832109)

Steps to reproduce (Windows)

  1. Start RTTR on Windows
  2. Load the attached savegame
  3. Play the game for a longer period of time
  4. Attempt to save the game manually
  5. Game crashes with:
pure virtual method called
terminate called without an active exception

Steps to reproduce (Linux)

  1. Start RTTR on Linux
  2. Load the same savegame
  3. Play for some time
  4. Save the game

Result: save succeeds, no crash.


Additional timing details

  • The crash occurred after approximately 20 hours and 31 minutes of gameplay on the same map
  • Before the crash:
  • Autosave was enabled with a 10-minute interval
  • Autosave worked reliably for the entire session (≈120 autosaves)
  • The crash happened during a manual save attempt

This points to a long-running session / accumulated state issue rather than a general save failure.


Workaround / Additional findings

  • Saving the game on Linux and copying the newly created savefile back to Windows prevents the crash (so far).
  • Linux appears to re-serialize the game state in a way that avoids triggering the issue on Windows.

Expected behavior

Saving the game should not crash on any platform.

Actual behavior

  • Windows: crash during save
  • Linux: save succeeds

Notes / Hypothesis

  • The error looks like a C++ runtime issue (pure virtual method called), possibly caused by invalid object lifetime or use-after-free.
  • The issue appears platform-specific and may be related to:
  • savegame serialization/deserialization
  • long-running sessions with accumulated game state
  • undefined behavior manifesting differently on Windows vs Linux (compiler / STL / memory layout differences)

Attachments

  • Original savegame file (before crash)
  • Savegame file re-saved on Linux
  • Full Windows console log

LOGS.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions