objective c - Bad Access error in Thread with a managed object in iOS -


I have a line of code that has a table in my esclaim DB:

  User * user = [[allocated user] init]; ... do some processing in one thread and other stuff) // And Function   

But I commented all the users * except the line of users and I came to know that my error was that line I came to the end of the function call. The error is:

  "Thread X: EXC_BAD_ACCESS (code = 1, address = XXXXX)   

Why does this happen?

You can not create with NSManagedObject example init Code> NSManagedObject is associated with a NSManagedObjectContext and should be created using: initWithEntity: insertIntoManagedObjectContext: .



Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -