I'm having the same issue, though this is old and not having the information I wanted, is the first thing to come up on a google search.
My symptoms were an inability to individually upgrade any unit. . .
I've found a work around. . . it's not perfect but try using the mass upgrade command (hold "shift U"). I've had to toy around with trying several different types of units which needed to be upgraded before I found one which did not cause the game to crash. Once that one group is upgraded there seems to be lower probability of the next upgrade group cashing the game. . . after which the individual upgrade worked as though there was never an issue.
To be clear try the mass upgrade command (even if its just one unit total) eventually it will work (or at least it did for me with no further issues (upgrading eventually works like usual)).