So I can see that you are running out of memory, resulting in the program crashing. This is because the saving process needs to allocate some memory without removing anything in the level so that it can capture the state fully.

Essentially there's nothing you can do if you come up against this other than increasing the amount of available ram in the system