On Maemo the MC problem happens because busybox doesn't send the SIGHUP signal to its children, so when you close xtem busybox dies but MC is still alive, but without any I/O means (tty) -> which triggers the bug in MC itself.
I find it odd that this happens also with Ubuntu. I have to check that at home (but I always quit mc before closing the terminal anyway).