App getting crashed while using dictation in UITextView - ios

The app is getting crashed while using dictation in UITextView .
While using dictation feature in keyboard the text is getting auto saved and the application getting crashed due to the same reason.
Normal Scenario:
While user uses keyboard to enter the text through dictation mode, the text will be auto saved after 2 seconds.
Current scenario
While user try long speech texts through dictation mode , the text is getting autosaved and meanwhile the application itself is getting crashed.
Please find the stack trace
Exception Type: SIGABRT
Exception Codes: #0 at 0x371bbdfc
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'We were never set up properly to stream in this document.'
Last Exception Backtrace:
0 CoreFoundation 0x294205f7 __exceptionPreprocess + 127
1 libobjc.A.dylib 0x36b5ac77 objc_exception_throw + 36
2 CoreFoundation 0x294204cd +[NSException raise:format:arguments:] + 102
3 Foundation 0x2a0f4a49 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 90
4 UIKit 0x2ce48c2b -[UIDictationStreamingOperations willEndEditingInInputDelegate:] + 136
5 UIKit 0x2c8ecf4f +[UIDictationController keyboardWillChangeFromDelegate:toDelegate:] + 140
6 UIKit 0x2c8ec717 -[UIKeyboardImpl setDelegate:force:] + 320
7 UIKit 0x2c8e64d1 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 1118
8 UIKit 0x2c9b8631 -[UIResponder _finishResignFirstResponder] + 158
9 UIKit 0x2c9634f5 -[UIResponder resignFirstResponder] + 274
10 UIKit 0x2c96327f -[UITextView resignFirstResponder] + 76
11 Classroom 0x00372f2f -[ComposerViewController autoSaveDraft] (ComposerViewController.m:1800)
12 Foundation 0x2a1349e5 __NSFireTimer + 62
13 CoreFoundation 0x293e6f07 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
14 CoreFoundation 0x293e6a89 __CFRunLoopDoTimer + 654
15 CoreFoundation 0x293e4cf3 __CFRunLoopRun + 1416
16 CoreFoundation 0x29331b31 CFRunLoopRunSpecific + 474
17 CoreFoundation 0x29331943 CFRunLoopRunInMode + 104
18 GraphicsServices 0x306e8051 GSEventRunModal + 134
19 UIKit 0x2c923f21 UIApplicationMain + 1438
20 Classroom 0x000e7493 main (main.m:13)
21 libdyld.dylib 0x370f6aaf start + 0

Related

paypal SDK integration objective c

I'm trying to integrate Paypal to my objective c project.
After the Paypal login screen appears and i enter my login data and login success and this view pops to the previous view which should display the logged client data the application crashes giving me the following error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x0000000113defd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001137f7deb objc_exception_throw + 48
2 CoreFoundation 0x0000000113cec23e -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 318
3 CoreFoundation 0x0000000113cfe5bb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
4 AppCreator 0x000000010d890e1e +[PPZebraUI text:withAnnotation:] + 810
5 AppCreator 0x000000010d875c87 -[PPFundingOption titleForDisplay] + 318
6 AppCreator 0x000000010d8b187f -[PPPaymentFundingOptionSelectionCell refreshContent] + 653
7 AppCreator 0x000000010d8b0bfc -[PPPaymentAttributeSelectionCell initWithViewController:withTitle:withPickerTitle:withDataSource:] + 1293
8 AppCreator 0x000000010d88db04 -[PPSelectPayMethodViewController paymentAttributeSelectionCells] + 310
9 AppCreator 0x000000010d8d4601 -[PPSelectPayMethodViewControllerIOS7 updateTableToConfirm:] + 977
10 AppCreator 0x000000010d8d416e -[PPSelectPayMethodViewControllerIOS7 refreshTable:] + 100
11 AppCreator 0x000000010d8d4229 -[PPSelectPayMethodViewControllerIOS7 viewDidAppear:] + 87
12 UIKit 0x000000010f41d335 -[UIViewController _setViewAppearState:isAnimating:] + 830
13 UIKit 0x000000010f41dcb8 -[UIViewController _endAppearanceTransition:] + 262
14 UIKit 0x000000010f45886f -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1290
15 UIKit 0x000000010f44e630 __49-[UINavigationController _startCustomTransition:]_block_invoke + 233
16 UIKit 0x000000010fcaa4c8 -[_UIViewControllerTransitionContext completeTransition:] + 101
17 UIKit 0x000000010f2658a3 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke95 + 834
18 UIKit 0x000000010f32d53e -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 644
19 UIKit 0x000000010f30a7ff -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 241
20 UIKit 0x000000010f30abae -[UIViewAnimationState animationDidStop:finished:] + 80
21 QuartzCore 0x000000010f12e3c8 _ZN2CA5Layer23run_animation_callbacksEPv + 308
22 libdispatch.dylib 0x000000011440b3eb _dispatch_client_callout + 8
23 libdispatch.dylib 0x00000001143f31ef _dispatch_main_queue_callback_4CF + 1738
24 CoreFoundation 0x0000000113d490f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
25 CoreFoundation 0x0000000113d0ab99 __CFRunLoopRun + 2073
26 CoreFoundation 0x0000000113d0a0f8 CFRunLoopRunSpecific + 488
27 GraphicsServices 0x0000000115780ad2 GSEventRunModal + 161
28 UIKit 0x000000010f27cf09 UIApplicationMain + 171
29 AppCreator 0x000000010d3251df main + 111
30 libdyld.dylib 0x000000011444092d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I tried the SDk in separated application and it works perfectly .this error happens when i add the sdk to my project .
can anyone please help me what can be causing this error
I found out that problem was in another Library i was using .
It had a function which override the
"preferredFontForTextStyle" in the "UIFont" class
that was causing the problem for me.
in case anyone facing that kind of unjustified crash , try to remove all the other classes one by one to check that the error is not caused by conflict with another line in a far class

