Skip to content

[android][platform_view] java.lang.IllegalStateException: The overlay surface (id:0) doesn't exist #86157

@dsafa22

Description

@dsafa22

Everything is ok when first entry activty.
when entry activty with cache engine in second time, it call crash.

because: PlatformViewsController clear the overlayLayerViews,but the surface don not call createOverlaySurface() when second entry.

  @UiThread
  public void detach() {
    ...
    destroyOverlaySurfaces();
    ...
  }
[ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(49)] java.lang.IllegalStateException: The overlay surface (id:0) doesn't exist
        at io.flutter.plugin.platform.PlatformViewsController.onDisplayOverlaySurface(PlatformViewsController.java:796)
        at io.flutter.embedding.engine.FlutterJNI.onDisplayOverlaySurface(FlutterJNI.java:960)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:363)
        at android.os.Looper.loop(Looper.java:176)
        at android.app.ActivityThread.main(ActivityThread.java:8393)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
2021-07-09 11:08:13.142 26720-26720/? I/crash_dump64: performing dump of process 25574 (target tid = 25574)
2021-07-09 11:08:13.164 26720-26720/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-07-09 11:08:13.164 26720-26720/? A/DEBUG: Build fingerprint: 'HUAWEI/EVR-AL00/HWEVR:10/HUAWEIEVR-AL00/10.1.0.163C00:user/release-keys'
2021-07-09 11:08:13.164 26720-26720/? A/DEBUG: Revision: '0'
2021-07-09 11:08:13.164 26720-26720/? A/DEBUG: ABI: 'arm64'
2021-07-09 11:08:13.167 672-24429/? I/netd: trafficSwapActiveStatsMap() <21.85ms>
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG: SYSVMTYPE: Maple
    APPVMTYPE: Art
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG: Timestamp: 2021-07-09 11:08:13+0800
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG: pid: 25574, tid: 25574, name: om.tlive.madcat  >>> com.tlive.madcat <<<
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG: uid: 10956
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG: Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1414)] Check failed: CheckException(env). 
    '
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x0  0000000000000000  x1  00000000000063e6  x2  0000000000000006  x3  0000007fd3b4aac0
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  7f7f7f7f7f7f7f7f
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x8  00000000000000f0  x9  24434133218de407  x10 0000000000000001  x11 0000000000000000
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x12 fffffff0fffffbdf  x13 0000000000000006  x14 0000000000000004  x15 00000ceb16954cde
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x16 0000007e6516e9f8  x17 0000007e6514e6f0  x18 0000000081af1549  x19 00000000000063e6
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x20 00000000000063e6  x21 00000000ffffffff  x22 0000007de1af3980  x23 00000000000002ac
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x24 0000000000000000  x25 0000007dd089cde8  x26 0000000000000168  x27 00000000000002ab
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     x28 0000000000000168  x29 0000007fd3b4ab60
2021-07-09 11:08:13.168 26720-26720/? A/DEBUG:     sp  0000007fd3b4aaa0  lr  0000007e65103580  pc  0000007e651035ac
2021-07-09 11:08:13.169 26720-26720/? A/DEBUG: backtrace:
2021-07-09 11:08:13.169 26720-26720/? A/DEBUG:       #00 pc 00000000000705ac  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 084953f8f5198acc841653c0a2c76779)
2021-07-09 11:08:13.169 26720-26720/? A/DEBUG:       #01 pc 000000000131cdc4  /data/app/com.tlive.madcat-kzbNDUR125-v-gLicf11Qg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
2021-07-09 11:08:13.169 26720-26720/? A/DEBUG:       #02 pc 0000000001340a9c  /data/app/com.tlive.madcat-kzbNDUR125-v-gLicf11Qg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowa: platform-viewsEmbedding Android/iOS views in Flutter appsengineflutter/engine related. See also e: labels.found in release: 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallywaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions