Hope someone can help me debug this issue as EXC_BAD_ACCESS is the only error I get. I also tried to enable NSZombieEnabled, but can't get any more information as far as I can tell.
This problem. I have four objects:
A β B β C β D
Where the arrow symbolizes the set: βAβ contains the βmany-to-manyβ relation to βBβ, βBβ - the βmany-to-manyβ relation to βCβ, etc. To create an object, I use:
id dto = [NSEntityDescription insertNewObjectForEntityForName:@"A" inManagedObjectContext:context]; NSLog(@"DTO: %@", dto);
and this seems to work for A, B, and C. However, when used on object D, the application crashes with EXC_BAD_ACCESS. It seems that the problem occurs when accessing the object, since the program succeeds when commenting on NSLog and other methods that access the dto object.
Update:
Console output
GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all Attaching to process 3100. Program received signal: "EXC_BAD_ACCESS". warning: Unable to restore previously selected frame. No memory available to program now: unsafe to call malloc warning: check_safe_call: could not restore current frame Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.) warning: Unable to restore previously selected frame.
stack
The stack trace is very large (?). When debugging, it loads "62826 stack frames." Showing part of this:

Lines # 8- # 41 are repeated for frame No. 62500.
source share