Segfaults and thread exits galore