Update: The game has crashed again on an infinite world so it has nothing to do with the world type.
The game hasn't crashed since I filed this report, so I don't know why it happened in the first place.I have checked the settings and the setting that could cause this is being an old world size. It has only happened on one world.
Update: The game has crashed again on an infinite world so it has nothing to do with the world type.