Xcode/IOS debugging

I am a total newbie with objective C and IOS programming trying to follow along with a tutorial on the Apple Website.
I got to the point in the Apple tutorial where you add an unwind segue to the Add to-do page.
https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/SecondTutorial.html#//apple_ref/doc/uid/TP40011343-CH8-SW1
I successfully added unwind segues to both the Cancel and Done buttons.
However, when I compiled the program, while it compiles, it no longer lets me click on + to get to the add to-do page.
When the simulator initially loads, it is fine. But when I click on +, Xcode appears in front of the simulator and in the debugger it says what is below.
Note I have no experience in debugging. What appears in editor is main.m and the following is in right side of debug section at bottom:
2014-12-03 13:28:54.854 single-nocore[20692:1523451] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "vXZ-lx-hvc-view-kh9-bI-dsS" nib but didn't get a UITableView.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102eabf35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101265bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000102eabe6d +[NSException raise:format:] + 205
3 UIKit 0x0000000101785415 -[UITableViewController loadView] + 249
4 UIKit 0x00000001015c87f9 -[UIViewController loadViewIfRequired] + 75
5 UIKit 0x00000001015c8c8e -[UIViewController view] + 27
6 UIKit 0x0000000101600d3b -[UINavigationController preferredContentSize] + 149
7 UIKit 0x00000001015a8ec2 -[UIPresentationController preferredContentSizeDidChangeForChildContentContainer:] + 101
8 UIKit 0x00000001015a6b0d __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 108
9 UIKit 0x00000001014c6331 _applyBlockToCFArrayCopiedToStack + 314
10 UIKit 0x00000001014c61ab _afterCACommitHandler + 516
11 CoreFoundation 0x0000000102de0dc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
12 CoreFoundation 0x0000000102de0d20 __CFRunLoopDoObservers + 368
13 CoreFoundation 0x0000000102dd6b53 __CFRunLoopRun + 1123
14 CoreFoundation 0x0000000102dd6486 CFRunLoopRunSpecific + 470
15 GraphicsServices 0x0000000104bae9f0 GSEventRunModal + 161
16 UIKit 0x00000001014a3420 UIApplicationMain + 1282
17 single-nocore 0x0000000100d39b23 main + 115
18 libdyld.dylib 0x0000000103b5c145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Thanks in advance for any suggestions.

How do I debug this crash in UIDictationController?

Recently I am trying to debug with the information provided by Crash Reports. So far I have been able to identify and fix some bugs but not this one.
As I read from the crash report, it's something wrong with UIDictationController, but my code did not call UIDictationController at all. The crash report is generated by PLCrashReporter.
It seems that the user is using an iPad Mini (WiFi) and running iOS 6.0.2.
Incident Identifier: [REMOVED]
CrashReporter Key: [REMOVED]
Hardware Model: iPad2,5
Process: MyApp [2849]
Path: [REMOVED]
Identifier: com.yourcompany.MyApp
Version: 1.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-01-26 02:11:01 +0000
OS Version: iPhone OS 6.0.2 (10A550)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x32255350
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Last Exception Backtrace:
0 CoreFoundation 0x3882e2a3 __exceptionPreprocess + 163
1 libobjc.A.dylib 0x30d8897f objc_exception_throw + 31
2 CoreFoundation 0x387788d9 -[__NSArrayM insertObject:atIndex:] + 769
3 UIKit 0x36ad24c3 -[UIDictationMeterView initWithFrame:] + 267
4 UIKit 0x36abe699 -[UIDictationView initWithFrame:] + 281
5 UIKit 0x36abdcd1 +[UIDictationView sharedInstance] + 145
6 UIKit 0x36aae7f5 -[UIDictationController setState:] + 149
7 UIKit 0x36aaef5f -[UIDictationController setupForDictationStart] + 199
8 UIKit 0x36aae5d7 -[UIDictationController startConnectionForReason:] + 51
9 UIKit 0x36aaf173 -[UIDictationController startDictationFromLayout] + 55
10 UIKit 0x36825c09 -[UIKeyboardLayoutStar touchUp:] + 5249
11 UIKit 0x3682472f -[UIKeyboardLayout touchesEnded:withEvent:] + 387
12 UIKit 0x3670c5f1 -[UIWindow _sendTouchesForEvent:] + 525
13 UIKit 0x366f9801 -[UIApplication sendEvent:] + 381
14 UIKit 0x366f911b _UIApplicationHandleEvent + 6155
15 GraphicsServices 0x3771e5a3 _PurpleEventCallback + 591
16 GraphicsServices 0x3771e1d3 PurpleEventCallback + 35
17 CoreFoundation 0x38803173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
18 CoreFoundation 0x38803117 __CFRunLoopDoSource1 + 139
19 CoreFoundation 0x38801f99 __CFRunLoopRun + 1385
20 CoreFoundation 0x38774ebd CFRunLoopRunSpecific + 357
21 CoreFoundation 0x38774d49 CFRunLoopRunInMode + 105
22 GraphicsServices 0x3771d2eb GSEventRunModal + 75
23 UIKit 0x3674d2f9 UIApplicationMain + 1121
24 MyApp 0x000032e1 main (main.m:36)
25 MyApp 0x00003230 start + 40
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x30f10350 __pthread_kill + 8
1 libsystem_c.dylib 0x304f8973 abort + 95
2 MyApp 0x000e954f uncaught_exception_handler + 27
3 CoreFoundation 0x3882e57f __handleUncaughtException + 615
4 libobjc.A.dylib 0x30d88a65 _objc_terminate() + 129
5 libc++abi.dylib 0x3719807b safe_handler_caller(void (*)()) + 79
6 libc++abi.dylib 0x37198114 std::terminate() + 20
7 libc++abi.dylib 0x37199599 __cxa_current_exception_type + 1
8 libobjc.A.dylib 0x30d889d1 objc_exception_rethrow + 13
9 CoreFoundation 0x38774f21 CFRunLoopRunSpecific + 457
10 CoreFoundation 0x38774d49 CFRunLoopRunInMode + 105
11 GraphicsServices 0x3771d2eb GSEventRunModal + 75
12 UIKit 0x3674d2f9 UIApplicationMain + 1121
13 MyApp 0x000032e1 main (main.m:36)
Is there any way that I can do with this bug? Or, at least mitigating the issue? Thanks in advance.
the problem is that somewhere in your app you have a keyboard come up and with iOS version 6.0.1 and 6.0.2, apple enabled the dictation controller even if you didn't specify it to be enabled. Two solutions to fixing it: create a custom keyboard without it or implement dictation in your app.
My suggestion is to just let it be, only affects two outdate iOS versions and hopefully the crashes will go away as the users upgrade their devices
I have the keyboard coming up for a custom TextView, and when the user pushed the dictation button, said something, pushed finish, and then they tried to dismiss the keyboard, there would be a crash. Possible this is also what you're experiencing?

How to understand and fixed this error?

2011-04-20 18:38:41.347 RIE[1683:607] -[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10
2011-04-20 18:38:41.417 RIE[1683:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10'
*** Call stack at first throw:
(
0 CoreFoundation 0x342ed64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x35570c5d objc_exception_throw + 24
2 CoreFoundation 0x342f11bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x342f0649 ___forwarding___ + 508
4 CoreFoundation 0x34267180 _CF_forwarding_prep_0 + 48
5 MediaPlayer 0x344628b7 -[MPMoviePlayerViewController _moviePlayerViewController_applicationDidEnterBackgroundNotification:] + 42
6 Foundation 0x333b5183 _nsnote_callback + 142
7 CoreFoundation 0x342bc20f __CFXNotificationPost_old + 402
8 CoreFoundation 0x34256eeb _CFXNotificationPostNotification + 118
9 Foundation 0x333b25d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
10 UIKit 0x36364d01 -[UIApplication _handleApplicationSuspend:eventInfo:] + 500
11 UIKit 0x362feaf9 -[UIApplication handleEvent:withNewEvent:] + 1916
12 UIKit 0x362fe215 -[UIApplication sendEvent:] + 44
13 UIKit 0x362fdc53 _UIApplicationHandleEvent + 5090
14 GraphicsServices 0x33e58e77 PurpleEventCallback + 666
15 CoreFoundation 0x342c4a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
16 CoreFoundation 0x342c683f __CFRunLoopDoSource1 + 166
17 CoreFoundation 0x342c760d __CFRunLoopRun + 520
18 CoreFoundation 0x34257ec3 CFRunLoopRunSpecific + 230
19 CoreFoundation 0x34257dcb CFRunLoopRunInMode + 58
20 GraphicsServices 0x33e5841f GSEventRunModal + 114
21 GraphicsServices 0x33e584cb GSEventRun + 62
22 UIKit 0x36328d69 -[UIApplication _run] + 404
23 UIKit 0x36326807 UIApplicationMain + 670
24 Motor Show 0x0000219b main + 70
25 Motor Show 0x00002150 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
Hard to say given just the stack trace, but I would suggest the following:
Implement applicationWillResignActive: in your UIApplicationDelegate to ensure that video playback is paused or stopped before the application enters the background.
Create a custom UIApplication subclass to use in your app, and override the _handleApplicationSuspend:eventInfo: method so that it returns without propagating the event to other classes further down the chain.
Figure out how to unregister your MPMoviePlayerViewController component from the notification center so that it does not receive the 'ApplicationDidEnterBackgroundNotification'.

Strange Modal View Controller NSException bug

Can anyone help me make sense of the crash log below? It came from Apple after inquiring further about a crash my app had. They rejected the app because of this crash, but I have never once been able to make it occur on my end or with 10+ beta testers. So basically, it is only occurring for them for some reason. It looks like it has to do with presenting a view, but that's weird because, like I said, this view is coming up perfectly fine.
Mar 11 14:46:09 unknown StageBloc[2309] <Error>: *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[AccountOverviewViewController popupViewController]: unrecognized selector sent to instance 0x2c7820'
*** Call stack at first throw:
(
0 CoreFoundation 0x3291964f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x36b5cc5d objc_exception_throw + 24
2 CoreFoundation 0x3291d1bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x3291c649 ___forwarding___ + 508
4 CoreFoundation 0x32893180 _CF_forwarding_prep_0 + 48
5 AppName 0x0004b56d -[TTBaseViewController shouldAutorotateToInterfaceOrientation:] + 36
6 UIKit 0x35b0dead -[UIViewController _isSupportedInterfaceOrientation:] + 48
7 UIKit 0x35b76e51 -[UIViewController _preferredInterfaceOrientationGivenCurrentOrientation:] + 68
8 UIKit 0x35b75f07 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 794
9 UIKit 0x35b756f7 -[UIViewController presentModalViewController:withTransition:] + 2378
10 UIKit 0x35b74cd7 -[UIViewController presentModalViewController:animated:] + 58
11 StageBloc 0x00009bb1 -[StageBlocViewController loginSuccessful] + 196
12 StageBloc 0x00004c21 -[StageBlocAppDelegate successfulAttempt:] + 288
13 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
14 AppName 0x0002aa75 -[ASIHTTPRequest reportFinished] + 60
15 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
16 Foundation 0x325707a9 __NSThreadPerformPerform + 268
17 CoreFoundation 0x328f0a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
18 CoreFoundation 0x328f275f __CFRunLoopDoSources0 + 382
19 CoreFoundation 0x328f34eb __CFRunLoopRun + 230
20 CoreFoundation 0x32883ec3 CFRunLoopRunSpecific + 230
21 CoreFoundation 0x32883dcb CFRunLoopRunInMode + 58
22 GraphicsServices 0x30b2b41f GSEventRunModal + 114
23 GraphicsServices 0x30b2b4cb GSEventRun + 62
24 UIKit 0x35af9d69 -[UIApplication _run] + 404
25 UIKit 0x35af7807 UIApplicationMain + 670
26 AppName 0x00002ae1 main + 48
27 AppName 0x00002aac start + 40
)
This had to do with forgetting to add some required built variables to my project that the Three20 libraries use. I didn't notice it because you can't run App Store release builds locally.

Resources