trying to find out this rare segfault error