I have accidentally reproduced a bug reported by smoelf in the 1. 9. 0 thread hxxp: aurora2. pentarch. org/index. php?topic=11135. msg129111#msg129111. From your reply I conclude that it isn't solved. Maybe this helps to sort it out.
1. 9 conventional start/upgraded to 1. 9. 2 some way in. Designed a ground unit, clicked Create. Then, I realized that a thing with the boastful title "Tank Destroyer" should have stronger armour. So, I deleted the unresearched tech in the planetary Economics/Research tab. Designed a new unit with the right armour, and with the same name as the original. Researched it. After that, I suddenly had two units with the same name. For a second I thought that I had accidentally designed and researched the same thing twice; but they are two different units with different armour, and I verified in the event log that I only researched it once. I can rename them separately without trouble, but when I obsolete one, it automatically obsoletes the other. I looked it up in the db's GroundUnitClass table: Two different GroundUnitClassIDs, but identical TechSystemID as in the original report.
Of course, I don't really know what's involved here; but from the behaviour, I'd guess that the Delete Tech for race-designed tech does not work properly.
Thanks for the detailed description. I suspect what happened is that after you deleted the first tech, the game used the same (now available) ID for the second tech and both units ended up linked to it.
I probably need to change delete tech so it removes any associated missiles, components and ground units (with a suitable warning).
Thank you. But I'm very sorry, I may have inadvertently pointed you along the garden path with my report, it was rather late, forgive me. Because: I made a few very quick, non-exhaustive tests right now (Design/delete/redesign/research); and I cannot reproduce it at all. There may be something else involved in addition, or entirely separately. Would be worth knowing if smoelf or anyone else who might have experienced the issue ever touched the Delete Tech button.
PS edit: I did reproduce it, after all, at least partly, the duplicate units didn't reproduce at first sight; but the duplicate IDs did. I'll try to attach the db here (don't know if that works post post), the test units are named Bug Bucket [number].
PPS edit (out of time for now): Upon quit/reload, the duplicates do show and show the "obsoleting twins" behaviour. So, my original post was alright then. In haste, I may just have forgotten to refresh the view with my test or there may be a comparatively minor display issue.