objc_msgSend iphone application crash - objective-c

Crash Report :
> Thread : Crashed: com.apple.main-thread 0 libobjc.A.dylib
> 0x306bdf46 objc_msgSend + 5 1 libAVFAudio.dylib
> 0x21ac3e71 -[AVAudioSession privateBeginInterruption] + 52 2
> Foundation 0x23bb8d6f __NSThreadPerformPerform +
> 386 3 CoreFoundation 0x22e70377
> __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 4 CoreFoundation 0x22e6f819 __CFRunLoopDoSources0 + 364
> 5 CoreFoundation 0x22e6dded __CFRunLoopRun + 772 6
> CoreFoundation 0x22dbc211 CFRunLoopRunSpecific + 476 7
> CoreFoundation 0x22dbc023 CFRunLoopRunInMode + 106 8
> GraphicsServices 0x2a16f0a9 GSEventRunModal + 136 9
> UIKit 0x263c81d1 UIApplicationMain + 1440 10
> HIIT GURU 0x000d7377 main (main.m:16)
I am getting this crash randomly. I tried to check each line of code but i couldn't find any solution. Please suggest something to solve this. I am getting this crash in ios8.1 only.

This often occurs when the reference to the receiving object gets invalid.
Start with a static analysis of your code. Most of the times you can let Xcode do it for you through the Product -> Analyze tool. Also try enabling zombie objects while debugging through editing the current scheme going through Product -> Scheme -> Edit Scheme and check the appropriate box in the Diagnostics tab. Once enabled you have to wait for the crash to occur again if you don't know how to reproduce.

Related

Appcelerator - iOS - KrollObject forgetKeylessKrollObject

Recently we have received a crash on one of our application with the following stack trace:
0 libobjc.A.dylib 0x00000001806c1bd0 objc_msgSend + 12
1 CoreFoundation 0x0000000180f72d90 -[NSInvocation retainArguments] + 208
2 Foundation 0x00000001819e86b4 -[NSInvocationOperation initWithInvocation:] + 72
3 Foundation 0x00000001819e85c8 -[NSInvocationOperation initWithTarget:selector:object:] + 216
4 MyApp 0x0000000100054500 -[KrollObject forgetKeylessKrollObject:] (KrollObject.m:1079)
5 MyApp 0x00000001000a1cac -[TiProxy forgetProxy:] (TiProxy.m:725)
6 MyApp 0x000000010005b070 -[TiViewProxy remove:] (TiViewProxy.m:261)
7 MyApp 0x00000001000ba294 __TiThreadPerformOnMainThread_block_invoke (TiBase.m:270)
8 MyApp 0x00000001000ba570 TiThreadProcessPendingMainThreadBlocks (TiBase.m:367)
9 libdispatch.dylib 0x0000000180a95630 _dispatch_call_block_and_release + 20
10 libdispatch.dylib 0x0000000180a955f0 _dispatch_client_callout + 12
11 libdispatch.dylib 0x0000000180a9acf8 _dispatch_main_queue_callback_4CF + 1840
12 CoreFoundation 0x0000000180ff8bb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
13 CoreFoundation 0x0000000180ff6a18 __CFRunLoopRun + 1624
14 CoreFoundation 0x0000000180f25680 CFRunLoopRunSpecific + 380
15 GraphicsServices 0x0000000182434088 GSEventRunModal + 176
16 UIKit 0x0000000185d9cd90 UIApplicationMain + 200
17 MyApp 0x000000010003c584 main (main.m:37)
Dashboard suggests that the crash has happened at forgetKeylessKrollObjject method. From the stack trace it seems that during a view removal, this indicent happened. There are many places in the code where we have added and removed view. As there is no definite place defined in the log and nor we have the test case, we went through the framework code and saw that there is no null handling inside the method as TiProxy.m --> krollObjectForBridge function can return nil.
If anyone from the community has received such report and been able to resolve it. Please do let us know as there is no way to map this stack trace back to the JavaScript code.
SDK: 3.5.0.GA
OS: iOS 9.1

