#grey screen of death
50 messages · Page 1 of 1 (latest)
Yes. I beta tested the PRs back on the Roo side. Dan was always concerned about memory usage but it never was a problem.
I literally tested CBI the two weekends on 12 different codebases. CBI has issues, but I dont think memory is one of them.
I am curious if @nimble mural 's task history clearout has kept the GSOD's at bay for him
Thanks, I will turn off codebase indexing and keep working, and report back later. As I can guarantee crash when I keep working in a single entry.
It may not be codebase indexing, still crashed when it is off.
No sorry for the confusion i don't think it has to do with codebase indexing
@dusty lichen @midnight pumice @boreal axle FYI
V8 uses a sophisticated memory management system designed for high-performance JavaScript execution:
Memory Spaces
-
Young Space (Fast Allocation)
- Eden: New objects are allocated here first
- Survivor Spaces: Two semi-spaces (S0, S1) for objects that survive garbage collection
- Uses bump allocation (very fast, just increments a pointer)
- Small objects (< 1MB) go here initially
-
Old Space (Long-lived Objects)
- Old Pointer Space: Objects containing pointers to other objects
- Old Data Space: Objects containing only raw data (no pointers)
- Uses mark-sweep-compact garbage collection
- Objects promoted from Young Space or allocated directly here
-
Large Object Space
- Objects ≥ 1MB go directly here
- No compaction (to avoid expensive moves)
- Managed with mark-sweep only
Garbage Collection Strategy
V8 uses a generational garbage collection approach:
- Minor GC (Scavenge): Fast collection of Young Space
- Major GC (Mark-Sweep-Compact): Full heap collection when needed
- Incremental Marking: Background marking to reduce pause times
- Concurrent Sweeping: Parallel sweeping during execution
Memory Limits
- Default Heap Size: ~1.4GB on 64-bit systems
- Young Space: ~16-64MB (configurable)
- Old Space: Rest of the heap
- V8 Flags: Can be tuned with
--max-old-space-size,--max-new-space-size, etc.
Why This Matters for VS Code Extensions
VS Code extensions run in a Node.js process powered by V8. Memory fragmentation occurs when:
- Frequent large allocations create holes in the Old Space
- No compaction means holes can't be filled efficiently
- GC pressure increases as free memory becomes scattered
- Extension crashes when approaching the ~1.4GB limit
Avoid global variables
This advice is wildly funny seeing its for JavaScript, the 2nd most promiscuously re-definable language in existence, right after LISP 😂
GSOD is caused by memory fragmentation under V8 with frequent large allocations 🙂
Scrolled through here and didn't see this mentioned so sharing my workaround when I get GSOD: Open VScode top search type >R and select (Developer: Reload Window), then I open KiloCode histoy to repoen the last conversation and click Resume.
I am getting the grey screen every hour.
Details and screenshots if you think anything different is happening to cause it for you please.
Using claude code with Kilo. Flutter app. Very frequent crashes
Several times a day consistently
Did you try "Open VScode top search type >R and select (Developer: Reload Window), then open KiloCode histoy to repoen the last conversation and click Resume." ??
Reloading is impossible in most cases, as the entire vscode freezes. But after restarting, yes, I can continue the conversation
If your entire VScode is locking up there is also a decent chance you also run out of RAM. have you checked your resources in task manager when it happens?
No, it's a 64GB Mac. And I'm constantly monitoring my resources.
damn, then I am out of ideas, Mac is not my territory, sorry :/
The same thing sometimes happened in RooCode, by the way
Dont use Roo, only Kilo and Copilot mostly (dabbing with a few CLI's here and there)
I encountered a grey screen issue when I asked "VN president" in Orchestrator mode using the Playwright MCP server.
It consumed around 9M input tokens and about 6K output tokens in ~1h before the issue happened
I clicked this button and resume the task
Roo updated with possible grey screen fix
It might be a big enough leak to have severely mitigated the earliest of it. Sending large things across the church and state boundary, is recipe for leaks if not cleaned up or passed over correctly
I got this when scrolling back up through the message stream to find a particular part i wanted to reread. It was long about 230k worth of tokens and it was lagging as it does and then boom....Grey Screen of Death. I was idle at the time so no api calls or any other sort of processing going on.
Yeah this is the infamous gray screen. It is caused by excessive memory usage in the view layer of vs code, so no calls, but you looking at a lot of data in the ui sounds in line. Actually, if you could reproduce it and are able (not sure how private this code/chat is) to share the session it might help us pinpoint a cause
Actually that makes a lot of sense. I was on a debugging loop over about 8 hours and hadn'r started a refresh so plewnty of compacting going on. I can't share or reproduce....sorry.
No worries. Try to break it up next time with orchestrator, or use /newtask, or manually start anew. Typically when you have such a long session the quality of llm responses will decrease as well
Orchestrator is overall an excellent choice for large things. Costs a few Kilo bucks but makes all the Subtasks much smaller and less prone to GSOD
I don't know if someone has observed this or not but this death grey screen is appearing when:
- The ram is low
- Spike in context size of the model
- again the sudden ram usage spike which when checked later after the grey screen appears normal because kilo process become low
so conclusion i solved for my system is increased the ram size and dedicated some space to kilo only to work and making sure that my context size is under limit.
You say spike of context size, so it lowers again? This would imply it has something to do with condensing?
well my apologies first for not knowing the exact keywords for as i'm just a founder of not so popular tech company and doesn't know that much about ai.
So back to the topic yes context size lowers again because of crash along with the ram usage of kilo code and yes there maybe some issue with context size and ram
Like you know when we run a unoptimized game in beta testing or some heavy website
that at somepoint use so much of specs and then right after the next second lowers it beast mode running everything smoothly
and in my case when im facing this issue i just though that maybe my pc is mid spec so i upgraded the ram and after that i never faced this issue
My old limit for opening vs code kilo extension is 3 and when i drop a context very lengthy bomb over kilo it crashes and now i can open 5 window do things smoothly in chunks making sure that atleast 4gb of ram is on standby and i'm good
it's getting very lengthy so if you want me to test something crazy just dm me i sit around 15 hours a day in front of my screen so i can help and contribute more
CYA
@dusty lichen
Thx, that's helpful. Then we can at least look into whether something is happening around context condensing. I do agree with your experience btw; I have a high spec pc and almost never run into grey screen even when running a lot of vscode/kilo in parallel
Whats odd is for RooCode they had it fixed in: 3.28.18, then shortly after there was a regression. Has anyone done a diff since? Almost like someone didn't git fetch before subsequent release. Anything the 3 projects can learn from that release?
Also tested 3.28.18 myself, no issues with GSOD.
IIRC they removed responses from going back into the history (if you go search Roo # General you can see Hannes' Eureka! Moment)
But it think it caused an issue if you rolled back and tried to resume a conversation
I believe this grey-screen issue is more likely tied to context length than to my PC’s hardware.
I'm using an Intel Core i7-14700K, 1.5 TB SSD, 32 GB RAM and an RTX 3060 and I still have plenty of free RAM when the grey screen appears. I suspect the "Context Condensed" feature may be causing the fault.
Has anyone else been able to reproduce this bug?
That's really strange.
I haven't seen it in a long time, so I thought KiloCode had already fixed it :v