I noticed it's possible (and a crash can happen) when the node is shutting down. e.g. if someone presses the shutdown button and then tries to connect a peer.
Normally shutdown is fast but sometimes it's delayed by a node sync or other node-related required actions.