How to read and understand the report from Crashlytics

I have a Swift Application, when app is run, sometimes app is crashed. I have received log report about Crash App from Crashlytics but I don't understand log report.
Please help me: How to read and understand report from Crashlytics in order to find line code is error.
My report from Crashlytics:
**Crashed: com.apple.main-thread**
**EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000001**
Thread : Crashed: com.apple.main-thread
0 libGPUSupportMercury.dylib 6691807120 gpus_ReturnNotPermittedKillClient + 12
1 libGPUSupportMercury.dylib 6691811136 gpusSubmitDataBuffers + 172
2 GLEngine 6603264500 gliPresentViewES_Exec + 196
3 GLEngine 6603264248 gliPresentViewES + 84
4 OpenGLES 6603324504 -[EAGLContext presentRenderbuffer:] + 72
5 SpriteKit 6615201312 -[SKView renderContent] + 228
6 SpriteKit 6615188728 __29-[SKView setUpRenderCallback]_block_invoke + 64
7 SpriteKit 6615369448 -[SKDisplayLink _callbackForNextFrame:] + 272
8 QuartzCore 6610051640 CA::Display::DisplayLinkItem::dispatch() + 32
9 QuartzCore 6610051280 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 324
10 IOKit 6557291632 IODispatchCalloutFromCFMessage + 376
11 CoreFoundation 6538358212 __CFMachPortPerform + 180
12 CoreFoundation 6538443348 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
13 CoreFoundation 6538443188 __CFRunLoopDoSource1 + 436
14 CoreFoundation 6538434868 __CFRunLoopRun + 1640
15 CoreFoundation 6537564884 CFRunLoopRunSpecific + 396
16 GraphicsServices 6699431676 GSEventRunModal + 168
17 UIKit 6617247552 UIApplicationMain + 1488
18 NiftyCat 4296456952 main (AppDelegate.swift:11)
19 libdyld.dylib 6844000776 start + 4
Thanks.
You'll need to Symbolicate your Build to understand your Crash.
To do this in Crashlytics: you must add a "New Run Script Phase". this is the "+" Sign on the Build Phases of your target.
The Script goes like this:
"${PODS_ROOT}/Fabric/run" {YOUR-APP_ID_AT-FABRIC}
If you Installed Fabric using PODS.
Hope this helps ;-)
Cheers

Adhoc build is crashing not debug build

EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xa151830c
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3b766b26 objc_msgSend + 6
1 Foundation 0x31e31386 __NSFireDelayedPerform + 410
2 CoreFoundation 0x314220dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
3 CoreFoundation 0x31421cf2 __CFRunLoopDoTimer + 778
4 CoreFoundation 0x3142008e __CFRunLoopRun + 1206
5 CoreFoundation 0x3138ac22 CFRunLoopRunSpecific + 518
6 CoreFoundation 0x3138aa06 CFRunLoopRunInMode + 102
7 GraphicsServices 0x3607a27e GSEventRunModal + 134
8 UIKit 0x33c2e044 UIApplicationMain + 1132
9 deBodas 0x000d5c6e main (main.m:16)
10 deBodas 0x000c53fc ___lldb_unnamed_function1$$deBodas + 36
This is crash log when i install the build .It is happend when install the build adhoc not a debug build
When i install build through system it is not happend.Any body knows please help me
I am struck this issue last three days.

Debugging an iPad device crash with little info

I'm getting the following stack trace from an iPad crash pulled from the device. This was pulled from a user's iPad and I don't know what they were doing when it crashed. How would I get more info on why/where the app is crashing and fix it?
Uncaught C++ Exception
Stack trace:
0 - 0 MyApp 0x00005ac1 _Z16TerminateHandlerv + 24
1 - 1 libstdc++.6.dylib 0x33814e3d _ZN10__cxxabiv111__terminateEPFvvE + 52
2 - 2 libstdc++.6.dylib 0x33814e91 _ZSt9terminatev + 16
3 - 3 libstdc++.6.dylib 0x33814f61 __cxa_throw + 84
4 - 4 libobjc.A.dylib 0x3441dc8b objc_exception_throw + 70
5 - 5 Foundation 0x3645192b __NSThreadPerformPerform + 654
6 - 6 CoreFoundation 0x34e16a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
7 - 7 CoreFoundation 0x34e1875f __CFRunLoopDoSources0 + 382
8 - 8 CoreFoundation 0x34e194eb __CFRunLoopRun + 230
9 - 9 CoreFoundation 0x34da9ec3 CFRunLoopRunSpecific + 230
10 - 10 CoreFoundation 0x34da9dcb CFRunLoopRunInMode + 58
11 - 11 GraphicsServices 0x339d041f GSEventRunModal + 114
12 - 12 GraphicsServices 0x339d04cb GSEventRun + 62
13 - 13 UIKit 0x33a07d69 -[UIApplication _run] + 404
14 - 14 UIKit 0x33a05807 UIApplicationMain + 670
15 - 15 MyApp 0x000036af main + 70
16 - 16 MyApp 0x00003664 start + 40
Two things you might try:
Somtimes apps crash and the debugger stops on a completely different method. Enable "guard malloc" in the xcode run settings (under schemes in xcode4), run the app in the debugger utill it crashes, and see if that shows you which method is to blame.
If not, your best bet is to run the app in the debugger and make the crash happen. Try everything, simulate memory warnings everywhere, use every feature of the app, try every possible combination of paths through the app. Asking the user what they think they were doing might narrow it down some.

xcode instruments causing app crash

I am using xcode Instruments to track Allocations and Leaks. My app is crashing though. It does not crash when running the regular debug or release builds standalone, only when under Instruments:
Any thoughts ideas very gratefully received....
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0002b2e0
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x34499c96 objc_msgSend + 14
1 ZZZ Test Suite 0x000a3d74 0x95000 + 60788
2 CoreFoundation 0x308e4c3c -[NSObject(NSObject) release] + 24
3 CoreFoundation 0x308e519a CFRelease + 62
4 CoreFoundation 0x308e7eb4 _CFAutoreleasePoolPop + 140
5 Foundation 0x341b41c4 -[NSAutoreleasePool release] + 92
6 UIKit 0x309e5f08 _UIApplicationHandleEvent + 5784
7 GraphicsServices 0x30269e70 PurpleEventCallback + 660
8 CoreFoundation 0x30957a90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
9 CoreFoundation 0x30959838 __CFRunLoopDoSource1 + 160
10 CoreFoundation 0x3095a606 __CFRunLoopRun + 514
11 CoreFoundation 0x308eaebc CFRunLoopRunSpecific + 224
12 CoreFoundation 0x308eadc4 CFRunLoopRunInMode + 52
13 GraphicsServices 0x30269418 GSEventRunModal + 108
14 GraphicsServices 0x302694c4 GSEventRun + 56
15 UIKit 0x30a10d62 -[UIApplication _run] + 398
16 UIKit 0x30a0e800 UIApplicationMain + 664
17 ZZZ Test Suite 0x0009665c 0x95000 + 5724
18 ZZZ Test Suite 0x00096604 0x95000 + 5636
Try running it through the analyser first. You can run it from xcode from the |product| menu then select Analyze. It's a static analyser (clang) that analyses your code when it builds so any problems causing your code to crash at runtime could well be visible through static analysis. Give it a try and fix any problems it throws up then try instruments again.
As a complement to what Ian says above:
set the Environment variable "NSZombieEnabled" to YES
and you will hopefully have a more informative fail.
(In XCode 4 the Environment Variables is found under "Edit Scheme" and select "Debug")