If you give a fleet orders to join/absorb another fleet, which ceases to exist before those orders can be carried out, you get a LOT of "Invalid function call" errors, a dozen or two in a lengthy turn cycle, probably one per each "attempt to execute orders" function. (I'm guessing the code does something like "Ah, they have to Join Fleet X... getPostion(FleetX)=null.... call CalculateRouteTo(null)... Error! Danger, Will Robinson!")
There's actually quite a few bugs which seem to relate to fleets disappearing, either due to combat, being absorbed by other fleets, etc. Might I suggest that, on a "fleet removed from DB" event, prior to the fleet being deleted, all other tables are searched for that fleet ID, and appropriate action taken? For orders, I'd have something like "Task Force Cargo II cannot complete order 'Move To Task Force Battle IV'. All orders will be put on hold until this is resolved."
(Also, internally, are TFs tracked by their name string, or by a unique ID? I've sometimes run into problems where I've accidentally named two fleets the same thing. Actually, there's quite a few places where it's possible to create items with the same name -- technology, for example, I've often accidentally created a research project twice. It might be good to force all strings to be unique.)