Thank you so much!
Dug into this, and looks like it's VayraSector causing the issues. Turning it off should help, unless something else is *also* causing the same exact problem. Which, I mean, unlikely but possible.
Technical things below:
-----------------------------------------------------------------------------------------------
In a few of its classes there are things like:
private static final SectorAPI SECTOR = Global.getSector();
private static final SectorAPI sector = Global.getSector();
Because the variable is static, it means that the sector stored in that variable will remain the same when a savegame is reloaded, so it'll be pointing to the old sector. This is by itself a memory leak, though static fields don't get saved and so this would not affect the savefile directly.
However, what I think is happening is this old, no-longer-valid Sector is being referenced in these classes, and some references being saved in non-static fields. These fields *do* end up in the save file, and pull the rest of the old sector in with them.
Since the beforeGameSave() code only goes through the current sector - it has no knowledge of any old instances being kept around - the old sector's asteroids aren't cleaned up and end up in the save. Along with the rest of the sector in that save, so there's duplicates of everything. For example, searching for "chicomoztoc" in the save reveals two separate versions of the market - one "real", one from the invalid sector.
As far as fixing this: for the love of Ludd, don't put ANYTHING AT ALL (aside from primitives) into static variables unless you really know what you're doing. Ahem.