Skip to content

[V2 rc0] RangeError: Maximum call stack size exceeded #1433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
okonon opened this issue Sep 29, 2016 · 21 comments
Closed

[V2 rc0] RangeError: Maximum call stack size exceeded #1433

okonon opened this issue Sep 29, 2016 · 21 comments
Assignees

Comments

@okonon
Copy link

okonon commented Sep 29, 2016

Multiple people are getting below arrors. Originally I opened an issue abut it for ionic repository abut i beilive ionic-cli is more appropriate place for it:

ionic-team/ionic-framework#8280

Stack:

[00:52:28]  RangeError: Maximum call stack size exceeded
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:153:20)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/barbarian/TS/greenkey/greenkey-tabs-rc0/node_modules/rollup/dist/rollup.js:165:18)

And also this error is thrown frequently:

[08:36:53]  bundle dev update started ...
<--- Last few GCs --->
 3466571 ms: Mark-sweep 1274.0 (1435.0) -> 1272.4 (1435.0) MB, 1445.4 / 0 ms [allocation failure] [GC in old space requested].
 3468039 ms: Mark-sweep 1272.4 (1435.0) -> 1272.4 (1435.0) MB, 1467.7 / 0 ms [allocation failure] [GC in old space requested].
 3469589 ms: Mark-sweep 1272.4 (1435.0) -> 1272.4 (1435.0) MB, 1549.6 / 0 ms [last resort gc].
 3471091 ms: Mark-sweep 1272.4 (1435.0) -> 1272.4 (1435.0) MB, 1502.6 / 0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x361bce9c9e31 <JS Object>
    1: Join(aka Join) [native array.js:179] [pc=0x4b0bbe181f5] (this=0x361bce904189 <undefined>,w=0x1905f65f2399 <JS Array[94699]>,x=94699,N=0x89790b28e99 <String[1]: ;>,M=0x361bce9b4ab1 <JS Function ConvertToString (SharedFunctionInfo 0x361bce94ef79)>)
    2: InnerArrayJoin(aka InnerArrayJoin) [native array.js:~343] [pc=0x4b0bce12b6c] (this=0x361bce904189 <undefined>,N=0x89790b28e99 <String[1]...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/Cellar/node/6.3.1/bin/node]
 2: 
node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>)
 [/usr/local/Cellar/node/6.3.1/bin/node]
 3: 
v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/Cellar/node/6.3.1/bin/node]
 4: 
v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/Cellar/node/6.3.1/bin/node]
 5: 
v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/Cellar/node/6.3.1/bin/node]
 6: 
v8::internal::Runtime_StringBuilderJoin(int, v8::internal::Object**, v8::internal::Isolate*)
 [/usr/local/Cellar/node/6.3.1/bin/node]

Cordova CLI: 6.3.1
Gulp version:  CLI version 1.2.2
Gulp local:  
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v6.4.0
Xcode version: Xcode 8.0 Build version 8A218a 
@sava999
Copy link

sava999 commented Sep 29, 2016

Same here. "Maximum call stack size exceeded" is happening too often together with "Allocation failed - process out of memory".

And cli is noticeably slower now, before update build never didn't take more that 2.5 seconds now it is around 30 seconds.

@okonon
Copy link
Author

okonon commented Sep 29, 2016

Yeah, i noticed increased time too.

@hoodaajay99
Copy link

Also got "Maximum call stack size exceeded", with live reload / browser refresh not working after that.

@jthoms1 jthoms1 assigned danbucholtz and unassigned danbucholtz Sep 29, 2016
@jthoms1
Copy link
Contributor

jthoms1 commented Sep 29, 2016

@danbucholtz Any insights on this issue? Have you seen it occur before?

@jthoms1 jthoms1 added the build label Sep 29, 2016
@paoesco
Copy link

paoesco commented Sep 29, 2016

Same here.

Your system information:
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Windows 7
Node Version: v6.6.0
Npm version:3.10.8

JS changed:   XXX\www\build\main.js
[14:42:18]  bundle dev update finished in 8.75 s
[14:42:18]  sass started ...
[14:42:18]  sass finished in 14 ms
[14:46:23]  typescript compilation started ...
[14:46:26]  bundle dev update started ...
[14:46:29]  typescript compilation finished in 5.85 s
[14:46:29]  bundle dev update started ...
[14:46:29]  RangeError: Maximum call stack size exceeded
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:153:20)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)
    at deepClone (XXX\node_modules\rollup\dist\rollup.js:165:18)

[14:46:29]  sass started ...
[14:46:29]  sass finished in 30 ms

and also

[14:28:50]  templateUpdate finished in 16.11 s
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

@windwp
Copy link

windwp commented Sep 29, 2016

+1
Your system information:
Cordova CLI: 6.1.1
Gulp version: CLI version 1.2.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS:
Node Version: v4.6.0
Npm version:3.10.8

@jthoms1 jthoms1 self-assigned this Sep 29, 2016
@jthoms1
Copy link
Contributor

jthoms1 commented Sep 29, 2016

The call stack is happening within Rollup's deepClone method. Anyone have a public repo that is currently having this issue? It would help with troubleshooting.

@jthoms1
Copy link
Contributor

jthoms1 commented Sep 29, 2016

I believe I found the issue. The watch process is spawning multiple rollup bundle processes rather than just managing the one. This would greatly increase the memory footprint. I am working on a fix now.

Thanks for reporting this!

@okonon
Copy link
Author

okonon commented Sep 29, 2016

@jthoms1 thanks a lot for looking into this!

@ramonornela
Copy link

@mhartington
Copy link
Contributor

Closed via ionic-team/ionic-app-scripts#44

This should be fixed in the next release of app scripts.

@okonon
Copy link
Author

okonon commented Oct 3, 2016

@mhartington @jthoms1 Maximum call stack size exceeded error is gone but i am seeing the below error still that was occasionally thrown right after Max Stack before (see original issue description for another example).

<--- Last few GCs --->
 3172683 ms: Mark-sweep 1265.3 (1434.4) -> 1265.2 (1434.4) MB, 1549.5 / 0 ms [allocation failure] [GC in old space requested].
 3174187 ms: Mark-sweep 1265.2 (1434.4) -> 1265.0 (1434.4) MB, 1504.3 / 0 ms [allocation failure] [GC in old space requested].
 3175719 ms: Mark-sweep 1265.0 (1434.4) -> 1265.0 (1434.4) MB, 1532.1 / 0 ms [last resort gc].
 3177260 ms: Mark-sweep 1265.0 (1434.4) -> 1265.0 (1434.4) MB, 1541.1 / 0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
    2: arguments adaptor frame: 3->1
Security context: 0x35d29d4c9e31 <JS Object>
    3: InnerArrayForEach(aka InnerArrayForEach) [native array.js:~946] [pc=0x37b82a7f57df] (this=0x35d29d404189 <undefined>,br=0x2b61d5897809 <JS Function (SharedFunctionInfo 0x192b90adbbf1)>,bs=0x35d29d404189 <undefined>,w=0x9dd36daa579 <JS Array[21]>,x=21)
    4: forEach [native array.js:~956] [pc=0x37b82b7954cc] (this=0x9dd36daa579 <JS Array[21]>,br=0x2b6...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 
node::Abort() [/usr/local/Cellar/node/6.3.1/bin/node]
 2: 
node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/Cellar/node/6.3.1/bin/node]
 3: 
v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/Cellar/node/6.3.1/bin/node]

 4: 
v8::internal::V8::FatalProcessOutOfMemory(char const*, bool)
 [/usr/local/Cellar/node/6.3.1/bin/node]
 5: 
v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/usr/local/Cellar/node/6.3.1/bin/node]

 6: 
