Added NAN and defaulted to segfault_handler in samples

Added NAN and defaulted to segfault_handler in samples