If you try to crash the game using F3-C and then open your inventory while holding it, the game will not crash. But when you press e to close, the game will crash instantly. This makes it impossible to crash in inventory.
Steps to reproduce:
1: Enter a world, press and hold F3-C.
2: Quickly open your inventory, wait a while.
3: Let go of the F3+C keys, try waiting a bit.
4: Exit inventory (using inventory key, esc might also work)
5: Notice how the game then instantly crashes.