v8::internal::LCodeGenBase::PopulateDeoptimizationData(v8::internal::Handle<v8::internal::Code>)
 [/usr/local/Cellar/node/6.3.1/bin/node]
 7: 
v8::internal::LChunk::Codegen()
 [/usr/local/Cellar/node/6.3.1/bin/node]
 8: 
v8::internal::OptimizedCompileJob::GenerateCode()
 [/usr/local/Cellar/node/6.3.1/bin/node]
 9: 
v8::internal::Compiler::GetConcurrentlyOptimizedCode(v8::internal::OptimizedCompileJob*)
 [/usr/local/Cellar/node/6.3.1/bin/node]
10: 
v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions()
 [/usr/local/Cellar/node/6.3.1/bin/node]
11: 
v8::internal::Runtime_TryInstallOptimizedCode(int, v8::internal::Object**, v8::internal::Isolate*)
 [/usr/local/Cellar/node/6.3.1/bin/node]
12: 0x37b82900961b

@tuntev
Copy link

tuntev commented Oct 4, 2016

@mhartington @jthoms1 I have @okonon exact same issue after 4-5 changes to the code. The templateUpdate started at around 9.8 secs, then it went up to 12, 13, 18, 40 and it broke.

Lets hope that this issue will be resolved soon.

Note: all packages are at its latest version

@kabus202
Copy link

kabus202 commented Oct 7, 2016

guys, is this related?

08:14:07]  sass started ...
[08:14:07]  sass finished in 16 ms
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:07]  bundle dev update started ...
[08:14:08]  RangeError: Maximum call stack size exceeded



    [08:14:08]  RangeError: Maximum call stack size exceeded
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:163:2)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)
    at deepClone (/Users/kabs/Dev/testapp/node_modules/rollup/dist/rollup.js:165:18)

