• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

TerraPass

Recruit
59 Badges
Jan 8, 2013
5
11
  • Stellaris: Distant Stars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Crusader Kings II
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Tyranny - Bastards Wound
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Victoria 3 Sign Up
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Tyranny: Gold Edition
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Sword of Islam
  • Prison Architect
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Age of Wonders III
  • Shadowrun Returns
  • Stellaris
  • BATTLETECH
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH: Heavy Metal
  • Crusader Kings III
  • Crusader Kings III: Royal Edition

Information​

I have verifed my game files (Steam only)​

Yes

I have disabled all mods​

Yes

I am running the latest game update​

Yes

Required​

Summary​

Headless (-nographics) mode always crashes on launch since CK3 v1.16 (Chamfron) - on Windows, Linux, macOS

Description​

Ever since the release of v1.16 (Chamfron) the game's headless mode, available via the `-nographics` command line argument, crashes within a couple of seconds after being launched. The issue occurs 100% of the time, on vanilla game with no mods, on all 3 platforms (Windows, Linux, macOS). It first appeared with the release of v1.16.0 (about a month ago), but unfortunately still persists as of v1.16.2.3.

`-nographics` being thus broken makes it significantly more complicated to run the game's executable inside a GPU-less server environment/Docker container for the purposes of automated testing, log collection etc.. This negatively affects the development workflow of certain popular CK3 modding projects (Godherja, AGOT) that rely on the game's headless mode for parts of their CI setup.

Using Godherja as the example, CK3's `-nographics` mode has been used on a daily basis as part of the team's GitLab CI pipeline for the past 2 years (since CK3 v1.9) - for the purposes of smoke-testing the team's Git pushes and collecting `error.log` to be used in subsequent automation steps.
Due to `-nographics` no longer working since v1.16, about half of Godherja's CI jobs have been rendered non-functional. AGOT's internal automation faces similar negative impact.

Steps to reproduce​

1. Open the system terminal and navigate to the `binaries/` subfolder inside of the game's installation directory.

2.a. If on Windows, run the following command:
```
.\ck3.exe -nographics
```
2.b. If on Linux, run:
```
./ck3 -nographics
```
2.c. Alternatively, run the game via Steam after providing `-nographics` argument in the "Launch Options" section of the game's properties.

3. Observe `ck3` process via Task Manager or `top`.

4. Monitor the game's log files in `Paradox Interactive/Crusader Kings III/logs/` inside the user's `Documents/` (Windows, macOS) or `.local/share/` (Linux) folder.

**Expected result:** `ck3` process runs in the background without displaying a window, loads into an observer game at the bookmark with the biggest `weight` and starts the in-game simulation, all the while writing output to log files (including `game.log`, `debug.log`, `dedicated_server.log` and `error.log`).

**Actual result:** `ck3` process crashes after several seconds, with minimal output in the logs; one can see either a crash reporter window (if running in a graphical environment) or corresponding error messages in the terminal.

Attached are crash dumps from running the vanilla CK3 v1.16.2.3 with `-nographics` on Windows, Linux and macOS.

Game Version​

1.16.2.3

Platform​

Other (Please Specify)

Additional Information​

Affected Feature​

  • Crashes
  • Modding

Save Game​



Other Attachments​

View attachment ck3_20250604_212438-nographics-crash-windows.zipView attachment ck3_20250604_182215-nographics-crash-linux.zipView attachment ck3_20250604_213153-nographics-crash-macos.zip

 
Last edited:
  • 3Like
Reactions:
For any other modders, whose work might be affected by this bug, as a partial workaround on Linux the game can be run effectively headless using a combination of LLVMpipe - a Vulkan-capable software rasterizer and Xvfb - a virtual display server. Provided these two are installed in the environment, it's possible to run the game without actual graphics output on a GPU-less system using the following command (from the game's install directory):
xvfb-run --server-args="-screen 0 80x60x24" binaries/ck3 -benchmark

This example uses a virtual screen resolution of 80x60 - this is the lowest resolution I found, at which ck3 doesn't crash. Lowering it to this comical degree minimizes the added CPU load from software rendering to the point where loading onto the map takes "only" 2 to 3 times longer than -nographics mode did back on 1.15 and earlier.

-benchmark just makes sure CK3 automatically starts simulating an observer game after loading, similar to what -nographics would do. The time that the simulation will run for until exiting can be adjusted via the BENCHMARK_TEST_DURATION define (inside common/defines/00_defines.txt in vanilla).
 
Last edited: