TheMightyFingers / mightyeditor

http://mightyeditor.mightyfingers.com
Other
279 stars 61 forks source link

Crash: JS Allocation failed - process out of memory #46

Closed villeilkkala closed 9 years ago

villeilkkala commented 9 years ago

I don't know if my project is too large, but a local instance keeps on crashing with "FATAL ERROR: JS Allocation failed - process out of memory" message. Same thing might happen on online version as well, as I made a local installation as the project kept on crashing there as well. Usually it happens after creating keyframes.

stauzs commented 9 years ago

can you check out locally: https://github.com/TheMightyFingers/mightyeditor/tree/nosourceeditor and see if ME keeps crashing.

source editor is pretty heavy with jshint and autocomplete with full phaser source included

also your system info would benefit a little

villeilkkala commented 9 years ago

It errors with "Error: Cannot find module nodemailer". I'm not sure if I did everything right, I just changed the IP like in the instructions and ran node Server.js at the folder.

My system is: Windows 7, Service pack 1 Intel Core i7, 2.8GHz, 4 cores RAM 32 gb Google Chrome 42.0

Do you need more info?

Online project is at http://mightyeditor.mightyfingers.com/#p2ayw/0 which keeps crashing as well, but not sure if it is the reason.

stauzs commented 9 years ago

running npm install should install nodemailer try to delete server/node_modules and run npm install again

My laptop has 8GB of RAM - and I had few crashes before, but because of source editor and autocomplete background worker.

Your project seems to work fine. Slow on rectangle selection - but that was expected.

How often do you experience crash? It would be awesome if you know how to reproduce.

villeilkkala commented 9 years ago

Yes, it works now, but still crashes. Error happened right after making a bunch of keyframes and then exporting only data (around a minute of nothing happening and then crash). If I open the project fresh and export, it does output the text file. Error message in console is

WebSocket connection to 'ws://localhost:8080/ws/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED Socket.js:63 Event {path: Array[0], cancelBubble: false, returnValue: true, srcElement: WebSocket, defaultPrevented: false…}ws.onerror @ Socket.js:63

stauzs commented 9 years ago

ohh... I just now realized that node is crashing not chrome, I suppose it's time to track down huge memory usage in the export script..

stauzs commented 9 years ago

I have reproduced error locally - seems that node don't like to manipulate with huge objects and very deep nesting (like in your project) - JSON.stringify on nodes side might crash.

this question is related: http://stackoverflow.com/questions/13616770/node-js-fatal-error-js-allocation-failed-process-out-of-memory-possible