Closed
Description
I tried upgrading typescript versions from 2.3.4
to 2.4.1
. Now it runs out of memory.
I don't know how to debug running out of memory. Happy to spend time trying things out and reporting back if there's specific tests that would be interesting or helpful.
TypeScript Version: 2.4.1
Node Version: 6.7.0
Code
// A *self-contained* demonstration of the problem follows...
It's a large project, not sure what is causing the problem.
Expected behavior:
1:40:03 PM - Compilation complete. Watching for file changes.
Actual behavior:
<--- Last few GCs --->
35596 ms: Mark-sweep 1334.8 (1437.1) -> 1334.8 (1437.1) MB, 1631.3 / 0.0 ms [allocation failure] [GC in old space requested].
37232 ms: Mark-sweep 1334.8 (1437.1) -> 1334.8 (1437.1) MB, 1635.4 / 0.0 ms [allocation failure] [GC in old space requested].
38886 ms: Mark-sweep 1334.8 (1437.1) -> 1339.3 (1421.1) MB, 1653.6 / 0.0 ms [last resort gc].
40580 ms: Mark-sweep 1339.3 (1421.1) -> 1343.8 (1421.1) MB, 1693.5 / 0.0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x151304fcfb51 <JS Object>
2: inferFromTypes [~/node_modules/typescript/lib/tsc.js:30232] [pc=0x31d630ac975f] (this=0x151304fe6ec1 <JS Global Object>,source=0x34615336f7a1 <a Type with map 0x106d8495dac1>,target=0x2c44e3c24721 <a Type with map 0x106d8495e099>)
3: inferFromProperties [~/node_modules/typescript/lib/tsc.js:~30292] [pc=0x31d630abaebe] (thi...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
5: v8::internal::Factory::NumberToString(v8::internal::Handle<v8::internal::Object>, bool) [/usr/local/bin/node]
6: v8::internal::Runtime_NumberToStringSkipCache(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x31d6302079a7
8: 0x31d6308b39ba
9: 0x31d630ac975f
sh: line 1: 68242 Abort trap: 6 tsc --watch
error Command failed with exit code 134.