我在Javascript中遇到内存错误。但我不知道如何识别导致错误的问题。
错误:
<--- Last few GCs --->
[4321:0x3c60820] 139851 ms: Mark-sweep 1407.8 (1491.9) -> 1407.6 (1463.9) MB, 914.8 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 915 ms) last resort GC in old space requested
[4321:0x3c60820] 140774 ms: Mark-sweep 1407.6 (1463.9) -> 1407.6 (1463.9) MB, 923.1 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x27dc0aba5ec1 <JSObject>
2: new constructor(aka PromiseCapability) [/home/minnak/Darbas/market/app/myccio/node_modules/core-js/library/modules/_new-promise-capability.js:7] [bytecode=0x41b44d5679 offset=18](this=0x394dac4abeb9 <PromiseCapability map = 0x13bac1f3eb61>,C=0x27dc0ab95a21 <JSFunction Promise (sfi = 0x27410952fa11)>)
5: f [/home/minnak/Darbas/market/app/myccio/node_modules/core-js/library/modules/_new...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
2: 0x12190dc [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
5: v8::internal::Factory::NewStruct(v8::internal::InstanceType) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
6: v8::internal::Factory::NewTuple3(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
7: v8::internal::StoreIC::StoreTransition(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
8: v8::internal::StoreIC::GetMapIndependentHandler(v8::internal::LookupIterator*) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
9: v8::internal::IC::ComputeHandler(v8::internal::LookupIterator*) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
10: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
11: v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
12: v8::internal::Runtime_StoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [/home/minnak/.nvm/versions/node/v8.9.1/bin/node]
13: 0xe9968f0463d
[nodemon] app crashed - waiting for file changes before starting...
应该从此消息中发现哪些有用的信息?
答案 0 :(得分:0)
你只是试图调用一个无法完成的构造函数,因为内存已经满了。