the segmentation fault finally fixed, thanks to the Valgrind tools