I have a project running under Lion (10.7.8) and Xcode 4.3.3 and everything is running perfect.
Now I want to use the project under Mountain Lion and Xcode 4.4 , but I am getting problems with the garbage collection (see errors):
ScriptsLauncher2011(487,0x7fff7215b180) malloc: *** auto malloc[487]: error for object 0x400fdf160: resurrection of thread local garbage belonging to another thread
ScriptsLauncher2011(487,0x7fff7215b180) malloc: resurrection error for object 0x400fdf160 while assigning {conservative-block}320[0] = {uncollectable-memory}(0x400fdf160)
garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug
This is the reported issue in Xcode
libobjc.A.dylib`objc_msgSend_vtable4:
0x7fff86c00540: testq %rdi, %rdi
0x7fff86c00543: je 0x7fff86c0055b ; objc_msgSend_vtable4 + 27
0x7fff86c00545: testl $1, %edi
0x7fff86c0054b: jne 0x7fff86c0055f ; objc_msgSend_vtable4 + 31
0x7fff86c0054d: movq (%rdi), %rax
0x7fff86c00550: movq 24(%rax), %rax ------------------>Thread 1: EXC_BAD_ACCESS(code=1, address=0xfffffffbfe9bc217)
0x7fff86c00554: movq 8(%rsi), %rsi
0x7fff86c00558: jmpq *32(%rax)
0x7fff86c0055b: xorl %eax, %eax
0x7fff86c0055d: ret
0x7fff86c0055e: nop
0x7fff86c0055f: movl %edi, %eax
0x7fff86c00561: andl $15, %eax
0x7fff86c00564: leaq 1129437(%rip), %r10 ; __44-[ICDeviceBrowser setBrowsedDeviceTypeMask:]_block_invoke_0 + 755
0x7fff86c0056b: movq (%r10,%rax,8), %r10
0x7fff86c0056f: movq 24(%r10), %rax
0x7fff86c00573: movq 8(%rsi), %rsi
0x7fff86c00577: jmpq *32(%rax)
0x7fff86c0057a: nopw (%rax,%rax)
I have read the document "Garbage Collection and ARC ” managing memory " from Shane and the option : GCC_ENABLE_OBJC_GC : required is set properly.
in this project I am also using the Myriad helpers from Shane.
This problem occurs unexpectedly and cannot really be reproduced.
I hope somebody can help find a way to get rid of this issue.
Thanks,