Skip to content

Fatal error:FlutterView.getBitmap will crash when there is a video_player on it. #16143

@kangwang1988

Description

@kangwang1988

Steps to Reproduce

Checkout code at git@github.com:FlutterRepo/snapshot_demo.git.

screenshot_20180402-103434

Click the right-bottom play button to start play a video, and then press the snapshot button to get take a screenshot.(FlutterView.gitBitmap will be called) Then the app will crash.

My device is a Huawei Mate9.

Logs

04-02 10:46:59.337 1200-1394/? E/WificondControl: Noise: -95, Snr: 0, Chload: -1
04-02 10:46:59.687 31663-31683/com.yourcompany.snapshotdemo A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1253fcd105041f in tid 31683 (Thread-5)
04-02 10:46:59.754 31747-31747/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-02 10:46:59.754 31747-31747/? A/DEBUG: Build fingerprint: 'HUAWEI/MHA-AL00/HWMHA:8.0.0/HUAWEIMHA-AL00/342(C00):user/release-keys'
04-02 10:46:59.754 31747-31747/? A/DEBUG: Revision: '0'
04-02 10:46:59.754 31747-31747/? A/DEBUG: ABI: 'arm64'
04-02 10:46:59.754 31747-31747/? A/DEBUG: pid: 31663, tid: 31683, name: Thread-5  >>> com.yourcompany.snapshotdemo <<<
04-02 10:46:59.754 31747-31747/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1253fcd105041f
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x0   00000071487c9dc8  x1   0000000000000000  x2   0000007129be3b70  x3   0000007129be3ba0
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x4   0000000000000001  x5   0000000000000001  x6   000000004416aaab  x7   0000000000000000
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x8   0000007129be3c60  x9   000000712a3d8664  x10  a91253fcd10503ff  x11  000000712a3d8664
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x12  000000712a3d866c  x13  0000000000000738  x14  0000000000000710  x15  0000000000000000
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x16  0000000000000005  x17  0000000000000005  x18  0000000000000001  x19  000000711469eec0
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x20  0000007129be3e50  x21  000000713de19e40  x22  00000071259f3800  x23  0000000000000002
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x24  00000071259f3800  x25  000000007774100c  x26  00000071259f3800  x27  00000071397d9050
04-02 10:46:59.754 31747-31747/? A/DEBUG:     x28  0000cc3a3bca6042  x29  0000007148635fd0  x30  000000712a3a0fe0
04-02 10:46:59.754 31747-31747/? A/DEBUG:     sp   0000007129be3c60  pc   000000712a3a2b84  pstate 0000000020000000
04-02 10:46:59.758 31747-31747/? A/DEBUG: backtrace:
04-02 10:46:59.758 31747-31747/? A/DEBUG:     #00 pc 0000000000169b84  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.758 31747-31747/? A/DEBUG:     #01 pc 0000000000167fdc  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.758 31747-31747/? A/DEBUG:     #02 pc 0000000000164c00  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.758 31747-31747/? A/DEBUG:     #03 pc 00000000001676fc  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #04 pc 0000000000164c00  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #05 pc 00000000001681b0  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #06 pc 000000000016664c  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #07 pc 000000000015ed80  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #08 pc 0000000000161308  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #09 pc 000000000016b71c  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #10 pc 000000000016f960  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #11 pc 0000000000015f80  /system/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+808)
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #12 pc 0000000000015bd0  /system/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+108)
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #13 pc 0000000000013944  /system/lib64/libandroid.so (ALooper_pollOnce+92)
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #14 pc 000000000016f904  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #15 pc 000000000016b7f8  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #16 pc 000000000016da9c  /data/app/com.yourcompany.snapshotdemo-LewEhJtfsRN_8dfg8CavCg==/lib/arm64/libflutter.so
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #17 pc 0000000000066760  /system/lib64/libc.so (_ZL15__pthread_startPv+36)
04-02 10:46:59.759 31747-31747/? A/DEBUG:     #18 pc 000000000001ee24  /system/lib64/libc.so (__start_thread+68)

Run your application with flutter run and attach all the log output.

Run flutter analyze and attach any output of that command also.

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.1.6-pre.28, on Mac OS X 10.13.4 17E199, locale en-CN)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.1)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.0)
[!] IntelliJ IDEA Ultimate Edition (version 2017.2.6)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
[✓] Connected devices (2 available)

! Doctor found issues in 2 categories.

I've did some test.If i remove the video player, the getBitmap function works fine. But when I have a video player on it, it will crash.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions