Program stops after button press

Since I have no clue how to draw this correctly, I took a picture.
The picture is about 1 mega byte, so it could take a while to load.