opening a double chest will cause the x and y to become inverted, you will be unable to grab anything from said chest and the only thing you can do is drop whatever item you had selected in your hotbar. You are unable to pause the game to exit, the only way to leave is to shut down the game entirely, doing so you get reloaded in front of said chest and the issue will persist if you try to use that chest again.
Could you please attach a video of this occurring? Does this occur in every world, or only in specific ones? If this does only occur in a specific world, please provide the seed and coordinates (unless you can transfer the world with realms).
Is this occurring on a shared/multiplayer, singleplayer, or realms world?