Greetings,

We have an app which uses Core Data as a data store for some of it's data, and 
had a crash with the following message:

"NULL _cd_rawData but the object is not being turned into a fault"

It LOOK like it is trying to turn a null into a fault, but this seems to be 
deep under the covers implantation stuff that I do not touch in general, so I 
am at a loss.  I have looked it up on google, and basically have not found 
anywhere described anything similar, and we  can't even replicate the crash.  
One possibility was multithreading issues, but as this is always run on its own 
thread with its own autorelease pool, I am not sure this is related.

Our model has an Article entity which has an optional to-many to a 
MediaResource entity which has (optionally) a url, a url_small, a thumbnail_url 
and a thumbnail_url_small, all of which are strings.  

The app is multithreaded and we have a method we run in the background 
(performSelectorInBackground) returning an NSSet:

{
    NSMutableSet *images = [[NSMutableSet alloc] init];
    for (NSArray *mediaArray in [[self favoriteArticles] valueForKey:@"media"]) 
{ 
        for (MediaResource *mediaObject in mediaArray) {
            if (NSSTRING_HAS_DATA(mediaObject.url)) [images 
addObject:mediaObject.url];
            if (NSSTRING_HAS_DATA(mediaObject.url_small)) [images 
addObject:mediaObject.url_small];
            if (NSSTRING_HAS_DATA(mediaObject.thumbnail_url)) [images 
addObject:mediaObject.thumbnail_url];
            if (NSSTRING_HAS_DATA(mediaObject.thumbnail_url_small)) [images 
addObject:mediaObject.thumbnail_url_small];  
        }
    }
    return [images autorelease];
}

This method may be called from the main thread or from a background thread, but 
is always called using performSelectorInBackground.

One thing we considered was adding the strings to the set using copy rather 
than directly adding the string.  However, as we have not been able to 
replicate the crash, we have no idea if this would solve whatever problem there 
is.

Anyone have any insight?

Andrew
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to