This iPhone App will dial and hangup a call automatically. It works on jailbroken devices.
Sometimes it will crash when hanging up a phone call.
What is the problem and how do I fix it?
Exception Type: EXC_GUARD
Exception Subtype: GUARD_TYPE_FD
Exception Message: CLOSE on file descriptor 16 (guarded with 0x08fd4dbfade2dead)
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x38cdf130 __close_nocancel + 12
1 libsystem_c.dylib 0x38c4fcd5 fclose + 69
2 libCGFreetype.A.dylib 0x2e56dde5 FT::file_stream::~file_stream() + 25
3 libCGFreetype.A.dylib 0x2e56ddbb FT::file_stream::~file_stream() + 7
4 libCGFreetype.A.dylib 0x2e5730b5 destroy_face + 117
5 libCGFreetype.A.dylib 0x2e573039 FT_Done_Face + 93
6 libCGFreetype.A.dylib 0x2e5658e3 FT::face_release(FT_FaceRec_*) + 95
7 libCGFreetype.A.dylib 0x2e568f31 FT::font::~font() + 269
8 libCGFreetype.A.dylib 0x2e568e13 FT::font::~font() + 7
9 libCGFreetype.A.dylib 0x2e56fa77 (anonymous namespace)::release_private_data(void*) + 55
10 CoreGraphics 0x2e51301f font_finalize + 27
11 CoreFoundation 0x2e2ffe2d CFRelease + 465
12 libcache.dylib 0x38bc321f _value_entry_remove + 139
13 libcache.dylib 0x38bc25b3 _entry_remove + 195
14 libcache.dylib 0x38bc2761 cache_remove_with_block + 129
15 CoreFoundation 0x2e307fcb __CFNotificationCenterAddObserver_block_invoke + 123
16 CoreFoundation 0x2e391e6f __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 11
17 CoreFoundation 0x2e305aad _CFXNotificationPost + 1717
18 Foundation 0x2ecebec1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 69
19 UIKit 0x30bd7e79 -[UIApplication _handleApplicationSuspend:eventInfo:] + 909
20 UIKit 0x30b590c3 -[UIApplication handleEvent:withNewEvent:] + 771
21 UIKit 0x30b58cf9 -[UIApplication sendEvent:] + 69
22 UIKit 0x30bbe31d _UIApplicationHandleEvent + 661
23 GraphicsServices 0x3303876b _PurpleEventCallback + 607
24 GraphicsServices 0x33038353 PurpleEventCallback + 31
25 CoreFoundation 0x2e39a775 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 33
26 CoreFoundation 0x2e39a70f __CFRunLoopDoSource1 + 343
27 CoreFoundation 0x2e398edb __CFRunLoopRun + 1403
28 CoreFoundation 0x2e30346d CFRunLoopRunSpecific + 521
29 CoreFoundation 0x2e30324f CFRunLoopRunInMode + 103
30 GraphicsServices 0x330372e7 GSEventRunModal + 135
31 UIKit 0x30bb8841 UIApplicationMain + 1133
32 MyApp 0x000f6d0d main (main.m:15)
33 libdyld.dylib 0x38c29ab5 start + 1
It looks like you have a bogus file descriptor that its trying to close. The address ends in "fade2dead", which is likely a special value to indicate freed memory. Since I don't see any of your code in the stack trace, it's likely that something is overwriting memory used by the FreeType library. I'd look for other memory stompers in your code using GuardMalloc or other similar memory tools to track down what it could be, as it's not obvious from the above stack trace.
Related
My app relatively often crashes with SIGSEGV. Unfortunately, I can not reproduce the crash and only see crash reports in Hockeyapp. I tried turning zombies on, too.
Looking at the crash report it seems that app crashes when processing touches (when user scrolling or something like this). No my app code mentioned in the stack trace.
The question is: how is it possible to have memory issue in this scenario? What would you recommend to reproduce and fix the issue?
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x71a86113
Crashed Thread: 0
Application Specific Information:
objc_msgSend() selector name: convertPoint:fromLayer:
Thread 0 Crashed:
0 libobjc.A.dylib 0x2106fae6 objc_msgSend_stret + 6
1 UIKit 0x25e7a349 -[UIView(Geometry) convertPoint:fromView:] + 98
2 UIKit 0x25e7e987 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 104
3 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
4 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
5 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
6 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
7 UIKit 0x25e7e9bd __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 158
8 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
9 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
10 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
11 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
12 UIKit 0x26136491 __70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 186
13 UIKit 0x25e4783f +[UIWindow _topVisibleWindowPassingTest:] + 156
14 UIKit 0x26136399 +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 142
15 UIKit 0x26136629 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 158
16 UIKit 0x260ffb61 _UIApplicationHandleDigitizerEvent + 10982
17 UIKit 0x25e4123f _UIApplicationHandleEventQueue + 3836
18 CoreFoundation 0x21889dff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
19 CoreFoundation 0x218899ed __CFRunLoopDoSources0 + 450
20 CoreFoundation 0x21887d5b __CFRunLoopRun + 792
21 CoreFoundation 0x217d7229 CFRunLoopRunSpecific + 518
22 CoreFoundation 0x217d7015 CFRunLoopRunInMode + 106
23 GraphicsServices 0x22dc7ac9 GSEventRunModal + 158
24 UIKit 0x25eab189 UIApplicationMain + 142
25 My App. 0x0005376b main (main.m:14)
26 ??? 0x2147f873 0x0 + 0
I get the following crash log from Crashlytics for my app. My code do not call msgpack_zone_free or msgpack parse method at all and so I'm confused how that happened. I'm unable to reproduce this crash myself so I'm left to analyze the issue from the crash report itself. Any pointers to what I need to check will be very helpful.
This is not a case of low memory as I see free memory from Crashlytics.
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x0000000192953bd0 objc_msgSend + 16
1 CoreFoundation 0x00000001820d5228 CFRelease + 524
2 CoreFoundation 0x00000001821e62ac -[__NSArrayM removeAllObjects] + 284
3 MyApp 0x00000001004a69e0 msgpack_zone_free
4 MyApp 0x00000001004a4afc msgpack_zone_free
5 CoreFoundation 0x000000018219cae4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
6 CoreFoundation 0x00000001820db220 _CFXNotificationPost + 2060
7 Foundation 0x0000000182fdac60 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
8 UIKit 0x0000000186c32e98 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 1132
9 UIKit 0x0000000186c3b370 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 92
10 UIKit 0x0000000186c3b2f8 -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 380
11 UIKit 0x0000000186c2ec2c -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 512
12 FrontBoardServices 0x000000018a45d62c __31-[FBSSerialQueue performAsync:]_block_invoke + 28
13 CoreFoundation 0x00000001821aea28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
14 CoreFoundation 0x00000001821adb30 __CFRunLoopDoBlocks + 312
15 CoreFoundation 0x00000001821ac154 __CFRunLoopRun + 1756
16 CoreFoundation 0x00000001820d90a4 CFRunLoopRunSpecific + 396
17 GraphicsServices 0x000000018b2735a4 GSEventRunModal + 168
18 UIKit 0x0000000186a0aaa4 UIApplicationMain + 1488
19 MyApp 0x00000001000cce40 main (main.m:16)
20 libdyld.dylib 0x0000000192faea08 start + 4
Thanks.
I'm using Crittercism (SDK 4.1.2) crash reporting service to catch reports on my iOS app. i've been getting this crash many times and i've no idea why it's happening.
Name: SIGSEGV - Reason: Main
Crashed Thread
0 libobjc.A.dylib 0x397c4b26 objc_msgSend + 6
1 UIKit 0x31965a2d -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 177
2 UIKit 0x31a0e4b3 -[UIAnimator stopAnimation:] + 471
3 UIKit 0x31a0de9d -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 285
4 UIKit 0x31a0dd7d -[UIAnimator(Static) _LCDHeartbeatCallback:] + 53
5 QuartzCore 0x315419cf _ZN2CA7Display15DisplayLinkItem8dispatchEv + 99
6 QuartzCore 0x31541779 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 345
7 IOMobileFramebuffer 0x3411b76d IOMobileFramebufferVsyncNotifyFunc + 105
8 IOKit 0x2fdd9a75 IODispatchCalloutFromCFMessage + 249
9 CoreFoundation 0x2f0b7e21 __CFMachPortPerform + 137
10 CoreFoundation 0x2f0c29df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
11 CoreFoundation 0x2f0c297b __CFRunLoopDoSource1 + 347
12 CoreFoundation 0x2f0c114f __CFRunLoopRun + 1399
13 CoreFoundation 0x2f02bc27 CFRunLoopRunSpecific + 523
14 CoreFoundation 0x2f02ba0b CFRunLoopRunInMode + 107
15 GraphicsServices 0x33cff283 GSEventRunModal + 139
16 UIKit 0x318cf049 UIApplicationMain + 1137
17 AppName 0x000b1fef main + 67
Not sure if this is the case for you, but I've had a similar crash caused by a button in an UIView trying to invoke a callback method on a already released object. The UI was displayed, and then the object was released.
I am testing my app out, pushing it pretty hard, and I'm getting it to crash (black screen, image doesn't save, drops back to springboard). However, I get no crash reports logged in the console. When I test using profiler all I get is a message saying the target died, but it gives no clues.
In the organiser I got the device crash logs which gives me this which I believe is telling me I'm sending a message to something I've released (objc-msgSend + 22)? Am I on the right track here?
---
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x576e6f69
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x34f8ef7e objc_msgSend + 22
1 CoreFoundation 0x371d7e90 CFRetain + 76
2 CoreFoundation 0x371e1b74 +[__NSArrayI __new::] + 48
3 CoreFoundation 0x371e1a8e -[__NSPlaceholderArray initWithObjects:count:] + 294
4 CoreFoundation 0x371e9394 -[NSArray initWithArray:range:copyItems:] + 756
5 CoreFoundation 0x371fcd5a +[NSArray arrayWithArray:] + 66
6 AVFoundation 0x335da766 -[AVCaptureSession outputs] + 146
7 AVFoundation 0x335de26e -[AVCaptureSession _doDidStop:] + 38
8 AVFoundation 0x335dfaea -[AVCaptureSession _handleNotification:payload:] + 2002
9 AVFoundation 0x335d8af6 avcaptureSessionFigRecorderNotification + 1202
10 AVFoundation 0x335fafd8 AVCMNotificationDispatcherCallback + 184
11 CoreFoundation 0x3725b7c8 __CFNotificationCenterAddObserver_block_invoke_0 + 116
12 CoreFoundation 0x3725b540 ___CFXNotificationPost_block_invoke_0 + 64
13 CoreFoundation 0x371e7090 _CFXNotificationPost + 1400
14 CoreFoundation 0x371ef1c6 CFNotificationCenterPostNotification + 102
15 CoreMedia 0x366eeeb0 CMNotificationCenterPostNotification + 112
16 Celestial 0x374b08a2 FigRecorderRemoteCallbacksServer_NotificationIsPending + 478
17 Celestial 0x374b06ba _XNotificationIsPending + 54
18 Celestial 0x374b0678 figrecordercallbacks_server + 92
19 Celestial 0x374af642 remrec_ClientPortCallBack + 146
20 CoreFoundation 0x37258f0c __CFMachPortPerform + 356
21 CoreFoundation 0x3726351c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
22 CoreFoundation 0x372634be __CFRunLoopDoSource1 + 134
23 CoreFoundation 0x3726230c __CFRunLoopRun + 1364
24 CoreFoundation 0x371e549e CFRunLoopRunSpecific + 294
25 CoreFoundation 0x371e5366 CFRunLoopRunInMode + 98
26 AVFoundation 0x335ef4d0 -[AVRunLoopCondition _waitInMode:untilDate:] + 348
27 AVFoundation 0x335ef36c -[AVRunLoopCondition waitUntilDate:inMode:] + 20
28 AVFoundation 0x335dc13a -[AVCaptureSession _stopPreviewing] + 438
29 AVFoundation 0x335dc2d6 -[AVCaptureSession _setRunning:] + 166
30 AVFoundation 0x335dbe42 -[AVCaptureSession stopRunning] + 274
31 zApp 0x0007e1ce 0x79000 + 20942
32 UIKit 0x30fa5b8e -[UIViewController _setViewAppearState:isAnimating:] + 138
33 UIKit 0x30fff8a8 -[UIViewController beginAppearanceTransition:animated:] + 184
34 UIKit 0x310468be -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4098
35 UIKit 0x31045360 -[UIViewController presentViewController:withTransition:completion:] + 3116
36 UIKit 0x310a06a0 -[UIViewController presentModalViewController:animated:] + 24
37 CoreFoundation 0x371e93f6 -[NSObject performSelector:withObject:withObject:] + 46
38 UIKit 0x30f7ee00 -[UIApplication sendAction:to:from:forEvent:] + 56
39 UIKit 0x30f7edbc -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 24
40 UIKit 0x30f7ed9a -[UIControl sendAction:to:forEvent:] + 38
41 UIKit 0x30f7eb0a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 486
42 UIKit 0x30f7f442 -[UIControl touchesEnded:withEvent:] + 470
43 UIKit 0x30f7d924 -[UIWindow _sendTouchesForEvent:] + 312
44 UIKit 0x30f7d312 -[UIWindow sendEvent:] + 374
45 UIKit 0x30f6368e -[UIApplication sendEvent:] + 350
46 UIKit 0x30f62f34 _UIApplicationHandleEvent + 5820
47 GraphicsServices 0x339a5224 PurpleEventCallback + 876
48 CoreFoundation 0x3726351c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
49 CoreFoundation 0x372634be __CFRunLoopDoSource1 + 134
50 CoreFoundation 0x3726230c __CFRunLoopRun + 1364
51 CoreFoundation 0x371e549e CFRunLoopRunSpecific + 294
52 CoreFoundation 0x371e5366 CFRunLoopRunInMode + 98
53 GraphicsServices 0x339a4432 GSEventRunModal + 130
54 UIKit 0x30f91cce UIApplicationMain + 1074
55 zApp 0x0007ffa6 0x79000 + 28582
56 zApp 0x0007a680 0x79000 + 5760
If you suspect that you are overreleasing something, try running your app with NSZombie enabled. (how to enable NSZombie)
You can set exception breakpoint to print backtrace in console.
sometimes that happens when you set an object as an observer for notifications, like
[[NSNotificationCenter defaultCenter] addObserver //details
and don't remove it from the observers list when it's released.
the system tries to send a message to it, and the app crashes because it's not there.
try adding
[[NSNotificationCenter defaultCenter] removeObserver:self];
in the dealloc function. (even if you're working with arc, create a dealloc function, and write that in it).
good luck
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.