Skip to content

Windows GMRT 0.21.0 blocks all writes to the save area, including relative paths like "options.json" #15933

Description

@gm-bug-reporter

Description

On Windows GMRT / GMRT VM 0.21.0, writes to the sandbox save folder fail even when using a relative filename. The same code works on GMS2 VM and YYC.
game_save_id is correct and directory_exists(game_save_id) returns 1. Writing "options.json" or file_text_open_write("options_probe.txt") logs:

Not allowing file operation with filename 'C:\Users<user>\AppData\Local<game>\options.json'.
Error: Failed to create directories for '': The system cannot find the path specified.

file_text_open_write returns handle 1, but file_exists is 0 and no file is created.
The same failure happens with a subfolder (directory_create("cfg"), "cfg/options_probe.txt").
Writing to working_directory + "options_probe.txt" (GMRT build assets folder) is remapped to C:\Users<user>\AppData\Local<game>\assets\options_probe.txt and also blocked.
“Disable file system sandbox” does not change this.
This is not issue #13698. That ticket is sandbox-off still blocking paths outside the save area. Here, relative names inside the save area are rejected.

Expected change:
buffer_save(buf, "options.json"), file_text_open_write("options.json"), and directory_create("cfg") should create files/folders under game_save_id, matching GMS2 VM/YYC. A relative filename should not trigger create directories for ''.

Steps To Reproduce

  1. GameMaker LTS 2026, GMRT 0.21.0 via Package Manager.
  2. Target Windows --> GMRT VM.
  3. New empty project, one object, Create event:

show_debug_message("save dir = " + game_save_id);
show_debug_message("dir exists = " + string(directory_exists(game_save_id)));

var _probe = file_text_open_write("options_probe.txt");
show_debug_message("probe handle = " + string(_probe));
if (_probe != -1)
{
file_text_write_string(_probe, "ok");
file_text_close(_probe);
}
show_debug_message("probe exists = " + string(file_exists("options_probe.txt")));

  1. Run. File is not created; log shows the errors above.
  2. Run the same project on Windows VM. The file is created under %LOCALAPPDATA%<game>.

Always reproduces. OS: Windows. Platform: Windows GMRT VM.
Untested on other platforms.

Which version of GMRT are you reporting this issue for?

IDE v2026.0.0.16 GMRT 0.16.0

Which operating system(s) are you seeing the problem on?

Windows 10.0.26200.0

Which platform(s) are you seeing the problem on?

Windows

Attached Files

  • SaveOptions.gml

09d41cf8-9823-4cdf-9086-4c005fccbe4b

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gmrt-bugIn-game bugs with the "GMRT" runtimesprojectThis issue has a sample project attached

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions