Multiple processes of an App exist at the same time.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Multiple processes of an App exist at the same time.

Lotus South
Recently, my app's had a lot of crashes only on Android 9, 10, here is a crash log from Firebase Crashlytics:

Fatal Exception: java.lang.RuntimeException
Using WebView from more than one process at once with the same data directory is not supported. : Current process org.xlotus.ktesteverything (pid 7032), lock owner org.xlotus.ktesteverything (pid 9186)
org.chromium.android_webview.AwDataDirLock.b (
Mj.i ( (
android.os.Handler.handleCallback (
android.os.Handler.dispatchMessage (
android.os.Looper.loop ( (
java.lang.reflect.Method.invoke ($ ( (

My app does not use multiple process for any Android Components or others, and also you can see that there are two process(current process and lock owner process) having the same name (my app's package name), why does it happen?

You may think the crash relating to WebView and I should contact to Chromium team, but the root cause is the old process of my App didn't exit and still held the lock of WebView data directory, when user opens the app again, it will run on another process and also want to hold the lock, in this situation, WebView is forced to throw the Exception to avoid race condition (Ref).

Furthermore, Some users got the crash multiple times for about 1 hour with the crash log showing the same lock owner, which means the old process of my app didn't exit and still held the exclusive lock of WebView data directory for a long time. As a result, every time users opened my app again, and when they used a feature using WebView, the crash occurred.

You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit