iOS Question WebView crash

martin24

Member
Licensed User
I ran into a reproducible crash when loading certain URLs in a WebView while moving the app into background (before the page is displayed).

This can be reproduced for example with https://www.facebook.com
It only happens with certain URLs, other URLs work fine.

When the app is in foreground while loading facebook, I see this in the log but the page is loaded correctly.

B4X:
CoreAnimation: [EAGLContext renderbufferStorage:fromDrawable:] was called from a non-main thread in an implicit transaction! Note that this may be unsafe without an explicit CATransaction or a call to [CATransaction flush].


When I start loading https://www.facebook.com and put the app into background before the rendered page is displayed, I get the following crash:

B4X:
CoreAnimation: [EAGLContext renderbufferStorage:fromDrawable:] was called from a non-main thread in an implicit transaction! Note that this may be unsafe without an explicit CATransaction or a call to [CATransaction flush].
SignalHandler 11
Signal - 11
Stack Trace: (
    "0   WWDEV                SignalHandler + 120",
    "1   libsystem_platform.dylib            0x000000018be9d9e0 <redacted> + 40",
    "2   AGXGLDriver          gldUpdateDispatch + 7216",
    "3   libGPUSupportMercury.dylib          0x00000001a920ff04 gpusSubmitDataBuffers + 176",
    "4   AGXGLDriver          gldUpdateDispatch + 12664",
    "5   WebCore              <redacted> + 580",
    "6   WebCore              <redacted> + 936",
    "7   WebCore              <redacted> + 528",
    "8   WebCore              <redacted> + 84",
    "9   WebCore              <redacted> + 1436"
)

I just start loading, then press the home button as long as the webview is "white".

Is there a way to work around this problem?

BTW, I use B4i 5.50.
 

martin24

Member
Licensed User
It happens with the normal WebView.

I wasn't aware that WKWebView exists which seems to work. I'll use WKWebView now, thanks for the tip.
 
Upvote 0
Top