I have written a small Objective-C program to archive an object. The object is an NSDictionary. There was no problem during compiling. But when it was called it displayed a message "Segmentation fault" in the terminal, and no archive XML file was created. The problem was caused by the writeToFile method, as after I had commented it out there was no error (of course no archiving either). What does this error message mean? And how to fix it?
I just found out the reason of the problem. My program is based on the example in a book and there is a misprint so the dictionary object has never actually initialized. Sorry I did not check this problem throughly before asking.