That is why I asked for your code, how did you declare, allocate and initialize your pointer?
If you just tried "char *str = " x1 x7 x10 x29 ";" then yes the program would probably crash because you are using a const character sting and since strtok() tries to modify the string it will probably crash.