Got rid of the segfault. It was a shared acces error