i've just noticed where it goes wrong in trunk (r3744). system.legacy_addShipsAtPrecisely() causes the CTD. The workaround for the moment is simply
replacing with system.legacy_addShipsWithinRadius()
I wanted to test and compiled trunk also, but on 4 startups I consistently CTD-ed after launch with always the same crashlog:
I tried both launching with my last commander and as a Jameson, but with my full oxp set. It was always the same object with scanClass: CLASS_BUOY that was mentioned as being de-allocated without removed
Svengaliis report and my problem to launch trunk are probably the same. After several tries I finally managed to launch without crashing. Now I had a change to test system.legacy_addShipsAtPrecisely() in the console. It was followed to the CTD with as log:
The same bug also affected legacy_spawnShip()... fixed now!
Fix confirmed, no crashes anymore on using that command.
The fix of removing the line [ship release]; seems logic seeing the log about dealloced memory, but that line has been there since at least Oolite 1.65. Why didn't it give problems before?
Before rev3701, the code did call newShipWithRole: directly - after calling that function, you always need to release the object, otherwise you have memleaks.
This cleanup already happens inside the new internal function we're using since rev3701 (addShipWithRole: launchPos: rfactor: - and it does a few other bits too) Unfortunately, after refactoring, I didn't remove the now redundant bit of code, or check those two legacy functions properly, as I should have done...
refactoring sometimes has strange side effects. One was that legacy_spawnShip("foo") now expects a role as parameter while it used to be a shipKey as parameter. For ships added with this rare command, the method was broken since, unless the key was the same as the role.