Disabling the interactive (or something like that) menus seemed to stop the program segfaulting on my device. It also made the whole program run smoother.