Note that there are some explanatory texts on larger screens.

plurals
  1. POCore Data does a crash in iOS 5 only
    primarykey
    data
    text
    <p>I'm writing an app that communicate with a server. The server uses json, so I take this json in my app and I serialize the result into a <code>NSMutableDictionary</code> that then is used to create a new entity.</p> <p>This is the code :</p> <pre><code>if (context == nil) { context = [(AppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; } UserTable *ut = [NSEntityDescription insertNewObjectForEntityForName:@"UserTable" inManagedObjectContext:context]; ut.user = [Diz objectForKey:@"user"]; ut.email = [Diz objectForKey:@"email"]; ut.phone = [Diz objectForKey:@"phone"]; NSError *error = nil; if (![context save:&amp;error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); } </code></pre> <p>All works perfectly in iOS 4.3, iOS 6.0 and 6.1. In iOS 5.0.1 this code causse an exc_bad_Address localized in <code>[context save:&amp;error]</code> or localized sometimes in <code>ut.phone=[Diz objectForKey:@"phone"]</code>.</p> <p>I'm using only one context (I have test threading composition with "isMainThread" function), What I can do? My error log is empty,the app simply does a crash.</p> <p>EDIT</p> <p>Thanks for the suggestions. I'm already removing my app from the device, but i'll try to do a migration. I have enabled exception breakpoint, but it's the same... The app crash without log any error (i have also NsZombie enabled). During the crash the green breakpoint is setted on an attribute of the Entity "UserTable" ,if i remove this attribute from saving the breakpoint is setted in the save function. </p> <p>EDIT</p> <p>After many tests i have detect a standard behavior for this crash. My Entity UserTable has 31 attributes, if i delete one attribute all works correctly... i have already tried to recreate the entity with another name and with others attribute's name but the behavior is the same... What does it means? There's a limit for entity's attributes number? Any other suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload