{"action":"created","issue":{"url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/227","repository_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader","labels_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/227/comments","events_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/227/events","html_url":"https://github.com/s-panferov/awesome-typescript-loader/issues/227","id":175394488,"number":227,"title":"Crashing with out of memory exception","user":{"login":"mvestergaard","id":2027834,"avatar_url":"https://avatars.githubusercontent.com/u/2027834?v=3","gravatar_id":"","url":"https://api.github.com/users/mvestergaard","html_url":"https://github.com/mvestergaard","followers_url":"https://api.github.com/users/mvestergaard/followers","following_url":"https://api.github.com/users/mvestergaard/following{/other_user}","gists_url":"https://api.github.com/users/mvestergaard/gists{/gist_id}","starred_url":"https://api.github.com/users/mvestergaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvestergaard/subscriptions","organizations_url":"https://api.github.com/users/mvestergaard/orgs","repos_url":"https://api.github.com/users/mvestergaard/repos","events_url":"https://api.github.com/users/mvestergaard/events{/privacy}","received_events_url":"https://api.github.com/users/mvestergaard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/labels/need%20more%20info","name":"need more info","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-07T01:54:14Z","updated_at":"2016-09-07T09:42:16Z","closed_at":null,"body":"I'm having a tough time figuring out exactly what/why/when caused this exception to start happening, but I seem to have narrowed it down to only happening after v2.2.1\r\n\r\nWhen running through a webpack dev server and making changes, after a while the process crashes with this exception:\r\n```\r\nError: channel closed\r\n    at ChildProcess.target.send (internal/child_process.js:540:16)\r\n    at runChecker (/Users/mv/dev/js/product-designer/node_modules/awesome-typescript-loader/src/instance.ts:388:22)\r\n    at invokeFunc (/Users/mv/dev/js/product-designer/node_modules/lodash/lodash.js:10024:23)\r\n    at trailingEdge (/Users/mv/dev/js/product-designer/node_modules/lodash/lodash.js:10071:18)\r\n    at Timeout.timerExpired [as _onTimeout] (/Users/mv/dev/js/product-designer/node_modules/lodash/lodash.js:10059:18)\r\n    at tryOnTimeout (timers.js:232:11)\r\n    at Timer.listOnTimeout (timers.js:202:5)\r\n```\r\n\r\nSome of the time it is preceded by this error:\r\n```\r\n<--- Last few GCs --->\r\n\r\n   43983 ms: Mark-sweep 1311.1 (1433.0) -> 1310.9 (1440.0) MB, 1450.2 / 0.0 ms [allocation failure] [GC in old space requested].\r\n   45501 ms: Mark-sweep 1310.9 (1440.0) -> 1310.9 (1440.0) MB, 1518.8 / 0.0 ms [allocation failure] [GC in old space requested].\r\n   47004 ms: Mark-sweep 1310.9 (1440.0) -> 1321.6 (1409.0) MB, 1501.7 / 0.0 ms [last resort gc].\r\n   48543 ms: Mark-sweep 1321.6 (1409.0) -> 1332.6 (1409.0) MB, 1539.4 / 0.0 ms [last resort gc].\r\n\r\n\r\n<--- JS stacktrace --->\r\n\r\n==== JS stack trace =========================================\r\n\r\nSecurity context: 0x1ed0af3cfb51 <JS Object>\r\n    1: createTypeReference [/Users/mv/dev/js/product-designer/node_modules/typescript/lib/typescript.js:~20534] [pc=0x1f1beb71ebba] (this=0x1ed0af3e6ee9 <JS Global Object>,target=0xaf18ff9b3a9 <a TypeObject with map 0x1b5c8ee7baf9>,typeArguments=0xf402c4ae0b1 <JS Array[1]>)\r\n    2: instantiateType [/Users/mv/dev/js/product-designer/node_modules/typescript/lib/typescript.js:~21234] [pc=0x1f1beb09...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [/usr/local/bin/iojs]\r\n 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/iojs]\r\n 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/iojs]\r\n 4: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/usr/local/bin/iojs]\r\n 5: v8::internal::HashTable<v8::internal::SeededNumberDictionary, v8::internal::SeededNumberDictionaryShape, unsigned int>::EnsureCapacity(v8::internal::Handle<v8::internal::SeededNumberDictionary>, int, unsigned int, v8::internal::PretenureFlag) [/usr/local/bin/iojs]\r\n 6: v8::internal::SeededNumberDictionary::AddNumberEntry(v8::internal::Handle<v8::internal::SeededNumberDictionary>, unsigned int, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDetails, bool) [/usr/local/bin/iojs]\r\n 7: v8::internal::(anonymous namespace)::DictionaryElementsAccessor::AddImpl(v8::internal::Handle<v8::internal::JSObject>, unsigned int, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, unsigned int) [/usr/local/bin/iojs]\r\n 8: v8::internal::JSObject::AddDataElement(v8::internal::Handle<v8::internal::JSObject>, unsigned int, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow) [/usr/local/bin/iojs]\r\n 9: v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::LanguageMode) [/usr/local/bin/iojs]\r\n10: v8::internal::Runtime_SetProperty(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/iojs]\r\n11: 0x1f1be94092a7\r\n```\r\n\r\nnode: v6.5.0\r\nwebpack: 2.1.0-beta.20\r\ntypescript: tried both 2.0 and 2.0.2\r\nos: OSX\r\n\r\nUsing versions of ATL prior to 2.2.1 does not seem to cause this error, however they do result in compile time errors due to improper support of `@types`, so the fact that the tsc compile fails may be what prevents this from happening, can't say for sure. What i'm doing to provoke the error is to edit the same file over and over again, so maybe it's because the type checking does not get a chance to complete before making another change, and triggering a new build?\r\n\r\nI've tried disabling the ForkChecker plugin with same result."},"comment":{"url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/comments/245229257","html_url":"https://github.com/s-panferov/awesome-typescript-loader/issues/227#issuecomment-245229257","issue_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/227","id":245229257,"user":{"login":"mvestergaard","id":2027834,"avatar_url":"https://avatars.githubusercontent.com/u/2027834?v=3","gravatar_id":"","url":"https://api.github.com/users/mvestergaard","html_url":"https://github.com/mvestergaard","followers_url":"https://api.github.com/users/mvestergaard/followers","following_url":"https://api.github.com/users/mvestergaard/following{/other_user}","gists_url":"https://api.github.com/users/mvestergaard/gists{/gist_id}","starred_url":"https://api.github.com/users/mvestergaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvestergaard/subscriptions","organizations_url":"https://api.github.com/users/mvestergaard/orgs","repos_url":"https://api.github.com/users/mvestergaard/repos","events_url":"https://api.github.com/users/mvestergaard/events{/privacy}","received_events_url":"https://api.github.com/users/mvestergaard/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T09:42:16Z","updated_at":"2016-09-07T09:42:16Z","body":"I'm on mac as well though. Initial compilation is not the issue, try making a change somewhere afterwards so the process rebuilds, and take a look at the memory usage of the build process."}}
{"actor":{"display_login":"mvestergaard"}}