Function #3180: An item with the same key has already been added.
If you open up the Create Research Project window and start designing something, let's say a Beam Fire Control, then open up the Turret Design window to design and save a turret, then come back to the fire control and save it, you'll get this error. I suspect that each of these windows (and probably others such as the missile design window, although I haven't checked) look up the next value to use as the primary key when they are opened, then use that primary key when you save the tech. Since they both found the same next value from the table, they both tried to save to the same ID. May I suggest skipping that and letting sqlite insert the next value at the time of the insert?