Hi!
I am working on a iphone/Ipod touch project involving saving and fetching data from an sqlite database. It is working fine, but at some points in development i get this error (when the app starts):
erminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x4e, 0x49, 0x42, 0x41, 0x72, 0x63, 0x68, 0x69)' 2009-11-09 10:08:28.810 FagNavigasjon[1627:20b]
Previously i have only been able to solve this problem by reverting to earlier point in develepment and continuing. This time i have found out that if i comment out a certain part of the code, the app doesnt crash.
while(sqlite3_step(selectstmt3)==SQLITE_ROW){
/*
NSString *navn=[[NSString alloc] initWithUTF8String: (char *)sqlite3_column_text(selectstmt3, 0)];
NSString *telefon=[[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(selectstmt3, 1)];
NSString *fodselsar=[[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(selectstmt3, 2)];
NSString *ariframtiden=[[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(selectstmt3, 3)];
NSString *verneplikt=[[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(selectstmt3, 4)];
NSString *utdannelse=[[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(selectstmt3, 5)];
NSString *epost=[[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(selectstmt3, 6)];
appDelegate.navn=navn;
appDelegate.epost=epost;
appDelegate.telefon=telefon;
appDelegate.fodselsar=fodselsar;
appDelegate.studiear=ariframtiden;
appDelegate.utdannelse=utdannelse;
appDelegate.verneplikt=verneplikt;
*/
}
But of course the app doesnt load the data anymore. This code previously worked, and i have not changed it prior to this error. I have, however, added new records to the database, but these seem okay when i review them in SQLite manager. Can anyone tell me what can cause this problem? I am thankful for any responses!