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

app crash(android) attachToContext: GLConsumer is already attached to a context #176

Closed
zmtzawqlp opened this issue Mar 4, 2022 · 0 comments

Comments

@zmtzawqlp
Copy link

Steps to Reproduce

  1. click button on appbar(webview) to jump to pdfpage
  2. back to webview page
  3. do step 1 and 2 again

app crash

please run demo
crash_demo.zip

Logs

error

D[/com.shockwave.pdfium.PdfiumCore]()(28398): Starting PdfiumAndroid 1.9.0
D[/jniPdfium]()(28398): Init FPDF library
E[/BufferItemConsumer]()(28398): [ImageReader-1080x1920f1m3-28398-0] Failed to release buffer: Unknown error -1 (1)
E[/GLConsumer]()(28398): [SurfaceTexture-0-28398-1] attachToContext: GLConsumer is already attached to a context
E[/flutter]() (28398): [ERROR:flutter[/fml/platform/android/jni_util.cc]()(211)] java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
E[/flutter]() (28398): 	at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:289)
E[/flutter]() (28398): 	at io.flutter.embedding.engine.renderer.SurfaceTextureWrapper.attachToGLContext(SurfaceTextureWrapper.java:57)
E[/flutter]() (28398): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E[/flutter]() (28398): 	at android.os.MessageQueue.next(MessageQueue.java:331)
E[/flutter]() (28398): 	at android.os.Looper.loop(Looper.java:149)
E[/flutter]() (28398): 	at android.app.ActivityThread.main(ActivityThread.java:6701)
E[/flutter]() (28398): 	at java.lang.reflect.Method.invoke(Native Method)
E[/flutter]() (28398): 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:249)
E[/flutter]() (28398): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
E[/flutter]() (28398):
F[/flutter]() (28398): [FATAL:flutter[/shell/platform/android/platform_view_android_jni_impl.cc]()(1301)] Check failed: fml::jni::CheckException(env).
F[/google-breakpad]()(28558): Microdump skipped (uninteresting)
W[/google-breakpad]()(28398): ### ### ### ### ### ### ### ### ### ### ### ### ###
W[/google-breakpad]()(28398): Chrome build fingerprint:
W[/google-breakpad]()(28398): 71.0.3578.99
W[/google-breakpad]()(28398): 357809950
W[/google-breakpad]()(28398): ### ### ### ### ### ### ### ### ### ### ### ### ###
F[/libc]()    (28398): Fatal signal 6 (SIGABRT), code -6 in tid 28398 (mple.crash_demo)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Xiaomi[/sagit/sagit:8]().0.0[/OPR1.170623.027/V10.3.1.0.OCACNXM]():user[/release-keys]()'
Revision: '0'
ABI: 'arm64'
pid: 28398, tid: 28398, name: mple.crash_demo  >>> com.example.crash_demo <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter[/shell/platform/android/platform_view_android_jni_impl.cc]()(1301)] Check failed: fml::jni::CheckException(env).
'
    x0   0000000000000000  x1   0000000000006eee  x2   0000000000000006  x3   0000000000000008
    x4   0000000000000080  x5   0000000000000080  x6   0000000000000080  x7   8000000000000000
    x8   0000000000000083  x9   950b71b6e288188b  x10  0000000000000000  x11  0000000000000001
    x12  ffffffffffffffff  x13  0000000000000000  x14  ffffffffffffffff  x15  0001132948be3d2d
    x16  0000007eaf2e02e8  x17  0000007eaf281d2c  x18  000000006f4e2fe0  x19  0000000000006eee
    x20  0000000000006eee  x21  0000007fc2188a98  x22  0000007e82c63c18  x23  0000007ea30803e8
    x24  0000007ead702b00  x25  0000000000000000  x26  0000000000000001  x27  0000007e9e1f2740
    x28  0000007ead6dcf28  x29  0000007fc2188a70  x30  0000007eaf235e54
    sp   0000007fc2188a30  pc   0000007eaf281d34  pstate 0000000060000000
backtrace:
    #00 pc 0000000000069d34  [/system/lib64/libc.so]() (tgkill+8)
    #01 pc 000000000001de50  [/system/lib64/libc.so]() (abort+88)
    #02 pc 0000000000002740  [/data/app/com.example.crash_demo-_jVlYbOKwlZW366EnM5Sog]()==[/base.apk]() (offset 0x283c000)
Lost connection to device.
[✓] Flutter (Channel stable, 2.10.0, on macOS 12.0.1 21A559 darwin-x64, locale zh-Hans-CN)
    • Flutter version 2.10.0 at /Users/zmtzawqlp/Documents/flutter/2.10.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5f105a6ca7 (4 weeks ago), 2022-02-01 14:15:42 -0800
    • Engine revision 776efd2034
    • Dart version 2.16.0
    • DevTools version 2.9.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/zmtzawqlp/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = /Users/zmtzawqlp/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (3 available)
    • MI 6 (mobile)   • 5a4b233b • android-arm64  • Android 8.0.0 (API 26)
    • macOS (desktop) • macos    • darwin-x64     • macOS 12.0.1 21A559 darwin-x64
    • Chrome (web)    • chrome   • web-javascript • Google Chrome 99.0.4844.51

[!] HTTP Host Availability
    ✗ HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host:
      Operation timed out

! Doctor found issues in 1 category.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant