AKMicrophone causes SIGABRT error - A bug? - ios

I found a post that has the same error in the same situation here:
https://groups.google.com/forum/#!topic/audiokit/SmyuzPJQ6wU
Same as this poster - I'm using the source. However, at the end of the post the user does not say what he did to fix the issue.
I'm currently using an unaltered "ExtendingAudioKitUsingSource" example as I need to add some functionality to audiokit. (unaltered outside of using my provisioning profile and adding "let m = AKMicrophone()" in ViewController.swift.
I receive these errors:
2018-08-31 15:16:50.684 ExtendingAudioKit[6800:8850964] 15:16:50.683
ERROR: [0x39058000] AVAudioIONodeImpl.mm:452:
___ZN13AVAudioIOUnit9EnableBusEm_block_invoke: error -10849
2018-08-31 15:16:50.688 ExtendingAudioKit[6800:8850964] ***
Terminating app due to uncaught exception
'com.apple.coreaudio.avfaudio', reason: 'error -10849'
which traces back to line 46 in AKMicrophone.swift to init(): AudioKit.engine.connect(AudioKit.engine.inputNode, to: self.avAudioNode, format: nil)
I've had no issues using AKMicrphone() outside of this project.

I have fixed an AKMicrophone bug in AudioKit v4.5.1 that may have fixed this for you. If not, I'll withdraw this answer, but please check it out and let me know.

Related

App crashing "libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)"

So, after 1 hour of googling I still can't fix this error that I got. Whats happening is that every time I go to click my "Sign Up" button, the app crashes, its suppose to redirect me to a different view where the user can sign up with there email and password. I tried many things other users have posted but none of them seem to be working.
error code:
2016-11-14 23:30:52.363967 FHCI[4785:1536750] [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-14 23:30:52.364 FHCI[4785] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-14 23:30:53.561590 FHCI[4785:1536709] *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Default app has already been configured.'
*** First throw call stack:
(0x186e4a1c0 0x18588455c 0x186e4a108 0x100107358 0x100107120 0x1000a795c 0x1000a7a40 0x18cca50b0 0x18cca4c78 0x18d668ae4 0x18cfefb08 0x18cff72c4 0x18d010d04 0x18d013e5c 0x18cd97b54 0x18d464b9c 0x18d465d84 0x18d465b8c 0x18d465e5c 0x18ccda484 0x18ccda404 0x18ccc48b8 0x18ccd9cf0 0x18ccd9818 0x18ccd4a60 0x18cca552c 0x18d492a54 0x18d48c4bc 0x186df8278 0x186df7bc0 0x186df57c0 0x186d24048 0x1887aa198 0x18cd102fc 0x18cd0b034 0x1000aa388 0x185d085b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Picture of my code
Story board
Earlier, I have faced the same issue. Fix it by below solutions.
Solution:1
Please make sure FIRApp.configure() the statement executes once
throughout the project. If you have written more then one time then
you have to remove your second unused statement. It will solve your
problem.
Solution:2
1 ) Remove pod file from project (How to remove pod file)
2 ) Remove Old GoogleService-Info file from the project.
3 ) Download GoogleService-Info and add it into the project.
4 ) Add pods file Again.
5) Put the Below method in Appdelegate file.
override init() {
super.init()
FIRApp.configure()
}
I also had this problem. In my case the file GoogleService-Info.plist was not included in Copy Bundle Resources.
I have the same error the solution above didn't work for me.
Solution:
Just go to status bar of Xcode Product ⇒ clean
Image:
In my case I removed Main.storyboard but forgot to remove in from General target's settings. Removing it solved unexpected crash on app launch.

IOS Google OAuth error occured after 1 success authentication

I was trying to make a Google authentication with swift to get message list. However i follow all steps in Google here
after i run in simulator and success logging in to my account authentication was successful. then problem appears after all success which is weird. does any knows how to fix this?
selector "displayResultWithTicket:finishedWithObject:error:" is unimplemented or misnamed
Assertion failure in void GTMSessionFetcherAssertValidSelector(id _Nullable __strong, SEL _Nullable, ...)(), /Users/macbookpro/Documents/Zaiya/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'callback selector unimplemented or misnamed'
please share your knowledge, thanks!
actual run error:
I ran into the same problem. I believe it's because Google hasn't updated the Quickstart for Swift 3 yet.
Change:
displayResultWithTicket:finishedWithObject:error: to #selector([Your View Controller Name Here].displayResultWithTicket(ticket:finishedWithObject:error:)), which is in line with the new Swift 3 syntax

Setting cachePolicy of a parse query crashes application

I'm developing in Swift using the latest version of Parse from the website. I am attempting to set my cache policy to the NetworkElseCache value, which is displayed below:
let userRelation = User.currentUser()?.relationForKey("friends")
let userQuery = userRelation!.query()
userQuery.cachePolicy = .NetworkElseCache
userQuery.findObjectsInBackgroundWithBlock {
(users, error) -> Void in
print("Success")
}
The error occurs on the line:
userQuery.cachePolicy = .NetworkElseCache
and if the line is removed, the application runs fine, the error produced is:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Method not allowed when Pinning is enabled.'
I really don't have any idea what to do from here, I only started iOS development about a week ago using Parse and Swift, so I'm a bit on the lost side. I don't understand the callstack either, or how it will help me find my problem.
Disable the LocalDataStore in your AppDelegate.m
So comment following line
Parse.enableLocalDatastore() // Comment this line and try
Here's the full explanation from the engineers at Parse. But yes, long story short, if you're using local datastore, you will not be able to also use different cache policies.

Why am I getting a `unrecognized selector sent to instance` error?

I have a Ruby on Rails application that has an API, it's an OAuth 2.0 provider and uses Doorkeeper. I am creating an iPhone client for that application and am using the gtm-oauth2 library for authentication. Here is the Github repository for the iPhone app.
I manage do the authentication request using the library and get the response from the OAuth server, but (I think that) when the iPhone app receives the response, the iPhone app crashes. I get the following error:
2013-03-25 07:30:51.563 Catapult for iOS[68917:c07] -[NSNull length]: unrecognized selector sent to instance 0x14f2678
2013-03-25 07:30:51.564 Catapult for iOS[68917:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x14f2678'
*** First throw call stack:
(0x13c1012 0x11e6e7e 0x144c4bd 0x13b0bbc 0x13b094e 0xf074 0x185e3 0x13b51bd 0x13b50d6 0x1531a 0x1512b 0x14ae2 0x13b51bd 0x13b50d6 0x11d0a 0x1032a 0x13b51bd 0x13b50d6 0x79be 0x77ed 0x8cf2 0xcec589 0xcea652 0xceb89a 0xcea60d 0xcea785 0xc37a68 0x4a2a911 0x4a29bb3 0x4a67cda 0x13638fd 0x4a6835c 0x4a682d5 0x4952250 0x1344f3f 0x1344a39 0x1367734 0x1366f44 0x1366e1b 0x22be7e3 0x22be668 0x12affc 0x2c6d 0x2b95)
libc++abi.dylib: terminate called throwing an exception
I am a complete noob/beginner when it comes to iOS development and Objective-C programming, and I am learning how to create my first app using this little project. I asked the same question in the gtm-oaut2 Google Group and according to them, the problem comes from my code and not the library. The problem is that all of my code is taken from their wiki and I can't pinpoint where the app crashes. If I understand correctly, at some point I am calling length of NSNull, but I am not calling length anywhere, hence my confusion. Also, when the app crashes, the line hilighted is in the main.m file and the error (on the right label, not in the output) is the following:
Thread 1: signal SIGABRT
I have no clue what that means...
Does anyone know what the problem might be please?
You're right that the issue is that somewhere you've got the length message being sent to an instance of NSNull. To pinpoint where exactly this is happening set a breakpoint on objc_exception_throw. You can do this in the Xcode UI with little "+" button in the bottom left corner on the breakpoints tab. Select "Add Exception breakpoint." Then the debugger will stop your program at the point where the error occurs instead of waiting for the program to actually crash.
Well... you understood the error correctly.. You are somewhere calling length on a NSNull instance.
I must find out where this is happening.
I think this is happening in a JSON response. Maybe you (or "the code") is calling length on something it expects its a NSString but it is instead NSNull (that is the json has a NULL value).
Try if you manage to print the json response and see if you found a key mapped to a null value...
NSNull does not respond to length
You can check the documentation for NSNull to see that this is the case.
Without having an idea of what your code base is doing I am not sure where to look, you must be calling [NSNull null]; at some point to get the NSNull object or you are using a framework somewhere that returns this.

Unity iOS game crashing with NSInternalInconsistencyException

I am using Prime31's GameCenter Turn Based plugin in my game in order to handle online matches. A problem arises when I receive an "invitation to play" notification from Game Center while Game Center's matchmaker is showing (called using the plug-in => GameCenterTurnBasedBinding.findMatch(2,2,false); ).
The app crashes and the following output is shown in Xcode:
2012-08-20 08:39:27.050 Cabrais[1808:707] *** Assertion failure in -[NSIndexPath row], /SourceCache/UIKit/UIKit-1914.85/UITableViewSupport.m:2606
2012-08-20 08:39:27.052 Cabrais[1808:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid index path for use with UITableView. Index paths passed to table view must contain exactly two indices specifying the section and row. Please use the category on NSIndexPath in UITableView.h if possible.'
*** First throw call stack:
(0x355ec88f 0x33210259 0x355ec789 0x349e03a3 0x32d4d673 0x35dba49d 0x35dd90e5 0x35dd9379 0x32d4cefb 0x32d4bfd9 0x32d4b763 0x35da7657 0x32ceff37 0x3554b1fb 0x32716aa5 0x327166bd 0x327165c9 0x35dd8179 0x35da936b 0x35dbce65 0x35dbb6b3 0x33979c59 0x33984e91 0x355bf2ad 0x355424a5 0x3554236d 0x332dd439 0x32d1acd5 0x6954 0x3388)
terminate called throwing an exception(lldb)
I have tried disabling notifications through the Ipad/Iphone settings for both my app and GameCenter as well as through the code by removing all notification related code but this hasn't had any effect at all.
I know through debugging that the code in my function attached to GameCenterTurnBasedManager.handleTurnEventEvent doesn't get called before the crash occurs, and neither does the one registered to EtceteraManager.remoteNotificationReceived. (Both these function work perfectly fine otherwise.)
I have asked Prime31 and they have told me that the exception is a mishandling of the tables data source, and to file a bug report with Apple.
Has anyone experienced a similar crash/error while working with Unity?
And is there any way I can try to catch the notification before it arrives and remove the matchmaker or be able to handle the error from unity?
Any insight/help/comments would be greatly appreciated,
Thanks.

Resources