Skip to content

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #11032

@smileBeda

Description

@smileBeda

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

Version 260206.1448 (565)

What subscription do you have?

PRO

What issue are you seeing?

Sporadic crashes - lately basically after a few minutes, mid-work.

When opening the app with /Applications/Codex.app/Contents/MacOS/Codex I can see the error and it says:

...
...
[electron-message-handler] Received app server result: 30805ea9-89a8-40c9-97f3-64b71746ee12 object(keys=1)

<--- Last few GCs --->

[51691:0x134037b0000]   101497 ms: Mark-Compact (reduce) 3996.8 (4003.6) -> 3996.8 (4003.6) MB, pooled: 0.0 MB, 57.65 / 0.00 ms (average mu = 0.002, current mu = 0.000) last resort; GC in old space requested
[51691:0x134037b0000]   101553 ms: Mark-Compact (reduce) 3996.8 (4003.6) -> 3996.8 (4003.6) MB, pooled: 0.0 MB, 55.16 / 0.00 ms (average mu = 0.001, current mu = 0.000) last resort; GC in old space requested

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0x1102971a4 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x110f7bbf0 v8::PropertyDescriptor::set() const [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x110f7bb7c v8::PropertyDescriptor::set() const [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x111061af4 v8::CppHeap::CollectGarbageInYoungGenerationForTesting(cppgc::EmbedderStackState) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 5: 0x10f2f6330 v8::Isolate::LowMemoryNotification() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 6: 0x10ea662e4 rust_png$cxxbridge1$Reader$has_actl_chunk [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x10e2908b8 v8::internal::compiler::CompilationDependencies::DependOnNoSlackTrackingChange(v8::internal::compiler::MapRef) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x10e290644 v8::internal::compiler::CompilationDependencies::DependOnNoSlackTrackingChange(v8::internal::compiler::MapRef) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x157eb5854 
10: 0x157e0a9bc 
11: 0x157e0a2b8 
12: 0x150200b24 
13: 0x1503e7e10 
14: 0x1502073c4 
15: 0x1501b8ae4 
16: 0x1501a5544 
17: 0x1501ae460 
18: 0x150198fe8 
19: 0x157e0e38c 
20: 0x157e0e38c 
21: 0x157e4e404 
22: 0x157f2ddd8 
23: 0x157e3cfa8 
24: 0x157e0b274 
25: 0x10d64e488 v8::Function::NewInstanceWithSideEffectType(v8::Local<v8::Context>, int, v8::Local<v8::Value>*, v8::SideEffectType) const [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
26: 0x10d662010 v8::MicrotasksScope::~MicrotasksScope() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
27: 0x10d661fb0 v8::MicrotasksScope::~MicrotasksScope() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
28: 0x10d661bf8 v8::BackingStore::~BackingStore() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
29: 0x1101a7f64 node::InternalCallbackScope::Close() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
30: 0x1101a82d4 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context, v8::Local<v8::Value>) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
31: 0x1101b78e0 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
32: 0x110229988 node::HandleWrap::OnClose(uv_handle_s*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
33: 0x10ff4f194 uv_run [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
34: 0x1101a8c20 node::SpinEventLoopInternal(node::Environment*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
35: 0x1103e4448 node::worker::Worker::Run() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
36: 0x1103ea200 _register_external_reference_worker(node::ExternalReferenceRegistry*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
37: 0x191f59c08 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
38: 0x191f54ba8 thread_start [/usr/lib/system/libsystem_pthread.dylib]
[0207/173651.660955:WARNING:third_party/crashpad/crashpad/util/process/process_memory_mac.cc:94] mach_vm_read(0x16d24c000, 0x8000): (os/kern) invalid address (1)
[0207/173651.924005:WARNING:third_party/crashpad/crashpad/util/numeric/in_range_cast.h:38] value -634136515 out of range
zsh: abort      /Applications/Codex.app/Contents/MacOS/Codex

What steps can reproduce the bug?

Open app, communicate, wait for AI, crash.
It is a longer thread, so it might be connected to that.

What is the expected behavior?

NO crashes.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions