Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DavidBlack

macrumors 6502a
Original poster
Jan 27, 2013
606
239
Somewhere In Apple's HQ ;)
I have an OS X app that uses the WebKit framework for basic browsing. But for some reason my users are reporting that it is crashing on launch. I have a crash reporter built in but I just can't replicate or decipher the crash report. I read that system libraries don't offer detailed desymbolication so it makes it harder to track where in my code it is occurring.

Code:
Date/Time:         2014-06-28 15:54:41 +0000
OS Version:        Mac OS X 10.9.3 (13D65)
Framework Version: 2.1.4
Report Version:    106
Exception Type:  SIGSEGV
Exception Codes: SEGV_MAPERR at 0x0
Crashed Thread:  0
Thread 0 Crashed:
0   ???                                 0x0000577593f2cf2c 0x0 + 0
1   com.apple.JavaScriptCore            0x00007fff981c6a13 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 595
2   com.apple.JavaScriptCore            0x00007fff981c67b5 _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 69
3   com.apple.WebCore                   0x00007fff96bd482a _ZN7WebCore21JSMainThreadExecState4callEPN3JSC9ExecStateENS1_7JSValueENS1_8CallTypeERKNS1_8CallDataES4_RKNS1_7ArgListE + 154
4   com.apple.WebCore                   0x00007fff96c18f62 _ZN7WebCore15ScheduledAction24executeFunctionInContextEPN3JSC14JSGlobalObjectENS1_7JSValueEPNS_22ScriptExecutionContextE + 450
5   com.apple.WebCore                   0x00007fff96c18cc7 _ZN7WebCore15ScheduledAction7executeEPNS_8DocumentE + 151
6   com.apple.WebCore                   0x00007fff96c18a50 _ZN7WebCore8DOMTimer5firedEv + 304
7   com.apple.WebCore                   0x00007fff969d8f0f _ZN7WebCore12ThreadTimers24sharedTimerFiredInternalEv + 175
8   com.apple.WebCore                   0x00007fff969d8dea _ZN7WebCoreL10timerFiredEP16__CFRunLoopTimerPv + 58
9   com.apple.CoreFoundation            0x00007fff92ad0494 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
10  com.apple.CoreFoundation            0x00007fff92acffcf __CFRunLoopDoTimer + 1151
11  com.apple.CoreFoundation            0x00007fff92b415aa __CFRunLoopDoTimers + 298
12  com.apple.CoreFoundation            0x00007fff92a8b755 __CFRunLoopRun + 1525
13  com.apple.CoreFoundation            0x00007fff92a8af25 CFRunLoopRunSpecific + 309
14  com.apple.HIToolbox                 0x00007fff8f5cba0d RunCurrentEventLoopInMode + 226
15  com.apple.HIToolbox                 0x00007fff8f5cb7b7 ReceiveNextEventCommon + 479
16  com.apple.HIToolbox                 0x00007fff8f5cb5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
17  com.apple.AppKit                    0x00007fff955df26e _DPSNextEvent + 1434
18  com.apple.AppKit                    0x00007fff955de8bb -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
19  com.apple.AppKit                    0x00007fff955d29bc -[NSApplication run] + 553
20  com.apple.AppKit                    0x00007fff955bd7a3 NSApplicationMain + 940
21  libdyld.dylib                       0x00007fff964fc5fd start + 1
 
If the question is: "Where is it crashing in my code?" Then the most direct answer is that it isn't crashing in your code. It's crashing in Apple's library code. So now you have to ask "Why is it crashing in Apple's code?"

That can be more difficult. You didn't describe what this app is doing and what the user was doing. If your app is simply a wrapper around a generic WebView, then what's the point? Or maybe your app is a wrapper around a specific set of web pages. And those web pages contain JavaScript that is not interacting well with the Apple libraries.

We don't have enough information... and you're asking the wrong question.
 
SEGV_MAPERR faults can be caused by dangling pointers. Have you tried something simple like running it through Xcode's analyze option ( Product menu >>Analyze ). Since it's a static check, it may not identify the issue but it's a good start particularly if you're running without ARC on. Other standard techniques are enabling Guard Malloc and Zombie objects in the target via the scheme.

As mfram noted, more information is needed to debug this. The stack trace posted points at Apple code and not user code. Typically a stack trace contains some vestige of the user code, so this is a tad unusual. Please post more info as suggested by mfram.
 
Last edited:
SEGV_MAPERR faults can be caused by dangling pointers. Have you tried something simple like running it through Xcode's analyze option ( Product menu >>Analyze ). Since it's a static check, it may not identify the issue but it's a good start particularly if you're running without ARC on. Other standard techniques are enabling Guard Malloc and Zombie objects in the target via the scheme.

As mfram noted, more information is needed to debug this. The stack trace posted points at Apple code and not user code. Typically a stack trace contains some vestige of the user code, so this is a tad unusual. Please post more info as suggested by mfram.

Thanks for the info. Here is the full crash report.

Code:
Hardware Model:      MacBookPro10,1
Process:         iTubeDownloader [413]
Path:            /Applications/iTubeDownloader.app/Contents/MacOS/iTubeDownloader
Identifier:      com.AlphaSoft.iTubeDownloader
Version:         512
Code Type:       X86-64
Parent Process:  launchd [140]
Date/Time:         2014-07-15 17:50:27 +0000
OS Version:        Mac OS X 10.9.4 (13E28)
Framework Version: 1.0
Report Version:    106
Exception Type:  SIGSEGV
Exception Codes: SEGV_MAPERR at 0x0
Crashed Thread:  0
Thread 0 Crashed:
0   ???                                 0x000059308fd5590c 0x0 + 0
1   com.apple.JavaScriptCore            0x00007fff82ced443 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 595
2   com.apple.JavaScriptCore            0x00007fff82ced1e5 _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 69
3   com.apple.WebCore                   0x00007fff854fe83a _ZN7WebCore21JSMainThreadExecState4callEPN3JSC9ExecStateENS1_7JSValueENS1_8CallTypeERKNS1_8CallDataES4_RKNS1_7ArgListE + 154
4   com.apple.WebCore                   0x00007fff85542f82 _ZN7WebCore15ScheduledAction24executeFunctionInContextEPN3JSC14JSGlobalObjectENS1_7JSValueEPNS_22ScriptExecutionContextE + 450
5   com.apple.WebCore                   0x00007fff85542ce7 _ZN7WebCore15ScheduledAction7executeEPNS_8DocumentE + 151
6   com.apple.WebCore                   0x00007fff85542a70 _ZN7WebCore8DOMTimer5firedEv + 304
7   com.apple.WebCore                   0x00007fff8530321f _ZN7WebCore12ThreadTimers24sharedTimerFiredInternalEv + 175
8   com.apple.WebCore                   0x00007fff853030fa _ZN7WebCoreL10timerFiredEP16__CFRunLoopTimerPv + 58
9   com.apple.CoreFoundation            0x00007fff8df753e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
10  com.apple.CoreFoundation            0x00007fff8df74f1f __CFRunLoopDoTimer + 1151
11  com.apple.CoreFoundation            0x00007fff8dfe65aa __CFRunLoopDoTimers + 298
12  com.apple.CoreFoundation            0x00007fff8df306a5 __CFRunLoopRun + 1525
13  com.apple.CoreFoundation            0x00007fff8df2fe75 CFRunLoopRunSpecific + 309
14  com.apple.HIToolbox                 0x00007fff87b62a0d RunCurrentEventLoopInMode + 226
15  com.apple.HIToolbox                 0x00007fff87b627b7 ReceiveNextEventCommon + 479
16  com.apple.HIToolbox                 0x00007fff87b625bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
17  com.apple.AppKit                    0x00007fff8924a24e _DPSNextEvent + 1434
18  com.apple.AppKit                    0x00007fff8924989b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
19  com.apple.AppKit                    0x00007fff8923d99c -[NSApplication run] + 553
20  com.apple.AppKit                    0x00007fff89228783 NSApplicationMain + 940
21  libdyld.dylib                       0x00007fff888485fd start + 1
Thread 1:
0   libsystem_kernel.dylib              0x00007fff85021662 kevent64 + 10
1   libdispatch.dylib                   0x00007fff8cd83136 _dispatch_mgr_init + 0
Thread 2:
0   libsystem_malloc.dylib              0x00007fff8abbfeee free + 10
1   com.apple.security                  0x00007fff826e73c1 FreeArenaList + 32
2   com.apple.security                  0x00007fff826e7373 PORT_FreeArena + 19
3   com.apple.security                  0x00007fff826e7359 SEC_ASN1DecoderFinish + 73
4   com.apple.security                  0x00007fff826e52c4 SEC_ASN1Decode + 59
5   com.apple.security                  0x00007fff826e527a _ZN11SecNssCoder6decodeEPKvmPK22SecAsn1Template_structPv + 30
6   com.apple.security                  0x00007fff826fd2fe _ZL23RSAPublicKeyDecodePKCS1R11SecNssCoderP6rsa_stPvm + 48
7   com.apple.security                  0x00007fff826fd239 RSAPublicKeyDecode + 72
8   com.apple.security                  0x00007fff826fce83 rawCssmKeyToRsa + 220
9   com.apple.security                  0x00007fff826fcd68 _ZN18RSAKeyInfoProvider18QueryKeySizeInBitsER13cssm_key_size + 40
10  com.apple.security                  0x00007fff826fcc43 _ZN15AppleCSPSession10getKeySizeERKN8Security7CssmKeyER13cssm_key_size + 33
11  com.apple.security                  0x00007fff826fcb6f _ZL23cssm_QueryKeySizeInBitslyPK12cssm_contextPK8cssm_keyP13cssm_key_size + 213
12  com.apple.security                  0x00007fff826fc9f0 CSSM_QueryKeySizeInBits + 273
13  com.apple.security                  0x00007fff826fc215 _Z20CL_extractCSSMKeyNSSRK33cssm_x509_subject_public_key_infoRN8Security9AllocatorEPK11DecodedCert + 460
14  com.apple.security                  0x00007fff826fbfe9 _ZL24getField_PublicKeyStructR11DecodedItemjRjRN8Security13CssmOwnedDataE + 90
15  com.apple.security                  0x00007fff826e78c0 _ZN11DecodedCert16getCertFieldDataERKN8Security8CssmDataEjRjRNS0_13CssmOwnedDataE + 58
16  com.apple.security                  0x00007fff826fbe93 _ZN18AppleX509CLSession28CertGetFirstCachedFieldValueElRKN8Security8CssmDataERjRP9cssm_data + 117
17  com.apple.security                  0x00007fff826fbd58 _ZL33cssm_CertGetFirstCachedFieldValuellPK9cssm_dataPlPjPPS_ + 162
18  com.apple.security                  0x00007fff826fbbe3 CSSM_CL_CertGetFirstCachedFieldValue + 105
19  com.apple.security                  0x00007fff8270a2d7 _ZN12TPClItemInfo10fetchFieldEPK9cssm_dataPPS0_ + 65
20  com.apple.security                  0x00007fff82715998 _ZL15tpOcspGetCertIdR10TPCertInfoS0_RP16OCSPClientCertID + 120
21  com.apple.security                  0x00007fff82714a22 tpVerifyCertGroupWithOCSP + 475
22  com.apple.security                  0x00007fff82709625 _ZN14AppleTPSession15CertGroupVerifyEllRK14cssm_certgroupPK22cssm_tp_verify_contextP29cssm_tp_verify_context_result + 2105
23  com.apple.security                  0x00007fff82708d9d _ZL20cssm_CertGroupVerifylllPK14cssm_certgroupPK22cssm_tp_verify_contextP29cssm_tp_verify_context_result + 218
24  com.apple.security                  0x00007fff82708ad3 CSSM_TP_CertGroupVerify + 105
25  com.apple.security                  0x00007fff827083f9 _ZN8Security10CssmClient6TPImpl15certGroupVerifyERKNS_9CertGroupERKNS_15TPVerifyContextEPNS_14TPVerifyResultE + 139
26  com.apple.security                  0x00007fff82702fdd _ZN8Security12KeychainCore5Trust8evaluateEb + 2601
27  com.apple.security                  0x00007fff82702408 SecTrustEvaluate + 50
28  com.apple.CFNetwork                 0x00007fff8f81750d _ZN14CFNetworkTrust8evaluateEv + 27
29  com.apple.CFNetwork                 0x00007fff8f81746f _ZN12SocketStream33doSettingsOverrideTrustEvaluationEv + 697
30  com.apple.CFNetwork                 0x00007fff8f817147 _ZN12SocketStream30securityAcceptPeerTrust_NoLockE28SSLPeerTrustAcceptancePolicy + 389
31  com.apple.CFNetwork                 0x00007fff8f7cccd7 _ZN12SocketStream11setPropertyEPKvPK10__CFStringS1_ + 2893
32  com.apple.CFNetwork                 0x00007fff8f7cc184 _ZTv0_n80_N12SocketStream11setPropertyEPKvPK10__CFStringS1_ + 16
33  com.apple.CFNetwork                 0x00007fff8f7cc16e _ZN19ReadStreamCallbacks12_setPropertyEP16__CoreReadStreamPK10__CFStringPKvPv + 42
34  com.apple.CFNetwork                 0x00007fff8f7cc13a _ZThn120_N27CoreReadStreamWithCallBacks23_streamImpl_SetPropertyEPK10__CFStringPKv + 32
35  com.apple.CFNetwork                 0x00007fff8f7cc10b _ZN14CoreStreamBase28_streamInterface_SetPropertyEPK10__CFStringPKv + 23
36  com.apple.CFNetwork                 0x00007fff8f7fb59f _ZN14HTTPReadFilter23_streamImpl_SetPropertyEPK10__CFStringPKv + 509
37  com.apple.CFNetwork                 0x00007fff8f7fb39d _ZThn120_N14HTTPReadFilter23_streamImpl_SetPropertyEPK10__CFStringPKv + 13
38  com.apple.CFNetwork                 0x00007fff8f7cc10b _ZN14CoreStreamBase28_streamInterface_SetPropertyEPK10__CFStringPKv + 23
39  com.apple.CFNetwork                 0x00007fff8f7fcef4 _ZN17HTTPNetStreamInfo23_streamImpl_SetPropertyEPK10__CFStringPKv + 480
40  com.apple.CFNetwork                 0x00007fff8f7fcd0f _ZThn120_N17HTTPNetStreamInfo23_streamImpl_SetPropertyEPK10__CFStringPKv + 13
41  com.apple.CFNetwork                 0x00007fff8f7cc10b _ZN14CoreStreamBase28_streamInterface_SetPropertyEPK10__CFStringPKv + 23
42  com.apple.CFNetwork                 0x00007fff8f816d0e _ZN12HTTPProtocol32_protocolInterface_useCredentialEPK16_CFURLCredentialP19_CFURLAuthChallenge + 286
43  com.apple.CFNetwork                 0x00007fff8f816bc4 ___ZN19URLConnectionLoader30_loaderInterface_useCredentialEPK16_CFURLCredentialP19_CFURLAuthChallenge_block_invoke + 37
44  com.apple.CFNetwork                 0x00007fff8f7ef31a ___ZNK19URLConnectionLoader25withExistingProtocolAsyncEU13block_pointerFvP11URLProtocolE_block_invoke + 25
45  com.apple.CFNetwork                 0x00007fff8f7ef2ec ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 25
46  com.apple.CoreFoundation            0x00007fff8df0aa94 CFArrayApplyFunction + 68
47  com.apple.CFNetwork                 0x00007fff8f7ef1cb _ZN19RunloopBlockContext7performEv + 115
48  com.apple.CFNetwork                 0x00007fff8f7ef073 _ZN17MultiplexerSource7performEv + 269
49  com.apple.CFNetwork                 0x00007fff8f7eeea2 _ZN17MultiplexerSource8_performEPv + 72
50  com.apple.CoreFoundation            0x00007fff8df3f5b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
51  com.apple.CoreFoundation            0x00007fff8df30c62 __CFRunLoopDoSources0 + 242
52  com.apple.CoreFoundation            0x00007fff8df303ef __CFRunLoopRun + 831
53  com.apple.CoreFoundation            0x00007fff8df2fe75 CFRunLoopRunSpecific + 309
54  com.apple.Foundation                0x00007fff8a916967 +[NSURLConnection _resourceLoadLoop:] + 348
55  com.apple.Foundation                0x00007fff8a91676b __NSThread__main__ + 1318
56  libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
57  libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
58  libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 3:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88116 _ZN3WTF15ThreadCondition9timedWaitERNS_5MutexEd + 118
2   com.apple.JavaScriptCore            0x00007fff82c87c35 _ZN3JSC14BlockAllocator22blockFreeingThreadMainEv + 117
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 4:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88737 _ZN3JSC8GCThread16waitForNextPhaseEv + 119
2   com.apple.JavaScriptCore            0x00007fff82c885c8 _ZN3JSC8GCThread12gcThreadMainEv + 88
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 5:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88737 _ZN3JSC8GCThread16waitForNextPhaseEv + 119
2   com.apple.JavaScriptCore            0x00007fff82c885c8 _ZN3JSC8GCThread12gcThreadMainEv + 88
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 6:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88737 _ZN3JSC8GCThread16waitForNextPhaseEv + 119
2   com.apple.JavaScriptCore            0x00007fff82c885c8 _ZN3JSC8GCThread12gcThreadMainEv + 88
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 7:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88737 _ZN3JSC8GCThread16waitForNextPhaseEv + 119
2   com.apple.JavaScriptCore            0x00007fff82c885c8 _ZN3JSC8GCThread12gcThreadMainEv + 88
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 8:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88737 _ZN3JSC8GCThread16waitForNextPhaseEv + 119
2   com.apple.JavaScriptCore            0x00007fff82c885c8 _ZN3JSC8GCThread12gcThreadMainEv + 88
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 9:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c88737 _ZN3JSC8GCThread16waitForNextPhaseEv + 119
2   com.apple.JavaScriptCore            0x00007fff82c885c8 _ZN3JSC8GCThread12gcThreadMainEv + 88
3   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
4   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
5   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
6   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 10:
0   libsystem_kernel.dylib              0x00007fff850209aa __select + 10
1   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
2   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
3   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 11:
0   libsystem_kernel.dylib              0x00007fff8501ca1a mach_msg_trap + 10
1   com.apple.CoreFoundation            0x00007fff8df30f15 __CFRunLoopServiceMachPort + 181
2   com.apple.CoreFoundation            0x00007fff8df30539 __CFRunLoopRun + 1161
3   com.apple.CoreFoundation            0x00007fff8df2fe75 CFRunLoopRunSpecific + 309
4   com.apple.AppKit                    0x00007fff893ea05e _NSEventThread + 144
5   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
6   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
7   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 12:
0   libsystem_kernel.dylib              0x00007fff85020716 __psynch_cvwait + 10
1   com.apple.JavaScriptCore            0x00007fff82c880dd _ZN3WTF15ThreadCondition9timedWaitERNS_5MutexEd + 61
2   com.apple.WebCore                   0x00007fff85e9e4d8 _ZN3WTF12MessageQueueINS_8FunctionIFvvEEEE33waitForMessageFilteredWithTimeoutIFbPS3_EEENS_10PassOwnPtrIS3_EERNS_22MessageQueueWaitResultERT_d + 168
3   com.apple.WebCore                   0x00007fff85e9dba3 _ZN7WebCore13StorageThread16threadEntryPointEv + 179
4   com.apple.JavaScriptCore            0x00007fff82c7cf5f _ZN3WTFL19wtfThreadEntryPointEPv + 15
5   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
6   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
7   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 13:
0   libsystem_kernel.dylib              0x00007fff8501ca1a mach_msg_trap + 10
1   com.apple.QuartzCore                0x00007fff84a67377 _ZN2CA6Render6Server13server_threadEPv + 195
2   com.apple.QuartzCore                0x00007fff84a672ad thread_fun + 25
3   libsystem_pthread.dylib             0x00007fff8e8a9899 _pthread_body + 138
4   libsystem_pthread.dylib             0x00007fff8e8a972a _pthread_struct_init + 0
5   libsystem_pthread.dylib             0x00007fff8e8adfc9 thread_start + 13
Thread 14:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 15:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 16:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 17:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 18:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 19:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 20:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 21:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 22:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 23:
0   libsystem_kernel.dylib              0x00007fff85020e6a __workq_kernreturn + 10
1   libsystem_pthread.dylib             0x00007fff8e8adfb9 start_wqthread + 13
Thread 0 crashed with X86-64 Thread State:
   rax: 0x0000000000000000    rbx: 0x000059308fd33b53    rcx: 0x0000000111fad498    rdx: 0x000059308fd55e34 
   rdi: 0x000000010ef00130    rsi: 0x0000000000000003    rbp: 0x00007fff5afa2100    rsp: 0x00007fff5afa2060 
   r10: 0x0000000111fad478    r11: 0x000000011325ff3c    r12: 0x0000000000000200    r13: 0x000000010ef000e8 
   r14: 0xffff000000000000    r15: 0xffff000000000002    rip: 0x000059308fd5590c rflags: 0x0000000000010246 
    cs: 0x000000000000002b     fs: 0x0000000000000000     gs: 0x0000000000000000
 
