Eliminated segmentation fault. still not working. Error seems to be something with Eigen, so probably in the solveIntersection and/or checkIntersection functions.