Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory #481

Closed
jgw96 opened this issue Nov 28, 2016 · 2 comments
Closed

Comments

@jgw96
Copy link
Contributor

jgw96 commented Nov 28, 2016

From @vinnchan on November 26, 2016 1:14

Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

I ionic android built my app and got this error:

Chans-MacBook-Air:Webbpages chandecweng$ ionic build android

ionic-hello-world@ ionic:build /Users/chandecweng/Webbpages
ionic-app-scripts build

[08:56:42] ionic-app-scripts 0.0.46
[08:56:42] build prod started ...
[08:56:42] clean started ...
[08:56:42] clean finished in 9 ms
[08:56:42] copy started ...
[08:56:42] ngc started ...
[08:56:42] copy: Error copying "/Users/chandecweng/Webbpages/node_modules/ionic-angular/fonts" to
"/Users/chandecweng/Webbpages/www/assets/fonts"
[08:56:42] copy finished in 187 ms
[08:57:31] ngc finished in 48.71 s
[08:57:31] webpack started ...
[08:57:48] webpack finished in 17.63 s
[08:57:48] uglifyjs started ...
[08:57:48] sass started ...
[08:58:20] uglifyjs finished in 31.20 s
[08:59:25] sass finished in 96.37 s
[08:59:25] cleancss started ...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

<--- Last few GCs --->

148696 ms: Scavenge 1394.1 (1451.5) -> 1394.1 (1451.5) MB, 4.5 / 0 ms (+ 3.6 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
149589 ms: Mark-sweep 1394.1 (1451.5) -> 1389.4 (1451.5) MB, 893.1 / 0 ms (+ 16.2 ms in 73 steps since start of marking, biggest step 3.6 ms) [last resort gc].
150585 ms: Mark-sweep 1389.4 (1451.5) -> 1390.8 (1451.5) MB, 995.7 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x3326643e3ac1
1: allCombinations(aka allCombinations) [/Users/chandecweng/Webbpages/node_modules/clean-css/lib/selectors/restructure.js:~128] [pc=0x17cbe1f10312] (this=0x332664304189 ,tokensVariant=0x27c2c1936ba9 <JS Array[11137]>,propertySize=10,propertiesCount=1,level=1)
2: findAllFits(aka findAllFits) [/Users/chandecweng/Webbpages/node_modules/clean-css/lib/selectors/restructure.js:~123...

ANDROID_HOME=/Users/chandecweng/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

Subproject Path: CordovaLib

Incremental java compilation is an incubating feature.

Expected behavior:

I want to create dynamic color change for my app

Example:
<ion-navbar [color]="barColor">
...

@component({
templateUrl: 'build/pages/about/about.html'
})
export class AboutPage {
barColor: string;

constructor(private nav: NavController, platform: Platform) {
this.barColor = platform.is('android') ? 'primary' : 'light';
}
}

Any other way to create dynamic color change ?

Steps to reproduce:

Related code:

insert any relevant code here

I think because I added color variables into variables.scss:

$colors: (
primary: #DC4437,
secondary: #36ACE2,
danger: #f53d3d,
light: #FFFFFF,
dark: #222,
bgColor: #EBEBEC,
facebook: #3B5999,
googleplus: #DD4C39,
gray: #999,
red: #f44336,
red-50: #ffebee,
red-100: #ffcdd2,
red-200: #ef9a9a,
red-300: #e57373,
red-400: #ef5350,
pink: #e91e63,
pink-50: #fce4ec,
pink-100: #f8bbd0,
pink-200: #f48fb1,
pink-300: #f06292,
pink-400: #ec407a,
purple: #9c27b0,
purple-50: #f3e5f5,
purple-100: #e1bee7,
purple-200: #ce93d8,
purple-300: #ba68c8,
purple-400: #ab47bc,
deep-purple: #673ab7,
deep-purple-50: #ede7f6,
deep-purple-100: #d1c4e9,
deep-purple-200: #b39ddb,
deep-purple-300: #9575cd,
deep-purple-400: #7e57c2,
indigo: #3f51b5,
indigo-50: #e8eaf6,
indigo-100: #c5cae9,
indigo-200: #9fa8da,
indigo-300: #7986cb,
indigo-400: #5c6bc0,
blue: #2196f3,
blue-50: #e3f2fd,
blue-100: #bbdefb,
blue-200: #90caf9,
blue-300: #64b5f6,
blue-400: #42a5f5,
light-blue: #03a9f4,
light-blue-50: #e1f5fe,
light-blue-100: #b3e5fc,
light-blue-200: #81d4fa,
light-blue-300: #4fc3f7,
light-blue-400: #29b6f6,
cyan: #00bcd4,
cyan-50: #e0f7fa,
cyan-100: #b2ebf2,
cyan-200: #80deea,
cyan-300: #4dd0e1,
cyan-400: #26c6da,
teal: #009688,
teal-50: #e0f2f1,
teal-100: #b2dfdb,
teal-200: #80cbc4,
teal-300: #4db6ac,
teal-400: #26a69a,
green: #4caf50,
green-50: #e8f5e9,
green-100: #c8e6c9,
green-200: #a5d6a7,
green-300: #81c784,
green-400: #66bb6a,
light-green: #8bc34a,
light-green-50: #f1f8e9,
light-green-100: #dcedc8,
light-green-200: #c5e1a5,
light-green-300: #aed581,
light-green-400: #9ccc65,
lime: #cddc39,
lime-50: #f9fbe7,
lime-100: #f0f4c3,
lime-200: #e6ee9c,
lime-300: #dce775,
lime-400: #d4e157,
yellow: #ffeb3b,
yellow-50: #fffde7,
yellow-100: #fff9c4,
yellow-200: #fff59d,
yellow-300: #fff176,
yellow-400: #ffee58,
amber: #ffc107,
amber-50: #fff8e1,
amber-100: #ffecb3,
amber-200: #ffe082,
amber-300: #ffd54f,
amber-400: #ffca28,
orange: #ff9800,
orange-50: #fff3e0,
orange-100: #ffe0b2,
orange-200: #ffcc80,
orange-300: #ffb74d,
orange-400: #ffa726,
deep-orange: #ff5722,
deep-orange-50: #fbe9e7,
deep-orange-100: #ffccbc,
deep-orange-200: #ffab91,
deep-orange-300: #ff8a65,
deep-orange-400: #ff7043
);
Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.13
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: 1.8.6
ios-sim version: 5.0.4
OS: macOS Sierra
Node Version: v5.12.0
Xcode version: Xcode 8.1 Build version 8B62

Copied from original issue: ionic-team/ionic-framework#9357

@vohtaski
Copy link

vohtaski commented Dec 24, 2016

Don't know if it's related or not, but I have a similar (related) problem.
First time I load ionic serve it works, as soon as I do a change in any file,
it breaks with the following log:

[12:45:36]  build started ...
[12:45:36]  transpile update started ...
[12:45:36]  transpile update finished in 323 ms
[12:45:36]  rollup update started ...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1:
<--- Last few GCs --->

  459152 ms: Mark-sweep 1292.2 (1439.0) -> 1291.8 (1439.0) MB, 1169.4 / 0.0 ms [allocation failure] [GC in old space requested].
  460333 ms: Mark-sweep 1291.8 (1439.0) -> 1291.8 (1439.0) MB, 1181.4 / 0.0 ms [allocation failure] [GC in old space requested].
  461544 ms: Mark-sweep 1291.8 (1439.0) -> 1302.2 (1423.0) MB, 1210.2 / 0.0 ms [last resort gc].
  462758 ms: Mark-sweep 1302.2 (1423.0) -> 1312.8 (1423.0) MB, 1214.2 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x37d3b8ccfb51 <JS Object>
    1: map [native array.js:~994] [pc=0x29046a70ba22] (this=0x2ca3a4461561 <JS Array[174733]>,bq=0x2001e8f0be01 <JS Function (SharedFunctionInfo 0x207298e9fa89)>,br=0x37d3b8c04381 <undefined>)
    2: arguments adaptor frame: 1->2
    3: traceMappings [/Users/***/node_modules/rollup/dist/rollup.js:8411] [pc=0x290469ff1b68] (this=0x2001e8f0beb9 <a Link with map 0x8b56dd11b99...

node::Abort() [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 4: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 5: v8::internal::Factory::NumberToString(v8::internal::Handle<v8::internal::Object>, bool)
[/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 6: v8::internal::Object::ToString(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>) [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 7: v8::internal::Object::ConvertToName(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>) [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 8: v8::internal::Runtime_HasProperty(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/***/.nvm/versions/node/v6.9.1/bin/node]
 9: 0x290467a092a7
$ ionic info

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.13
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

@danbucholtz
Copy link
Contributor

The issue is too many colors. Please remove some of the colors and try again. It is outside of the scope of Ionic to resolve I think.

Thanks,
Dan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants