rentzsch/mogenerator — Issue #80: mogenerator crashes on my model
Author: jdmuys
Created: 2011-12-18 01:53:55+00:00
State: open

mogenerator crashes with a segmentation fault when running on one of my model. Here is the line in Xcode's build log reporting the crash:

/Development/Klee/MarcXMLTool/Entities/mogend.sh: line 24: 7501 Segmentation fault: 11 mogenerator --template-var arc=true --model "${INPUT_FILE_PATH}/${INPUT_FILE_BASE}.xcdatamodel" --output-dir "${INPUT_FILE_DIR}/" --base-class JDManagedObject

Is there anything not too complex I can do to debug this? I looked at the crash report, and it looks like the crash happens in a call to retain.

Here is the start of the crash report:

Process: mogenerator [7501]
Path: /usr/bin/mogenerator
Identifier: mogenerator
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: sh [7499]

Date/Time: 2011-12-18 02:46:14.417 +0100
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000

VM Regions Near 0:
-->
__TEXT 000000010c99e000-000000010c9c1000 [ 140K] r-x/rwx SM=COW /usr/bin/mogenerator

Application Specific Information:
objc_msgSend() selector name: release
objc[7501]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib	0x00007fff884d6e90 objc_msgSend + 16
1 libobjc.A.dylib	0x00007fff884dc03c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 434
2 com.apple.CoreFoundation	0x00007fff8e634f75 _CFAutoreleasePoolPop + 37
3 com.apple.Foundation	0x00007fff8fca67a3 -[NSAutoreleasePool drain] + 154
4 mogenerator	0x000000010c9ace12 DDCliAppRunWithClass + 101
5 mogenerator	0x000000010c99ef0c start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib	0x00007fff861de7e6 kevent + 10
1 libdispatch.dylib	0x00007fff8adea5be _dispatch_mgr_invoke + 923
2 libdispatch.dylib	0x00007fff8ade914e _dispatch_mgr_thread + 54

Thread 2:
0 libsystem_kernel.dylib	0x00007fff861de192 __workq_kernreturn + 10
1 libsystem_c.dylib	0x00007fff89911594 _pthread_wqthread + 758
2 libsystem_c.dylib	0x00007fff89912b85 start_wqthread + 13

Thread 3:
0 libsystem_kernel.dylib	0x00007fff861de192 __workq_kernreturn + 10
1 libsystem_c.dylib	0x00007fff89911594 _pthread_wqthread + 758
2 libsystem_c.dylib	0x00007fff89912b85 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007f8408829960 rbx: 0x00007f8408829038 rcx: 0x00007f8408829958 rdx: 0x00000000a1a1a1a1
rdi: 0x00007f8409a6ee80 rsi: 0x00007fff8810a5f8 rbp: 0x00007fff6c599110 rsp: 0x00007fff6c598cc0
r8: 0x0000000000000003 r9: 0x00007f8409a39b80 r10: 0x00000000bc4da2d9 r11: 0xe00007f8409a6300
r12: 0x00007f8408829000 r13: 0x0000000000000000 r14: 0x00007f8408829000 r15: 0xa3a3a3a3a3a3a3a3
rip: 0x00007fff884d6e90 rfl: 0x0000000000010246 cr2: 0x00007fff73e14048
Logical CPU: 2