Yeah, the AI can be a real jerk when trading things, I once had this game in wich I got very far ahead of the AI, and because I liked a bit more of a challenge I offered the AI a trade he couldn't refuse:
I scrapped almost all my ships and offered all my planets to the AI and all I asked in return were two planets of his, I was planning to rebuild my empire from these planets wich should be possible because I was far ahead in tech. Ofcourse the AI accepted
You can guess how suprised I was when I found out the next turn that the two planets the AI gave me had no population, both were exterminated by a plague... with no population, no production and no means of aquiring other ships I had lost the game....