This also happens to me, even when not taking damage. Found some information and a workaround for people who can't acces the GUI.
Info
Crash only occurs outdoors. If you try to open the gui on a pipe that is in a (small) room it all works fine. If you try to open the gui outdoors it crashes.
Workaround
Build a small room around the block where you want the teleport pipe to come, can be as small as 2x2 (room for the pipe and for you to stand in). Close the room off and the gui should be working. Setup the pipe like you want it to be, when everything should be working ok, remove the room if you don't want it.