I was having a similar problem, and it was pretty frustrating. For my, Kali didn't crash, but it did always get stuck in the process of logging out.
What I did to 'fix' the issue was edit the auto-login settings and set a user other than root to auto-login. Interestingly enough, this also seemed to allow my system to log in and out of both the root user and my non-root user with no more problems.
Just open up a terminal (while root, obviously ) and type
Code:
leafpad /etc/gdm3/daemon.conf
You'll see some text like:
Code:
# Enabling automatic login
# AutomaticLoginEnable = true
# AutomaticLogin = root
# Enabling timed login
# TimedLogingEnable = true
# TimedLogin = root
# TimedLoginDelay = 5
For me specifically, I noticed that the auto-login and timed login lines were actually repeated (once at the top and then once below, all commented out using #). If that's the case, delete the first set of these lines near the top and just work with ones that look similar to what I have above.
You only need to uncomment the last two automatic login lines (by removing the # in front), if they aren't already uncommented.
Then just change the user from 'root' to the name of another account you've created.
Save the file and then reboot (which you can do using 'reboot' in the terminal, if you want).
You'll be automatically logged into the other account when you boot up, but you'll also be able to log in and out of either account without it crashing/freezing anymore.