[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass started ...
[08:14:08]  sass finished in 197 ms
[08:14:08]  sass finished in 187 ms
[08:14:08]  sass finished in 177 ms
[08:14:08]  sass finished in 165 ms
[08:14:08]  sass finished in 153 ms
[08:14:08]  sass finished in 143 ms
[08:14:08]  sass finished in 134 ms
[08:14:08]  sass finished in 123 ms
[08:14:08]  sass finished in 114 ms
[08:14:08]  sass finished in 103 ms
[08:14:08]  sass finished in 94 ms
[08:14:08]  sass finished in 84 ms
[08:14:08]  sass finished in 75 ms
[08:14:08]  sass finished in 65 ms
[08:14:08]  sass finished in 55 ms
[08:14:08]  sass finished in 44 ms
[08:14:08]  sass finished in 34 ms
[08:14:08]  sass finished in 25 ms
[08:14:08]  sass finished in 15 ms
[08:14:13]  bundle dev update finished in 7.48 s
[08:14:13]  sass started ...
[08:14:13]  sass finished in 13 ms
JS changed:   www/build/main.js

@emcniece
Copy link

emcniece commented Oct 7, 2016

@kabus202 looks like it. Try not to save a file while the rebuild is in progress. Oh, and killall node is a quick way to clean up processes.

@danbucholtz
Copy link

@kabus202, try updating to the latest @ionic/app-scripts.

npm install @ionic/app-scripts@latest

Thanks,
Dan

@kabus202
Copy link

kabus202 commented Oct 7, 2016

@danbucholtz, thanks

I'm getting a invalid return on:

└─┬ @ionic/app-scripts@0.0.30 invalid

Log:

ionic-hello-world@ /Users/kabs/Dev/testapp
└─┬ @ionic/app-scripts@0.0.30  invalid
  ├─┬ autoprefixer@6.4.1
  │ └── caniuse-db@1.0.30000548 
  ├─┬ chokidar@1.6.0
  │ ├─┬ is-binary-path@1.0.1
  │ │ └── binary-extensions@1.7.0 
  │ └── path-is-absolute@1.0.1 
  ├─┬ node-sass@3.9.3
  │ ├─┬ meow@3.7.0
  │ │ ├─┬ loud-rejection@1.6.0
  │ │ │ └─┬ currently-unhandled@0.4.1
  │ │ │   └── array-find-index@1.0.2 
  │ │ ├─┬ normalize-package-data@2.3.5
  │ │ │ └─┬ validate-npm-package-license@3.0.1
  │ │ │   └── spdx-expression-parse@1.0.4 
  │ │ └─┬ redent@1.0.0
  │ │   └─┬ indent-string@2.1.0
  │ │     └─┬ repeating@2.0.1
  │ │       └── is-finite@1.0.2 
  │ ├─┬ node-gyp@3.4.0
  │ │ └─┬ osenv@0.1.3
  │ │   ├── os-homedir@1.0.2 
  │ │   └── os-tmpdir@1.0.2 
  │ ├─┬ npmlog@4.0.0
  │ │ └─┬ gauge@2.6.0
  │ │   └─┬ string-width@1.0.2
  │ │     └─┬ code-point-at@1.0.1 
  │ │       └── number-is-nan@1.0.1 
  │ └─┬ request@2.75.0
  │   └─┬ har-validator@2.0.6
  │     └─┬ is-my-json-valid@2.15.0 
  │       └── jsonpointer@4.0.0 
  ├── rollup@0.36.1 
  ├── rollup-plugin-json@2.0.2 
  ├─┬ rollup-plugin-node-builtins@1.2.1 
  │ ├── buffer-es6@4.9.2 
  │ ├─┬ crypto-browserify@3.11.0 
  │ │ ├─┬ browserify-cipher@1.0.0 
  │ │ │ ├─┬ browserify-aes@1.0.6 
  │ │ │ │ └── buffer-xor@1.0.3 
  │ │ │ ├─┬ browserify-des@1.0.0 
  │ │ │ │ └─┬ des.js@1.0.0 
  │ │ │ │   └── minimalistic-assert@1.0.0 
  │ │ │ └── evp_bytestokey@1.0.0 
  │ │ ├─┬ browserify-sign@4.0.0 
  │ │ │ ├── bn.js@4.11.6 
  │ │ │ ├── browserify-rsa@4.0.1 
  │ │ │ ├─┬ elliptic@6.3.2 
  │ │ │ │ ├── brorand@1.0.6 
  │ │ │ │ └── hash.js@1.0.3 
  │ │ │ └─┬ parse-asn1@5.0.0 
  │ │ │   └── asn1.js@4.8.1 
  │ │ ├── create-ecdh@4.0.0 
  │ │ ├─┬ create-hash@1.1.2 
  │ │ │ ├── cipher-base@1.0.3 
  │ │ │ ├── ripemd160@1.0.1 
  │ │ │ └── sha.js@2.4.5 
  │ │ ├── create-hmac@1.1.4 
  │ │ ├─┬ diffie-hellman@5.0.2 
  │ │ │ └── miller-rabin@4.0.0 
  │ │ ├── pbkdf2@3.0.9 
  │ │ ├── public-encrypt@4.0.0 
  │ │ └── randombytes@2.0.3 
  │ └── process-es6@0.11.5 
  ├─┬ rollup-plugin-node-globals@1.0.9 
  │ └── acorn@4.0.3 
  └── tippex@2.2.0 

@alkemist
Copy link

alkemist commented Oct 7, 2016

I updated @ionic/app-scripts@0.0.30 and killall node but always the same error of @okonon

@okonon
Copy link
Author

okonon commented Oct 7, 2016

@Pixocode I am not getting any errors on 0.0.29

@alkemist
Copy link

alkemist commented Oct 7, 2016

@okonon oups ^^" [17:26:57] ionic-app-scripts 0.0.23

@AnkitMaheshwariIn
Copy link

Is this error fixed for anyone ..?
Facing same problem here : https://stackoverflow.com/questions/44897670/error-in-ionic-cordova-build-android-prod

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

No branches or pull requests