Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: crash on ios9 when input focus #4402

Closed
CandySunPlus opened this issue Sep 21, 2015 · 16 comments
Closed

bug: crash on ios9 when input focus #4402

CandySunPlus opened this issue Sep 21, 2015 · 16 comments

Comments

@CandySunPlus
Copy link

Type: bug

Platform: ios 9 webview

just crash in ios9

2015-09-22 00:39:08.256 missfresh[1696:920538] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.
 Stack:(
    0   CoreFoundation                      0x0000000182fc0f74 <redacted> + 148
    1   libobjc.A.dylib                     0x0000000197bb3f80 objc_exception_throw + 56
    2   CoreFoundation                      0x0000000182fc0ea4 <redacted> + 0
    3   Foundation                          0x0000000183fda5d8 <redacted> + 88
    4   Foundation                          0x0000000183e5ca1c <redacted> + 36
    5   UIKit                               0x000000018861b958 <redacted> + 64
    6   UIKit                               0x000000018861c470 <redacted> + 244
    7   UIKit                               0x0000000188638f44 <redacted> + 108
    8   UIKit                               0x0000000188d42798 <redacted> + 268
    9   UIKit                               0x0000000188819fcc <redacted> + 176
    10  UIKit                               0x00000001888090b4 <redacted> + 52
    11  UIKit                               0x000000018851300c <redacted> + 644
    12  QuartzCore                          0x0000000187d19f14 <redacted> + 148
    13  QuartzCore                          0x0000000187d14b20 <redacted> + 292
    14  QuartzCore                          0x0000000187d149e0 <redacted> + 32
    15  QuartzCore                          0x0000000187d1407c <redacted> + 252
    16  QuartzCore                          0x0000000187d13dd0 <redacted> + 516
    17  QuartzCore                          0x0000000187d0d4bc <redacted> + 80
    18  CoreFoundation                      0x0000000182f77c30 <redacted> + 32
    19  CoreFoundation                      0x0000000182f759d4 <redacted> + 372
    20  CoreFoundation                      0x0000000182f75e04 <redacted> + 928
    21  CoreFoundation                      0x0000000182ea4dc0 CFRunLoopRunSpecific + 384
    22  WebCore                             0x0000000194b09aa0 <redacted> + 456
    23  libsystem_pthread.dylib             0x00000001985c3b3c <redacted> + 156
    24  libsystem_pthread.dylib             0x00000001985c3aa0 <redacted> + 0
    25  libsystem_pthread.dylib             0x00000001985c1030 thread_start + 4
)
2015-09-22 00:39:08.260 missfresh[1696:920538] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.
 Stack:(
    0   CoreFoundation                      0x0000000182fc0f74 <redacted> + 148
    1   libobjc.A.dylib                     0x0000000197bb3f80 objc_exception_throw + 56
    2   CoreFoundation                      0x0000000182fc0ea4 <redacted> + 0
    3   Foundation                          0x0000000183fda5d8 <redacted> + 88
    4   Foundation                          0x0000000183e60f3c <redacted> + 56
    5   Foundation                          0x0000000183e5cafc <redacted> + 260
    6   UIKit                               0x000000018861b958 <redacted> + 64
    7   UIKit                               0x000000018861c470 <redacted> + 244
    8   UIKit                               0x0000000188638f44 <redacted> + 108
    9   UIKit                               0x0000000188d42798 <redacted> + 268
    10  UIKit                               0x0000000188819fcc <redacted> + 176
    11  UIKit                               0x00000001888090b4 <redacted> + 52
    12  UIKit                               0x000000018851300c <redacted> + 644
    13  QuartzCore                          0x0000000187d19f14 <redacted> + 148
    14  QuartzCore                          0x0000000187d14b20 <redacted> + 292
    15  QuartzCore                          0x0000000187d149e0 <redacted> + 32
    16  QuartzCore                          0x0000000187d1407c <redacted> + 252
    17  QuartzCore                          0x0000000187d13dd0 <redacted> + 516
    18  QuartzCore                          0x0000000187d0d4bc <redacted> + 80
    19  CoreFoundation                      0x0000000182f77c30 <redacted> + 32
    20  CoreFoundation                      0x0000000182f759d4 <redacted> + 372
    21  CoreFoundation                      0x0000000182f75e04 <redacted> + 928
    22  CoreFoundation                      0x0000000182ea4dc0 CFRunLoopRunSpecific + 384
    23  WebCore                             0x0000000194b09aa0 <redacted> + 456
    24  libsystem_pthread.dylib             0x00000001985c3b3c <redacted> + 156
    25  libsystem_pthread.dylib             0x00000001985c3aa0 <redacted> + 0
    26  libsystem_pthread.dylib             0x00000001985c1030 thread_start + 4
)
2015-09-22 00:39:08.262 missfresh[1696:920538] *** Assertion failure in -[UIApplication _cachedSystemAnimationFenceCreatingIfNecessary:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3505.16/UIApplication.m:1697
2015-09-22 00:39:08.305 missfresh[1696:920538] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'accessing _cachedSystemAnimationFence requires the main thread'
*** First throw call stack:
(0x182fc0f5c 0x197bb3f80 0x182fc0e2c 0x183eaff3c 0x1887b30e8 0x1887b31ac 0x1888053cc 0x188cb37a4 0x188cae158 0x188815fc8 0x1885736b4 0x18861ea40 0x18852e6b8 0x182eb7ab0 0x182eb79a8 0x18851d3e8 0x18861eb88 0x18881a210 0x18851300c 0x187d19f14 0x187d14b20 0x187d149e0 0x187d1407c 0x187d13dd0 0x187d0d4bc 0x182f77c30 0x182f759d4 0x182f75e04 0x182ea4dc0 0x194b09aa0 0x1985c3b3c 0x1985c3aa0 0x1985c1030)
libc++abi.dylib: terminating with uncaught exception of type NSException
libsystem_kernel.dylib`__pthread_kill:
    0x1984fb1d8 <+0>:  movz   x16, #0x148
    0x1984fb1dc <+4>:  svc    #0x80
->  0x1984fb1e0 <+8>:  b.lo   0x1984fb1f8               ; <+32>
    0x1984fb1e4 <+12>: stp    x29, x30, [sp, #-16]!
    0x1984fb1e8 <+16>: mov    x29, sp
    0x1984fb1ec <+20>: bl     0x1984e2330               ; cerror_nocancel
    0x1984fb1f0 <+24>: mov    sp, x29
    0x1984fb1f4 <+28>: ldp    x29, x30, [sp], #16
    0x1984fb1f8 <+32>: ret    
```</span>

<span is-issue-template></span>
@CandySunPlus CandySunPlus changed the title crash on ios9 when input focus bug: crash on ios9 when input focus Sep 22, 2015
@huip
Copy link

huip commented Sep 22, 2015

I have the same problem.

@ramsaylee
Copy link

I have the same problem, too.

@john-zwiep-hs
Copy link

+1

@ghost
Copy link

ghost commented Oct 2, 2015

+1

We're seeing this with the InAppBrowser plugin. The plugin is making UI changes within the main WebView thread and the new iOS SDK throws an exception now (instead a warning). Tried wrapping the open method of the plugin in a dispatch_async(...) block but it did not work:

http://stackoverflow.com/questions/28302019/getting-a-this-application-is-modifying-the-autolayout-engine-error

Also, wrapping the method in [self.commandDelegate runInBackground:^{ ... }] did not work:

https://cordova.apache.org/docs/en/2.5.0/guide_plugin-development_ios_index.md.html

@maciejwitalinski
Copy link

+1
Any idea how to fix it?

@mhartington
Copy link
Contributor

Have not seen this before, though this might not be the best place to open an issue for it. It sounds like this is a cordova specific issue. Please follow up with the cordova folks and open an issue here.

https://issues.apache.org/jira/browse/CB-9746?jql=project%20%3D%20CB

Closing this for now, if someone could open an issue on their issue tracker with any relevant information, we can follow it up over there.

@ryanengland
Copy link

I've opened up the following thread after no finding any others referencing autolayout: https://issues.apache.org/jira/browse/CB-9769

@maciejwitalinski
Copy link

It is a show stopper for me :(

2015-10-08 20:31 GMT+02:00 Ryan England [email protected]:

I've opened up the following thread after no finding any others
referencing autolayout: https://issues.apache.org/jira/browse/CB-9769


Reply to this email directly or view it on GitHub
#4402 (comment).

@kurtisf
Copy link

kurtisf commented Oct 12, 2015

There appears to be a problem with the Swype keyboard extension on iOS 9 causing crashes. I've even been able to get Chrome (outside of Cordova) to crash using this keyboard on iOS 9. I've created a very simple Cordova plugin to prevent third party keyboards from running in the app. This will at least keep the app from crashing.

https://github.com/kurtisf/cordova-plugin-restrict-keyboard

@kurtisf
Copy link

kurtisf commented Oct 12, 2015

Also, if you install the Swype keyboard, and hook up an iPhone to the debugger, when the app crashes, every single time, the keyboard has slid out just to the space bar. It seems at that point there is some code that runs on a background causing the crash.

@mhartington
Copy link
Contributor

@kurtisf nice, thanks for the plugin. I wonder if it would be possible to integrate that code into the keyboard plugin?

@kurtisf
Copy link

kurtisf commented Oct 13, 2015

@mhartington It should be easy enough. I'll need to change the code from being in a category to a swizzle to be more correct. I'll see if I can make a pull request to the keyboard plugin in the next day or two.

@goodthing
Copy link

+1 for this. Not sure if exactly the same issue but I've had users saying that they're using Swype with ios9 and the app just crashes. They had to revert to the normal keyboard to be able to open the app.

@ryanengland
Copy link

Thanks for the info - have got our client to remove Swype keyboard and not experiencing this error anymore. Great!

On 15 Oct 2015, at 00:24, streetkid [email protected] wrote:

+1 for this. Not sure if exactly the same issue but I've had users saying that they're using Swype with ios9 and the app just crashes. They had to revert to the normal keyboard to be able to open the app.


Reply to this email directly or view it on GitHub.

@kurtisf
Copy link

kurtisf commented Oct 16, 2015

@mhartington I made a pull request for the keyboard plugin:
ionic-team/ionic-plugin-keyboard#145

@ettiennelouw
Copy link

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants