- Home /
Siri crashes Unity on ios7?
[EDIT] As JobeLloyd points out below, there is a ticket for this at the Unity Issue Tracker: http://issuetracker.unity3d.com/issues/ios7-tapping-the-dictation-button-on-the-keyboard-causes-a-crash
At the moment of this writing it is marked as fixed, but not yet released. [/EDIT]
Just posting to see if anyone has experience with this. We have a Unity3D app on ios that opens the keyboard and uses the results of what the user types. So far so good. But if the user hits the Siri key (the microphone on the keyboard), the app will crash. If I'm connected to XCode I get a EXC_BAD_ACCESS in SkinnedMeshRenderer.
As a workaround, I've tried calling down to the native layer and invoking PauseUnity(true), adding a handler and then PauseUnity(false) when the keyboard resigns, like so:
- (void)pauseUnityForKeyboard
{
UnityPause(true);
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(onKeyboardHide:) name:UIKeyboardWillHideNotification object:nil];
}
- (void)onKeyboardHide:(NSNotification *)notification
{
UnityPause(false);
}
This averts the crash, but Unity never really recovers...processing resumes, but none of my animations do: the app is effectively frozen.
Any thoughts? Thanks!
[EDIT] Two interesting details:
If I pause Unity for the keyboard, but DON'T CALL SIRI, then un-pause, everything resumes just fine.
I looked at the possibility of allowing microphone permission (although this shouldn't be necessary)...so far no luck there.
[/EDIT]
After over a day struggling with this, I'm not noticeably closer to an answer. I've disabled virtually everything in the app without it helping. I've also noted that in an old app of ours which also uses the keyboard, we can use Siri in one case without crashing...though another keyboard instance in the same app does cause the crash (neither instance uses PauseUnity). I haven't been able to discern an important difference in the use cases and I've attempted to port code into the current app without it helping. The search continues...
Answer by JobeLloyd · Nov 27, 2013 at 12:53 AM
I can confirm we are seeing the same bug on ios7 as well. We already pause Unity while the keyboard is up, and it also fails to recover. If i disable to pause it crashes.
Unfortunately I dont have a fix for this yet here either.
Thanks for that. I finally did what I probably should have done some while ago: I built a completely vanilla app with just the keyboard and a $$anonymous$$imal UI. I get the same crash. Reporting it to Unity now.
Looks like they are reporting it fixed?
Nice find, but it's definitely not fixed on 4.3.0f4. Do you think they're reporting that it's fixed for an upco$$anonymous$$g release?
Any updates on this? We are nearing submission and this bug might fail us at QA. Also, we are on Unity 4.2.1, and upgrading to the latest version days before final submission involves a huge risk we would like to avoid.
So, if Unity can provide the fix as a patch to older versions, that would be great.
Its still crashing on iOS 7 device while using dictation on any textfield. I'm on 4.6.5 unity version.