openai / openai/codex

Windows: Godot 4.7.1 crashes with memory access error when launched by Codex sandbox, but works in normal PowerShell

Open
#37,809 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug sandbox windows-os
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.805.11740

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

When Codex launches Godot 4.7.1 headlessly on Windows, the Godot process intermittently crashes with a Windows "Application Error" dialog.

Example:

Godot_v4.7.1-stable_win64.exe - Application Error

The instruction at 0x00007FF7... referenced memory at
0x0000000000000058. The memory could not be read.

Click on OK to terminate the program.

Image

I have reproduced this with both:

  • Godot_v4.7.1-stable_win64.exe
  • Godot_v4.7.1-stable_win64_console.exe

The failures occur when Codex launches Godot for project validation.

Godot also reports sandbox related errors when launched by Codex:

  • Could not open 'user://' directory
  • inability to save editor_settings-4.7.tres
  • failure to read the Windows certificate store

The same Godot headless editor command completes normally when I run it manually from a PowerShell session outside Codex.

What steps can reproduce the bug?
  1. Use the Codex app on Windows with a Godot 4.7.1 project.

  2. Ask Codex to make changes to the project and validate them by launching Godot headlessly.

  3. Codex runs a command equivalent to:

Godot_v4.7.1-stable_win64.exe --headless --editor --path . --quit

I have also seen the issue when Codex runs:

Godot_v4.7.1-stable_win64_console.exe --headless --path . --quit-after 2
  1. Intermittently, Windows displays a native application error dialog for the Godot executable saying that memory could not be read.

One observed invalid memory address was:

0x0000000000000058

The dialog is similar to:

Godot_v4.7.1-stable_win64.exe - Application Error

The instruction at 0x... referenced memory at
0x0000000000000058. The memory could not be read.

Click on OK to terminate the program.
  1. Run the equivalent Godot command manually from a normal PowerShell session outside Codex:
& "C:\path\to\Godot_v4.7.1-stable_win64.exe" `
  --headless `
  --path "C:\path\to\project" `
  --editor `
  --quit
  1. Outside Codex, Godot successfully initializes the project and editor:
Godot Engine v4.7.1.stable.official.a13da4feb

[   0% ] first_scan_filesystem | Started Project initialization
...
[ DONE ] first_scan_filesystem

[   0% ] loading_editor_layout | Started Loading editor
...
[ DONE ] loading_editor_layout

No memory-access dialog appears when running the command manually outside Codex.

  1. I also tested Codex with the following Windows configuration:
[windows]
sandbox_private_desktop = false

The Godot memory-access crash still occurred, so disabling the private desktop did not resolve the problem.

The issue therefore appears to depend on Godot being launched from the Codex Windows execution environment rather than the Godot project or command itself.

What is the expected behavior?

Godot should be able to execute headlessly from Codex without crashing.

Particularly:

Godot_v4.7.1-stable_win64.exe --headless --editor --path . --quit

inside Codex should behave the same as running the same command from a PowerShell session.

If the Codex sandbox does not permit the operation, Codex should return a normal sandbox or permission error rather than causing the child process to terminate with a native Windows memory-access violation.

Additional information

Godot version:

Godot Engine v4.7.1.stable.official.a13da4feb

The problem appears specific to Godot being launched from Codex. The same headless editor invocation works from a normal PowerShell session outside Codex.

I initially suspected a RAM issue or a Godot project error, but the command is reproducibly able to initialize successfully outside Codex.

When launched by Codex, Godot has also produced environment/access-related errors involving:

  • user://
  • editor settings
  • the Windows certificate store

I also tested the following Codex Windows configuration:

[windows]
sandbox_private_desktop = false

The memory-access crash still occurred, so disabling the private desktop did not resolve the issue.

I am using Codex to edit a Godot project and run headless validation commands.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Godot headless commands from the Codex Windows sandbox and compare them with the equivalent PowerShell run, including the sandbox_private_desktop setting. Trace the Windows execution environment around the Godot launch and its user://, editor-settings, and certificate-store errors; done means the command runs reliably or returns a normal sandbox or permission error instead of a native memory-access crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot, rust
Domain
devtools, operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.