On the Switch Cornerhards solution works but only for worlds less than 500mb. You still get the "error", but the world is there.
For me, I have a world that is 685mb that when it gets to about 90% in the level export I get the "your software closed because of an error" box and I get taken straight back to the Switch homescreen.
The update didn't fix this particular issue unfortunately.