about 3 years ago - Shurenai - Direct link
Are you closing the game when it 'stops working'? Chances are it's actually still working in the background and Windows is just being dumb. Next time it happens open task manager and check if the ram/cpu usage are fluctuating; If it is, it's likely the game is still doing something.

Alternatively, if you have a small amount of ram (Like, 8gb), you may be running out of available memory during generation, in which case you need to ensure your pagefile is enabled and large enough for the game to dump excess data to (If you have 8gb ram, you'll want 8 or 16gb of pagefile)