Ruled out the hardware defects (RAM) ? That seems to be the cause of the same crash logs that users posted on apple . com. Whats the percentage of your users that are experiencing this ? If its 10-15% I would go with bad RAM.
 
Highly unlikely that bad RAM is causing a problem like this. The first rule of programming is it's always your fault.

Ruled out the hardware defects (RAM) ? That seems to be the cause of the same crash logs that users posted on apple . com. Whats the percentage of your users that are experiencing this ? If its 10-15% I would go with bad RAM.


Thanks for the replies :) I also thought it had to do something with bad ram (I saw a similar crash report with Safari and it was due to "bad" ram.) The crash is affecting roughly about 17 percent of my user install base (55,000+) Also thanks for the article I will recheck my code so make sure that's not the problem. I just wishes I could have replicate the problem on my machines :confused:
 

Attachments

  • Screen Shot 2014-07-16 at 3.42.03 PM.png
    Screen Shot 2014-07-16 at 3.42.03 PM.png
    118.3 KB · Views: 219
Thanks for the replies :) I also thought it had to do something with bad ram (I saw a similar crash report with Safari and it was due to "bad" ram.) The crash is affecting roughly about 17 percent of my user install base (55,000+) Also thanks for the article I will recheck my code so make sure that's not the problem. I just wishes I could have replicate the problem on my machines :confused:

If it is crashing on startup, you have to provide us your startup code. What is you app doing when it starts?

ps: your user base is more like 135~, not 55.000 :p
 
If it is crashing on startup, you have to provide us your startup code. What is you app doing when it starts?

ps: your user base is more like 135~, not 55.000 :p

No it's not crashing on launch but here is my start up code:

Code:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    // Insert code here to initialize your application
    
    
    
    //System Version check
    if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_8) {
        /* On a 10.8 - 10.8.x system */
        NSLog(@"On a 10.8 - 10.8.x system");
        [[NSUserDefaults standardUserDefaults]setInteger:1 forKey:@"EnergyOptimization"];
        
        //Set BOOL to no
        isOnMavericks = NO;

    } else {
        /* 10.9 or later system */
        NSLog(@"10.9 or later system");
        //Set Delegate to get occlusionState changes
        [self.window setDelegate:self];
        
        //Set BOOL TO YES
        isOnMavericks = YES;
    }
    NSString *defaultPrefsFile = [[NSBundle mainBundle] pathForResource:@"defaultPrefs" ofType:@"plist"];

    NSDictionary *defaultPreferences = [NSDictionary dictionaryWithContentsOfFile:defaultPrefsFile];
    [[NSUserDefaults standardUserDefaults] registerDefaults:defaultPreferences];
    [[NSUserDefaults standardUserDefaults]synchronize];
    
    [NSApplication setPublicKeyWithString:SECURITY_PUBLIC_KEY()];
    [[NSUserDefaults standardUserDefaults] setSecret:@"your_secret_goes_here"];
    
    //Start DevMateIssues
    DMIssuesController *controller = [DMIssuesController sharedController];
    [controller enableCrashReporting];
    [controller enableUncaughtExceptionReporting];
    [controller reportUnhandledProblemsIfExists];
    

    
    //Send report
    DMTrackingReporter *reporter = [DMTrackingReporter reporterWithInfoProvider:self];
    reporter.delegate = self;
    [self performSelector:@selector(sendTrackingReport)];

    
    #pragma Internet Checking via Reachability class
    // Allocate a reachability object
    Reachability * reach = [Reachability reachabilityWithHostname:@"www.google.com"];
    
    // Tell the reachability that we DON'T want to be reachable on 3G/EDGE/CDMA
    reach.reachableOnWWAN = NO;
    
    // Here we set up a NSNotification observer. The Reachability that caused the notification
    // is passed in the object parameter
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(reachabilityStatuesChanged:)
                                                 name:kReachabilityChangedNotification
                                               object:nil];
    
    //Start class
    
    [reach startNotifier];
    
       


 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
    NSString *homePageDefault = [defaults valueForKey:@"HomePageURL"];
    
    //
    NSLog(@"%@",homePageDefault);
    
    if ([defaults boolForKey:@"UpdateLaunchCheck"] == YES){
        [[SUUpdater sharedUpdater]checkForUpdatesInBackground];
    } else{
        
        //Do nothing in this case
    }
    
    if ([defaults integerForKey:@"UserAgent"] == 1){
        NSLog(@"UserAgent Default");
        
        [self.TBWebView setCustomUserAgent:@"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14"];
        [[self.TBWebView mainFrame]loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:homePageDefault]]];


    } else{
        NSLog(@"UserAgentiPad");
        [self.TBWebView setCustomUserAgent:@"Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53"];
        [[self.TBWebView mainFrame]loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:homePageDefault]]];

    }

    // Set WebView Delegates and other customizations.
    [self.TBWebView setUIDelegate:self];
    [self.TBWebView setShouldUpdateWhileOffscreen:true];
    [self.TBWebView setFrameLoadDelegate:self];
    [self.addressField setDelegate:self];
    [self.TBWebView setGroupName:@"MyDocument"];
    [[SUUpdater sharedUpdater]setDelegate:self];
    [self.exMenu setDelegate:self];
    

    // Detect when application is shutting down or logging out
    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: self
                                                           selector: @selector(receivePowerOffNote:)
                                                               name: NSWorkspaceWillPowerOffNotification object: NULL];
    
    // Detect when computer is about to go to sleep
    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: self
                                                           selector: @selector(receivePowerGoingtosleepNote:)
                                                               name: NSWorkspaceWillSleepNotification object: NULL];
    // Detect when computer is about to go to wake up
    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: self
                                                           selector: @selector(receivePowerGoingtoWakeUpNote:)
                                                               name: NSWorkspaceDidWakeNotification object: NULL];
       self.windowControllers = [NSMutableArray array];
    
    [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self];

    
    // Get current version ("Bundle Version") from the default Info.plist file
    NSString *currentVersion = (NSString*)[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
    NSArray *prevStartupVersions = [[NSUserDefaults standardUserDefaults] arrayForKey:@"prevStartupVersions"];
    if (prevStartupVersions == nil)
    {
        //MUST ADD HELP METHOD HERE!
        NSLog(@"Fresh install");
        freshInstall = YES;
        
        NSMutableArray *updatedPrevStartVersions = [NSMutableArray arrayWithArray:prevStartupVersions];
        [updatedPrevStartVersions addObject:currentVersion];
        [[NSUserDefaults standardUserDefaults] setObject:updatedPrevStartVersions forKey:@"prevStartupVersions"];
        
        
        [[self.addressField cell] setPlaceholderString:[NSString stringWithFormat:NSLocalizedString(@"To start copy and paste a YouTube video URL here and click the Download Button", nil),34,34]];

         }
    else
    {
        if (![prevStartupVersions containsObject:currentVersion])
        {
            NSLog(@" Starting up for first time with this version of the app. This  means a different version of the app was alread installed once and started");
            
            
            NSMutableArray *updatedPrevStartVersions = [NSMutableArray arrayWithArray:prevStartupVersions];
            [updatedPrevStartVersions addObject:currentVersion];
            [[NSUserDefaults standardUserDefaults] setObject:updatedPrevStartVersions forKey:@"prevStartupVersions"];
            
            
            
        }
    }
    [[NSUserDefaults standardUserDefaults]synchronize];
   
    

    
    updateTimer = [NSTimer scheduledTimerWithTimeInterval: [[SUUpdater sharedUpdater]updateCheckInterval]
                                                   target: self
                                                 selector:@selector(updateTimerTick:)
                                                 userInfo: nil repeats:YES];
    //Fire timer
    [updateTimer fire];


P.S: My user install base is around 40,000+. I guess there was a miscalculation of the error statistics.
 

Attachments

  • Screen Shot 2014-07-16 at 7.46.47 PM.png
    Screen Shot 2014-07-16 at 7.46.47 PM.png
    57.2 KB · Views: 255
Last edited:
Thanks for the info. Here is the full crash report.
Two thoughts ( FWIW ):
(1) the crash report shows a timer firing just before it crashes. The startup code schedules a timer, so I'd be looking in the method callback ( i.e. updateTimerTick: )

(2) If you have a helpful user, I would send them a copy of the program with all debugging turned on and nothing stripped out. This will provide a more helpful crashreport.

For example: here is a partial crash report with nothing stripped. Notice the line numbers for the crash ( i.e. m:12 ) and the function name 'Crash' where the crash occurred.

Code:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.Test.demo                 	0x000a46fd Crash + 13 (_1_test,test.m:12)
1   com.Test.demo                 	0x000a474e main + 46 (_1_test,test.m:31)
2   libdyld.dylib                 	0x98521701 start + 1

The same partial crash report with code optimized, stripped, etc. is less helpful:

Code:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.Test.demo                 	0x000cf7cf 0xb8000 + 96207
1   libdyld.dylib                 	0x98521701 start + 1
 
Two thoughts ( FWIW ):
(1) the crash report shows a timer firing just before it crashes. The startup code schedules a timer, so I'd be looking in the method callback ( i.e. updateTimerTick: )

(2) If you have a helpful user, I would send them a copy of the program with all debugging turned on and nothing stripped out. This will provide a more helpful crashreport.

For example: here is a partial crash report with nothing stripped. Notice the line numbers for the crash ( i.e. m:12 ) and the function name 'Crash' where the crash occurred.

Code:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.Test.demo                 	0x000a46fd Crash + 13 (_1_test,test.m:12)
1   com.Test.demo                 	0x000a474e main + 46 (_1_test,test.m:31)
2   libdyld.dylib                 	0x98521701 start + 1

The same partial crash report with code optimized, stripped, etc. is less helpful:

Code:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.Test.demo                 	0x000cf7cf 0xb8000 + 96207
1   libdyld.dylib                 	0x98521701 start + 1

Thank you for your reply.

(1) Here is the method call back:
Code:
-(void)updateTimerTick:(NSTimer *)timer {
    
    if ([[SUUpdater sharedUpdater]updateInProgress] == YES) {
        NSLog(@"Sparkle is already checking for an update, no need to auto check for update.");
    } else if ([[SUUpdater sharedUpdater]updateInProgress] == NO){
        
              // No update in progress
        
            if ([[NSUserDefaults standardUserDefaults]boolForKey:@"SUAutomaticallyUpdate"]== YES) {
                NSLog(@"Has SUAutomaticallyUpdate == YES. Checking for update.");
                //Check for update
                [[SUUpdater sharedUpdater]checkForUpdatesInBackground];
                // get current date/time
                NSDate *today = [NSDate date];
                NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
                [dateFormatter setDateFormat:@"MM/dd/yyyy hh:mm:ss a"];
                
                NSString *currentTime = [dateFormatter stringFromDate:today];
                NSLog(@"%@",currentTime);
                NSLog(@"Auto update check at: %@", currentTime);
                
                //Conversation for next update check time.
                // get current date/time
                NSDate *nextUpdateCurrentTime = [NSDate date];
                NSDate *dateOneHourAhead = [nextUpdateCurrentTime dateByAddingTimeInterval:[[SUUpdater sharedUpdater]updateCheckInterval]];
                NSDateFormatter *dateFormatternextUpdateCurrentTime = [[NSDateFormatter alloc] init];
                [dateFormatternextUpdateCurrentTime setDateFormat:@"MM/dd/yyyy hh:mm:ss a"];
                
                NSString *currentTimenextUpdateCurrentTime = [dateFormatter stringFromDate:dateOneHourAhead];
                
                NSLog(@"Next update check will be at: %@",currentTimenextUpdateCurrentTime);
                
                
            } else{
                NSLog(@"Has SUAutomaticallyUpdate == NO. Do not auto update.");
            }
        }
    }

(2) Are you referring to the "Deployment" section of Xcode's Build setting tab?
Are there any other setting I will have to change to achieve this?
Looking forward to your reply :) :D
 

