I have the following crash report but I can't figure out the cause of this crash. This crash appears quite frequently but the pattern varies at each time. Many thanks!
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000198337270 __pthread_kill + 8
1 libsystem_c.dylib 0x00000001982aeb18 abort + 112
2 libsystem_malloc.dylib 0x00000001983723e4 <redacted> + 0
3 libsystem_malloc.dylib 0x00000001983712f8 <redacted> + 192
4 CoreFoundation 0x00000001866c55e8 <redacted> + 192
5 CoreFoundation 0x00000001865d1394 CFRelease + 328
6 CoreFoundation 0x00000001866bc2bc _CFStringCreateWithFormatAndArgumentsAux2 + 272
7 Foundation 0x0000000187502448 -[NSPlaceholderString initWithFormat:locale:arguments:] + 172
8 0x000000010020f088 _mh_execute_header + 1536136
9 0x0000000100225614 _mh_execute_header + 1627668
10 0x00000001001ac6d0 _mh_execute_header + 1132240
11 CFNetwork 0x00000001861745b8 <redacted> + 80
12 CFNetwork 0x0000000186174548 <redacted> + 208
13 CFNetwork 0x00000001861746c4 <redacted> + 60
14 CFNetwork 0x0000000186047990 <redacted> + 104
15 CFNetwork 0x000000018611150c <redacted> + 104
16 CFNetwork 0x0000000186033ac8 <redacted> + 76
17 CoreFoundation 0x00000001865d4cdc CFArrayApplyFunction + 68
18 CFNetwork 0x0000000186033974 <redacted> + 136
19 CFNetwork 0x0000000186033828 <redacted> + 312
20 CFNetwork 0x0000000186033654 <redacted> + 68
21 CoreFoundation 0x00000001866ac240 <redacted> + 24
22 CoreFoundation 0x00000001866ab4e4 <redacted> + 264
23 CoreFoundation 0x00000001866a9594 <redacted> + 712
24 CoreFoundation 0x00000001865d52d4 CFRunLoopRunSpecific + 396
25 GraphicsServices 0x000000018fc9b6fc GSEventRunModal + 168
26 UIKit 0x000000018b19afac UIApplicationMain + 1488
27 0x000000010024bf1c _mh_execute_header + 1785628
28 libdyld.dylib 0x000000019821ea08 <redacted> + 4
I am assuming that you download some information from the web and are trying to create a string with some parts of that information:
6 CoreFoundation 0x00000001866bc2bc _CFStringCreateWithFormatAndArgumentsAux2 + 272
7 Foundation 0x0000000187502448 -[NSPlaceholderString initWithFormat:locale:arguments:] + 172
Where ever you are using information that you fetched from the Internet, you should first check if that information is valid and respects the right format you expect. Therefore, I recommend you to validate the information before using it.
this might help you:
iPhone app crash at [NSString stringWithFormat]
the error line must be:
[NSString stringWithFormat:#"%#,%#...",a,b...];
Related
how can I locate the code where exception raised like below?
this only happened on few devices like iPhone6 run iOS 10
xcode stack trace screenshot
and also
Application received signal SIGSEGV (null)
0 CoreFoundation 0x00000001831e01d8 <redacted> + 148
1 libobjc.A.dylib 0x0000000181c1855c objc_exception_throw + 56
2 CoreFoundation 0x00000001831e0108 <redacted> + 0
3 xxx 0x100464a00 xxx + 4606464
4 libsystem_platform.dylib 0x000000018226f338 _sigtramp + 36
5 UIKit 0x000000018902b588 <redacted> + 80
6 QuartzCore 0x00000001864ee448 <redacted> + 208
7 QuartzCore 0x00000001864e30e8 <redacted> + 292
8 QuartzCore 0x00000001864e2fa8 <redacted> + 32
9 QuartzCore 0x000000018645fc64 <redacted> + 252
10 QuartzCore 0x00000001864870d0 <redacted> + 512
11 QuartzCore 0x0000000186487af0 <redacted> + 120
12 CoreFoundation 0x000000018318d7dc <redacted> + 32
13 CoreFoundation 0x000000018318b40c <redacted> + 372
14 CoreFoundation 0x00000001830ba068 CFRunLoopRunSpecific + 476
15 WebCore 0x0000000187c5ba2c <redacted> + 456
16 libsystem_pthread.dylib 0x0000000182273860 <redacted> + 240
17 libsystem_pthread.dylib 0x0000000182273770 <redacted> + 0
18 libsystem_pthread.dylib 0x0000000182270dbc thread_start + 4
I have a stack trace from Flurry that is from a crash that is happening a couple times on my app and I dont understand what is going wrong. Any suggestions or hints how I can make sense of this?
0 CoreFoundation 0x184bc2084 <redacted> + 132
1 libobjc.A.dylib 0x1951a00e4 _objc_exception_throw + 60
2 CoreFoundation 0x184ab6ff8 <redacted> + 0
3 My App 0x100015ef4 __mh_execute_header + 73460
4 My App 0x10000c61c __mh_execute_header + 34332
5 My App 0x10000b024 __mh_execute_header + 28708
6 CFNetwork 0x1846624cc <redacted> + 80
7 CFNetwork 0x18466245c <redacted> + 208
8 CFNetwork 0x1846625d8 <redacted> + 60
9 CFNetwork 0x184537684 <redacted> + 104
10 CFNetwork 0x1845ffcb8 <redacted> + 104
11 CFNetwork 0x1845239cc <redacted> + 76
12 CoreFoundation 0x184aa506c _CFArrayApplyFunction + 68
13 CFNetwork 0x184523878 <redacted> + 136
14 CFNetwork 0x18452372c <redacted> + 312
15 CFNetwork 0x184523558 <redacted> + 68
16 CoreFoundation 0x184b7a324 <redacted> + 24
17 CoreFoundation 0x184b795c8 <redacted> + 264
18 CoreFoundation 0x184b77678 <redacted> + 712
19 CoreFoundation 0x184aa5664 _CFRunLoopRunSpecific + 396
20 GraphicsServices 0x18dbe75a4 _GSEventRunModal + 168
21 UIKit 0x1893aa4f8 _UIApplicationMain + 1488
22 My App 0x10000c8f0 __mh_execute_header + 35056
23 libdyld.dylib 0x19580ea08 <redacted> + 4
I wanted to have a backtrace with the classes and method names displayed every time the app crashes. I managed to do it in debug mode, using this code (the printTrace function just prints the string on a file.):
void HandleException(NSException *exception)
{
[SILogManager printTrace:[NSString stringWithFormat:#"******************** CRASH *********************"]];
[SILogManager printTrace:[NSString stringWithFormat:#"-> Stack Trace: %#", [exception callStackSymbols]]];
}
Although this won't work when the app is released, because it will produce a stacktrace like this one:
******************** CRASH *********************
-> Stack Trace: (
0 CoreFoundation 0x27b5f60f <redacted> + 150
1 libobjc.A.dylib 0x35613c77 objc_exception_throw + 38
2 CoreFoundation 0x27a733a7 <redacted> + 178
3 iSelz POS 0x000bf6c7 iSelz POS + 403143
4 iSelz POS 0x000bf099 iSelz POS + 401561
5 iSelz POS 0x000dda31 iSelz POS + 526897
6 CFNetwork 0x276b7eed <redacted> + 56
7 CFNetwork 0x276b7ea7 <redacted> + 182
8 CFNetwork 0x276b7f99 <redacted> + 36
9 CFNetwork 0x275cceef <redacted> + 78
10 CFNetwork 0x2766976d <redacted> + 60
11 CFNetwork 0x275bdd71 <redacted> + 60
12 CoreFoundation 0x27a705a1 CFArrayApplyFunction + 36
13 CFNetwork 0x275bdc2b <redacted> + 182
14 CFNetwork 0x275bdaf1 <redacted> + 216
15 CFNetwork 0x275bd98d <redacted> + 48
16 CoreFoundation 0x27b25fd7 <redacted> + 14
17 CoreFoundation 0x27b253eb <redacted> + 222
18 CoreFoundation 0x27b23a69 <redacted> + 768
19 CoreFoundation 0x27a70b31 CFRunLoopRunSpecific + 476
20 CoreFoundation 0x27a70943 CFRunLoopRunInMode + 106
21 GraphicsServices 0x2edf8051 GSEventRunModal + 136
22 UIKit 0x2b0666f1 UIApplicationMain + 1440
23 iSelz POS 0x00066aab iSelz POS + 39595
24 libdyld.dylib 0x35bafaaf <redacted> + 2
)
And I don't find it very useful.
I've also already tried to call backtrace and backtrace_symbols manually, but it doesn't work!
In the project properties, I have the following settings, that should copy all the dynamic symbols when building, so I still can't figure out why it isn't working!
What can I do to have this feature also in the released app? What am I doing wrong?
Thank you in advance!
From the breadcrumbs , I figured out that the app crashes right after launch and few api calls. What seems to be the issue here? Can't paste any relevant code here as this crash is not reproducible. Following is the stack trace:
Crashed Thread
1 CFNetwork 0x2da6bf95 _ZN8CFObject8AllocateEmRK7CFClassPK13__CFAllocator + 105
2 CFNetwork 0x2da82bd3 _ZN19HTTPConnectionCache21createEmptyCacheEntryEv + 20
3 CFNetwork 0x2da82a43 _ZN19HTTPConnectionCache34_onqueue_enqueueRequestForProtocolEP12HTTPProtocolP15__CFHTTPMessage + 64
4 CFNetwork 0x2dada00d ___ZN19HTTPConnectionCache25enqueueRequestForProtocolEP12HTTPProtocolP15__CFHTTPMessage_block_invoke + 14
5 CoreFoundation 0x2ddb68f1 CFArrayApplyFunction + 34
6 CFNetwork 0x2da7f6bb _ZN19RunloopBlockContext7performEv + 180
7 CFNetwork 0x2da7f579 _ZN17MultiplexerSource7performEv + 218
8 CFNetwork 0x2da7f40d _ZN17MultiplexerSource8_performEPv + 46
9 CoreFoundation 0x2de4e20b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
10 CoreFoundation 0x2de4d6db __CFRunLoopDoSources0 + 204
11 CoreFoundation 0x2de4becf __CFRunLoopRun + 620
12 CoreFoundation 0x2ddb6ebf CFRunLoopRunSpecific + 520
13 CoreFoundation 0x2ddb6ca3 CFRunLoopRunInMode + 104
14 Foundation 0x2e7f7087 +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
15 Foundation 0x2e86ca5f __NSThread__main__ + 1060
16 libsystem_pthread.dylib 0x38d29919 _pthread_body + 138
17 libsystem_pthread.dylib 0x38d2988b _pthread_start + 100
18 libsystem_pthread.dylib 0x38d27aa4 thread_start + 6
While running my ios app a user has encountered the following error. It has only happened once and I cannot figure out how to repeat the error. Could someone please interpret the following stacktrace to help me find the cause of the error.
Signal
Unknown Signal
Stacktrace (9)
0 LeadsBoard 0x0001b5f2 testflight_backtrace + 142
1 LeadsBoard 0x0001c180 TFSignalHandler + 212
2 libsystem_c.dylib 0x3419d72e _sigtramp + 42
3 libsystem_c.dylib 0x341923ba pthread_kill + 58
4 libsystem_c.dylib 0x3418abfe abort + 78
5 libsystem_c.dylib 0x3419e828 szone_error + 216
6 libsystem_c.dylib 0x341a4f0e szone_realloc + 66
7 libsystem_c.dylib 0x341c60e6 malloc_zone_realloc + 62
8 Foundation 0x3486bcf4 NSZoneRealloc + 32
9 Foundation 0x3486bb40 _NSMutableDataGrowBytes + 336
10 Foundation 0x3486b96c -[NSConcreteMutableData appendData:] + 80
11 LeadsBoard 0x0000fd90 -[DataModelPeopleClass connection:didReceiveData:] (DataModelPeopleClass.m:152)
12 Foundation 0x3486b8f6 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidReceiveData:originalLength:] + 150
13 Foundation 0x3486b822 _NSURLConnectionDidReceiveData + 90
14 CFNetwork 0x35a7406c _ZN19URLConnectionClient21_clientDidReceiveDataEPK8__CFDataPNS_26ClientConnectionEventQueueE + 172
15 CFNetwork 0x35a68fb4 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 212
16 CFNetwork 0x35a68e36 _ZN19URLConnectionClient13processEventsEv + 70
17 CFNetwork 0x35a68de8 _ZN13URLConnection24multiplexerClientPerformEP18RunLoopMultiplexer + 36
18 CFNetwork 0x35a68d5a _ZN17MultiplexerSource7performEv + 126
19 CFNetwork 0x35a68cd8 _ZN17MultiplexerSource8_performEPv + 8
20 CoreFoundation 0x36487a78 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
21 CoreFoundation 0x3648975e __CFRunLoopDoSources0 + 382
22 CoreFoundation 0x3648a4ea __CFRunLoopRun + 230
23 CoreFoundation 0x3641aec2 CFRunLoopRunSpecific + 230
24 CoreFoundation 0x3641adca CFRunLoopRunInMode + 58
25 GraphicsServices 0x35bd441e GSEventRunModal + 114
26 GraphicsServices 0x35bd44ca GSEventRun + 62
27 UIKit 0x352c4d68 -[UIApplication _run] + 404
28 UIKit 0x352c2806 UIApplicationMain + 670
29 LeadsBoard 0x000020fc main (main.m:14)
30 LeadsBoard 0x000020c7 start + 39
Environment
Device Name: iPhone
Model: iPhone 4
Version: 4.3.5
Language: en_AU (English)
Carrier: Virgin Mobile
Timezone: AEST
Architecture: armv7
Connection State: Wifi
Check your NSURLConnection delegates, specifically in DataModelPeopleClass.