Crash Reports and Crash Dumps

Last modified by Ketraar on 2023/07/14 10:46

Introduction

When a game (or other application) crashes, it can be difficult to work out what has caused the crash. There are many different reasons for a program to crash. These can include:

  • a bug in the game/application itself (e.g. trying to use an invalid memory address, failing to handle an exception which occurred, running into undefined behaviour which ends up trying to allocate too many resources such as memory, etc.)
  • a bug in a third-party program/tool, which is either used by the game or hooks itself into the game, to perform its own functionality (such as improving graphical effects or recording the video/audio in order to be able to stream it)
  • hardware failures causing undefined behaviour in the application or the operating system (OS)
  • countless other possibilities

The outcome for the player, however, is always the same; the game/application crashes and they end up back on the Desktop.

So, while all crashes may appear the same to the player, they may actually be completely different things from a developer's point of view. The problem for the developer is to figure out what the cause of a crash is.

One way to approach this, is to collect relevant application details from when the crash occurred. These are contained in packages called crash dumps.

These crash dumps contain useful information (such as what part of the code was running when it crashed - known as the callstack, what was in memory, the other code modules - known as DLLs - running on the computer, basic information about the OS and the computer/environment, etc.). This is a good starting point for the developer to help them distinguish between different types of crashes, and can often be a good hint towards identifying (and possibly fixing) the cause of the crash.

Crash dumps in X4: Foundations and redirect pages

In X4: Foundations, we normally generate so-called "mini-dumps" instead of full crash dumps. Mini-dumps only contain the essential information about a crash, such as the callstack. They do not contain a full dump of the memory used by the game. By default, when a crash occurs, information about the exact location in the game code where the crash occurred is sent to a server. The server looks up the details and checks if the crash is already known, and whether troubleshooting pages containing additional details are available. If so, the browser will open the corresponding troubleshooting page, which will give further information about the crash, such as available workarounds, updates on the status of the crash investigation, step-by-step-instructions for the user to resolve the issue (if it's an issue outside the game such as a driver installation issue on the local machine), and so on.

In addition to that, the crash dump and some other related information (such as the memory consumption of the game at the time the crash occurred, the list of installed and active mods, the last few errors in the log, etc.) are uploaded to the server so that it is available to developers investigating the cause of the crash.

If you don't want crash details to be uploaded to the server, you can opt out of this functionality in-game via the Options Menu -> Settings -> Privacy Settings and set Send crash reports to NO.

CrashReport1.png

Please be aware that if this option is disabled, you also won't be redirected to the troubleshooting pages.

Privacy Policy and crash reports

We do not intentionally include any personal details when crash reports are sent to us. We cannot guarantee that crash reports won't include any personal information at all (e.g. if it ends up on the callstack data which is part of the crashdump), but the chances of this happening are very small. Note that the game encrypts personalised data that it uses itself, such as a username entered for the online "Venture" feature, so this would never appear in plain text in the crash report.

This does mean, however, that we won't be able to tell which individual player ran into which particular crash based on the records we have on the servers.

In certain cases this could be problematic, for example if we need to get in touch with affected players to further troubleshoot a crash. In such cases, we might ask individual users who contacted us about a crash to enable personalised crash reports. With this setting enabled (Options Menu -> Settings -> Privacy Settings -> Personalised crash reports), a unique identifier is assigned to all crash reports coming from each user, which allows us to identify that user's crash reports on our server.

Please be aware that enabling this setting is really only useful if you've been asked to do so by our support team. Enabling it yourself, without investigation of a particular crash being in progress, does not provide us with useful additional data. Also note that, although the identifier is personalised, we do not have the means to identify a user directly using the identifier alone.

Locating local crash reports

Regardless of whether you opted to send crash reports automatically to the server, a copy of the crash dump is also stored locally on your computer. The game stores the dump file in the same location as the game executable (X4.exe), and names the files using the following format: X4_[VERSIONNUMBER]_[TIMESTAMP].dmp

For example, for a crash happening in version 5.10 of the game, at 15:10:20 on 2022-03-23, the corresponding dump file created by the game would be called X4_510_2022_03_23_15_10_20.dmp.

The primary purpose of these local crash dump files is to enable the support team to request them while investigating a particular crash, either because the user was not redirected to a corresponding troubleshooting page, or simply because the crash dump might contain further information that might be useful to the investigation.

To find the location of the crash dump file:

Steam

  1. In Steam, go to LIBRARY (1), right click X4: Foundations (2) and click on Properties... (3)
    CrashReport2.png
  2. In the "X4: Foundations - Properties" window click on LOCAL FILES (1) and then on BROWSE LOCAL FILES... (2)
    CrashReport3.png

This should bring up a Windows Explorer window, showing the folder where the X4.exe and the dump files are located.

GOG

In the GOG Galaxy client, select X4: Foundations (1), click on MORE (2), select Manage installation (3), and finally click on Show folder (4).

CrashReport4.png

This should bring up a Windows Explorer window, showing the folder where the X4.exe and the dump files are located.