Attachments

  • Screen Shot 2014-07-20 at 12.08.43 AM.png
    Screen Shot 2014-07-20 at 12.08.43 AM.png
    11.9 KB · Views: 189
You are using NSLog in your code so system log will contain their output. If you can get contents of system log for affected user just after App is crashed it may help track down the issue.

Do you performing crash reporting by yourself from the App? If yes you can ask user with some alert prompt (Do you consent to provide extended diagnostic information?) and send recent system log with crash report. (this makes sense if you releasing update for App and issue is still here)
 
(2) Are you referring to the "Deployment" section of Xcode's Build setting tab?
Yes. Make Strip Linked Product "No" and Deployment Postprocessing "No"
In the LLVM 5.1 Code Generation section I set Generate Debug Symbols to "Yes" and turn off Link-Time Optimization and set Optimization Level to None. Basically, anything that allows the compiler/linker to optimize code ( unrolling loops, dead code strip, optimize ) should be turned off because it allows the failure point to match your source code. Again, this is all for debugging. If you have a friendly user send them the "Debug" version and not "Release".

But for some reason my users are reporting that it is crashing on launch.

but a seemingly contradictory later post ( underline and bolding my emphasis):

No it's not crashing on launch but here is my start up code:

I'm wondering if there is some unmentioned clue to support either statement.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.