electron-webpack-dashboard icon indicating copy to clipboard operation
electron-webpack-dashboard copied to clipboard

Webpack crashed after finding an error in my code

Open mpourismaiel opened this issue 6 years ago • 2 comments

Using the webpack dashboard plugin, I tried making an error (using a non-existent variable) and I got this log after webpack showed the said error through awesome-typescript-loader:


[3805:0x332ed30]    79063 ms: Scavenge 1167.4 (1371.3) -> 1167.2 (1376.8) MB, 5.0 / 0.0 ms  allocation failure 
[3805:0x332ed30]    79075 ms: Scavenge 1172.3 (1376.8) -> 1171.9 (1387.3) MB, 5.7 / 0.0 ms  allocation failure 
[3805:0x332ed30]    79340 ms: Scavenge 1202.8 (1407.7) -> 1197.2 (1407.7) MB, 3.9 / 0.0 ms  allocation failure 
[3805:0x332ed30]    79355 ms: Scavenge 1202.8 (1407.7) -> 1202.3 (1427.2) MB, 6.4 / 0.0 ms  allocation failure 


<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: Scavenger: promoting marked
 Allocation failed - process out of memory
 1: node::Abort() [node]
 2: 0x12b81cc [node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: 0xa98e0b [node]
 6: void v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)0, (v8::internal::PromotionMode)0, (v8::internal::LoggingAndProfiling)1>::EvacuateObject<(v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)0, (v8::internal::PromotionMode)0, (v8::internal::LoggingAndProfiling)1>::ObjectContents)0, (v8::internal::AllocationAlignment)0>(v8::internal::Map*, v8::internal::HeapObject**, v8::internal::HeapObject*, int) [node]
 7: v8::internal::Scavenger::ScavengeObject(v8::internal::HeapObject**, v8::internal::HeapObject*) [node]
 8: v8::internal::Heap::IteratePromotedObjectPointers(v8::internal::HeapObject*, unsigned char*, unsigned char*, bool, void (*)(v8::internal::HeapObject**, v8::internal::HeapObject*)) [node]
 9: void v8::internal::BodyDescriptorBase::IterateBodyImpl<v8::internal::ObjectVisitor>(v8::internal::HeapObject*, int, int, v8::internal::ObjectVisitor*) [node]
10: void v8::internal::BodyDescriptorApply<v8::internal::CallIterateBody, void, v8::internal::HeapObject*, int, v8::internal::ObjectVisitor*>(v8::internal::InstanceType, v8::internal::HeapObject*, int, v8::internal::ObjectVisitor*) [node]
11: v8::internal::Heap::DoScavenge(v8::internal::ObjectVisitor*, unsigned char*, v8::internal::PromotionMode) [node]
12: v8::internal::Heap::Scavenge() [node]
13: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
14: v8::internal::Heap::CollectGarbage(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags) [node]
15: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]
16: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]
17: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]
18: v8::String::WriteUtf8(char*, int, int*, int) const [node]
19: Hash64String(Nan::FunctionCallbackInfo<v8::Value> const&) [/home/mahdi/Documents/projects/miare/node_modules/farmhash/build/Release/farmhash.node]
20: 0x7f2aab65d2e2 [/home/mahdi/Documents/projects/miare/node_modules/farmhash/build/Release/farmhash.node]
21: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
22: 0xb46f2c [node]
23: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
24: 0x7c9604843a7
EXIT RUNTIME
Aborted (core dumped)
error Command failed with exit code 134.

Complete process:

image

First green line is from the last successful build.

mpourismaiel avatar Dec 20 '17 13:12 mpourismaiel

Can you create a minimal repository that hits the issue and then provide install + error reproduction steps? That would be a great help for us to investigate this more quickly. Thanks!

Looks related to https://github.com/FormidableLabs/electron-webpack-dashboard/issues/52 (at least a comment there).

ryan-roemer avatar Dec 20 '17 20:12 ryan-roemer

I posted the comment in #52, thought it might clear that issue somehow. It works after the first build but as I mentioned, on error it crashed.

I created a new webpack config file, really minimum (using webpack-cli) and no crashes were visible. Although new errors did not appear in webpack dashboard.

This is my webpack config file:

const webpack = require('webpack');
const path = require('path');
const DashboardPlugin = require('webpack-dashboard/plugin');

const UglifyJSPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
	entry: './index.js',

	output: {
		filename: '[name].bundle.js',
		path: path.resolve(__dirname, 'dist')
	},

	module: {
		rules: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				loader: 'babel-loader',

				options: {
					presets: ['es2015']
				}
			}
		]
	},

	plugins: [new UglifyJSPlugin(), new DashboardPlugin()]
};

and my index.js file containing the error:

cost hello = "Hello World!";

mpourismaiel avatar Dec 22 '17 18:12 mpourismaiel