ugh. I lied. Everything works perfectly in Xcode but not debian. It still segfaults for some reason...