Tracking File Access - Lumberyard User Guide

Tracking File Access

Open 3D Engine (O3DE), the successor to Lumberyard, is now available in Developer Preview. Download O3DE or visit the AWS Game Tech blog to learn more.

It's possible to track invalid file reads that occur during game run time. The error message Invalid File Access occurs when an attempt is made to read or open files from a thread that is not the streaming thread. These file access operations can cause stalls that can be quite severe.


Only access attempts from the main thread and render thread are logged. This feature is disabled in RELEASE builds.


The following console variables enable different options for tracking file access.


1 (default):

  • Access is logged to game.log.

  • Generates a perfHUD warning.

  • The warning is displayed in red in the upper left corner of the screen.

  • A 3 second-stall in non-release builds is induced.


  • When a file is accessed, creates a popup dialog on the PC. At this point, you can choose to break into the debugger, or continue.

Where invalid access is defined

The points which define when a file access attempt is considered invalid are set by implementing ICryPak::DisableRuntimeFileAccess to return true or false. The points may need to be tweaked for single player and multiplayer games.


To add exceptions to file access tracking so that you can ignore files like game.log, create an instance of CDebugAllowFileAccess in the scope which accesses the file.

Resolving file access callstacks

The files that you collect with pak_LogInvalidFileAccess 2 must have their callstacks resolved. To do this requires the following tools from the XenonStackParse folder of the Tools directory.:

  • The .pdb files from the build

  • The XenonStackParse tool

  • The helper script

The directory structure for running should resemble the following:

<Root> --> XenonStackParse --> FileAccessLogs (this folder should contain the .pdb files) ------> Processed (this folder contains the output from XenonStackParse)

Run from the FileAccessLogs directory (XenonStackParse uses the working directory to search for the .pdb files). The script creates a folder called Processed and a file within it that contains the resolved callstack for each of the log files.