Allocation failed - process out of memory
See original GitHub issueI’m getting a ‘FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory error’ while trying to sync changes using livesync. The only fancy stuff i’m doing is through the following function, which uses the native Android API to apply a linear gradient to a given View:
export function setupBackgroundGradient(view: View, colorCodes: string[], stops: number[]) {
var backgroundDrawable = new android.graphics.drawable.GradientDrawable();
var colors = [];
colorCodes.forEach(function(c) {
let color = new Color(c);
colors.push(color.android);
});
backgroundDrawable.setColors(colors);
backgroundDrawable.setGradientType(0); // Linear Gradient
var orientation = android.graphics.drawable.GradientDrawable.Orientation.LEFT_RIGHT;
backgroundDrawable.setOrientation(orientation);
backgroundDrawable.setAlpha(225);
view.android.setBackgroundDrawable(backgroundDrawable);
}
The log trace is the following:
10:26:55 PM - File change detected. Starting incremental compilation...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
<--- Last few GCs --->
170921 ms: Scavenge 1388.6 (1456.5) -> 1388.6 (1456.5) MB, 7.9 / 0 ms (+ 1.8 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
172462 ms: Mark-sweep 1388.6 (1456.5) -> 1388.5 (1456.5) MB, 1540.4 / 0 ms (+ 3.9 ms in 23 steps since start of marking, biggest step 1.8 ms) [last resort gc].
173984 ms: Mark-sweep 1388.5 (1456.5) -> 1388.5 (1456.5) MB, 1522.1 / 0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x98f621b4629 <JS Object>
1: modifierToFlag [/home/bruno/workspace/Signup-Test/node_modules/typescript/lib/tsc.js:~5365] [pc=0x9cd044e7cc3] (this=0x24d1bbcb35b9 <an Object with map 0x2997c117b269>,token=111)
2: checkGrammarModifiers(aka checkGrammarModifiers) [/home/bruno/workspace/Signup-Test/node_modules/typescript/lib/tsc.js:23930] [pc=0x9cd01816162] (this=0x98f621041b9 <undefined>,node=0x160...
What’s strange is that this doesn’t come up 100% of the time, and not only when I make a change to the file containing the setBackgroundGradient function… and when I restart livesync, it works perfectly fine, at least for the first compilation.
Any idea where that might be coming from?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Node.js "FATAL ERROR: JS Allocation failed - process out of ...
Based upon my assumption above, a 10-minute-old heap dump is insufficient (since the object would have not resided in memory). node.js · Share....
Read more >Allocation failed - process out of memory · Issue #13018
I checked it because I did a "htop" to see the resources of the machine (in my Digital Ocean of 1G RAM). The...
Read more >How to solve process out of memory in Node.js | by Vuong Tran
This error occurs when the memory allocated for the execution application is less than the required memory when run application.
Read more >FATAL ERROR: Zone Allocation failed - process out of memory
Guys, I have Created Pipeline in azure devops that continuous build and deploy my node js project on my azure virtual machine iis...
Read more >How to solve "Process out of Memory Exception" in Node.js
In this article, we will learn how to solve the ProcessOutOfMemory exception in NodeJS. Process out of Memory Exception is an exception that ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solution with increasing the max_old_space_size`` is discussed here.
Closing due to inactivity.
It’s really annoying, trying to figure out how to increase this with
--max_old_space_size=4096