Occasional "Illegal attempt to establish a relationship '...' between objects in different contexts"

Viewed 733

We occasionally get crash reports from our users (we're using a crash reporter package that sends crashes to our server) with the following error:

"Illegal attempt to establish a relationship '...' between objects in different contexts"

(Different reports may have different relationship, it's not the same on all reports).

This seems easy enough, except that:

  1. We only have ONE NSManagedObject in our code - the singleton from the App delegate.

  2. We don't use any threads except for the main thread.

  3. ALL objects are allocated using the context using initWithEntity:insertIntoManagedObjectContext: (none of them is allocated with a simple init].

  4. The error NEVER happened in our testing (thousands of runs).

So basically we're stuck.

Any idea will be appreciated.

1 Answers
Related