App crashes when reloading contents of WKWebView

Hey all,


I'm getting the strangest crash when the contents of a WKWebView are either reloaded or a new URL is loaded after the fact. This is occuring only on iOS 9 Beta 1, and can't be reproduced in iOS 8.


See below for what I think is the culprit:


WebKit`WebKit::ViewGestureController::didRestoreScrollPosition:
->  0x188d51fa0 <+0>:  ldr    w8, [x0, #16]
    0x188d51fa4 <+4>:  cmp    w8, #1
    0x188d51fa8 <+8>:  b.ne   0x188d51fbc               ; <+28>
    0x188d51fac <+12>: ldrb   w8, [x0, #213]
    0x188d51fb0 <+16>: cbz    w8, 0x188d51fbc           ; <+28>
    0x188d51fb4 <+20>: strb   wzr, [x0, #213]
    0x188d51fb8 <+24>: b      0x188d51f40               ; WebKit::ViewGestureController::removeSwipeSnapshotIfReady()
    0x188d51fbc <+28>: ret  


The exception seems to be EXC_BAD_ACCESS (code=1, address=0x10) at main:16, and I have no idea how to resolve it.


Thanks in advance!


Josh

Can you please report this crash, with a sample program that reproduces it, via https://bugreport.apple.com/? Thanks!

I have this too

WebKit`WebKit::ViewGestureController::didRestoreScrollPosition:
    0x11210eb54 <+0>:  pushq  %rbp
    0x11210eb55 <+1>:  movq   %rsp, %rbp
->  0x11210eb58 <+4>:  cmpl   $0x1, 0x10(%rdi)
    0x11210eb5c <+8>:  jne    0x11210eb74               ; <+32>
    0x11210eb5e <+10>: cmpb   $0x0, 0xd5(%rdi)
    0x11210eb65 <+17>: je     0x11210eb74               ; <+32>
    0x11210eb67 <+19>: movb   $0x0, 0xd5(%rdi)
    0x11210eb6e <+26>: popq   %rbp
    0x11210eb6f <+27>: jmp    0x11210eae6               ; WebKit::ViewGestureController::removeSwipeSnapshotIfReady()
    0x11210eb74 <+32>: popq   %rbp
    0x11210eb75 <+33>: retq

And I found out that it happens when you invoke the webview's goBack method on pages with complicated layout - the mobile YouTube website is a great example because of it's multiple frames.

I've created bugreport #21691745 in the meantime, now that I can reproduce 100% of the time.

This is fixed in beta 3.

App crashes when reloading contents of WKWebView
 
 
Q