Stuck with a segmentation fault for last 3 hours