This is not a program bug so much as a game-mechanics bug. Steps to reproduce:
- Build a minecart track up to an active portal.
- Be in survival mode, with an empty inventory, with cheats off.
- Ride the minecart into the portal. (You will not be teleported, and this is not a bug, per MC-67.)
It is now impossible to do anything to leave this situation on your own.
- You cannot move, since you are in a minecart and the minecart is not on rails.
- Your cursor cannot target anything but the unbreakable portal blocks, so you cannot exit or break the cart.
- Since you do not happen to have a water bucket, you cannot disable the portal with water.
- Since you do not happen to have a bow, you cannot break the cart with an arrow.
Previously, you could exit the game and return, and find yourself no longer in the cart, but since 1.5 that no longer works.
(The fix I would propose is to make portal blocks be like water/lava, where aiming at them just targets the block/entity behind them, not the fluid block itself; I think this would also be an improvement for combat in the vicinity of a portal. But that's up to Mojang to decide.)