Hi,
sometimes my game crashes without communicating any error, is there a way to print the stack to a .txt file beforeit closes itself?
Theoretically yes, but I don't think that will help you.
If the error were in the game and it's stack, the browser would still display its error message.
what you describe is a browser shutdown, not a game crash (because all MV games are HTML5-games run in the browser).
That should only happen either by command (and you would remember if you had entered the close command in one of your events) or by an external interference (like the antivirus shutting down an suspected infected website.
In fact that would be my first guess - that is was your antivirus (or a similar background program) that forcefully shut down the game without message because it falsely identified it as a virus-infected website. Can you check the logs of those programs if anyone reports a quarantine or other action at the moment of the shutdown?
I'm not 100% sure I checked in the right place but I didn't find anything for the moment. A thing i noticed is that messing with the sound buffers increases the chances of crashes.