Skip to content

Random crash in some mediatek devices #114486

Closed

Description

@wujinsheng-ola

In the Indonesian market, our products encounter a lot of Flutter crash at the primary level, mainly represented by Xiaomi Redmi 9C, Xiaomi Redmi 9A, Samsung Galaxy A10s, Samsung Galaxy A02, Intermodal Infinix HOT 9 Play. At 3.5% of the total collapse, it is a serious proportion and one that should be taken seriously.

Basic Information:

flutter版本:3.3.5

flutter engine hash:c08d7d5efc9aa6eb3c30cfb3be6dc09bca5e7631

Here's the latest stack information we got:

1 #00 pc 0002bfcc /vendor/lib/egl/libGLESv2_mtk.so [armeabi-v8::34ed5df2075eeb41cbc04b3113ec2bda]
2 #01 pc 00041ddd /vendor/lib/egl/libGLESv2_mtk.so [armeabi-v8::34ed5df2075eeb41cbc04b3113ec2bda]
3 #02 pc 0002bf71 /vendor/lib/egl/libGLESv2_mtk.so [armeabi-v8::34ed5df2075eeb41cbc04b3113ec2bda]
4 #03 pc 0006c867 /vendor/lib/egl/libGLESv2_mtk.so [armeabi-v8::34ed5df2075eeb41cbc04b3113ec2bda]
5 #04 pc 0006c3bd /vendor/lib/egl/libGLESv2_mtk.so (glTexImage2D+156) [armeabi-v8::34ed5df2075eeb41cbc04b3113ec2bda]
6 #05 pc 0002ab8f /vendor/lib/egl/libGLES_meow.so [armeabi-v8::6d6caf55643460f2db471f5c3405e207]
7 #06 pc 00352e29 GrGLMakeAssembledGLESInterface (../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp:230) [armeabi-v7a]
8 #07 pc 0035df25 find (../../third_party/skia/include/private/SkTHash.h:95) [armeabi-v7a]
9 #08 pc 00359709 disconnect (../../third_party/skia/src/gpu/ganesh/gl/GrGLGpu.cpp:506) [armeabi-v7a]
10 #09 pc 002f1815 GrGeometryProcessor::Attribute::size() const (../../third_party/skia/src/ports/SkMemory_malloc.cpp:0) [armeabi-v7a]
11 #10 pc 002f8353 GrResourceCache::getNextTimestamp() (../../third_party/skia/src/gpu/ganesh/GrResourceCache.cpp:673) [armeabi-v7a]
12 #11 pc 002f4b63 GrProcessorSet::~GrProcessorSet() (../../third_party/skia/src/gpu/ganesh/GrProcessorSet.h:48) [armeabi-v7a]
13 #12 pc 002f9dc7 GrShaderVar::GrShaderVar(SkString, SkSLType, GrShaderVar::TypeModifier, int, SkString, SkString) (../../third_party/skia/src/gpu/ganesh/GrShaderVar.h:69) [armeabi-v7a]
14 #13 pc 0031bd2b GrGLSLShaderBuilder::appendColorGamutXform(SkString*, char const*, GrGLSLColorSpaceXformHelper*) (../../third_party/skia/src/gpu/ganesh/glsl/GrGLSLColorSpaceXformHelper.h:65) [armeabi-v7a]
15 #14 pc 0031beb1 operator() (../../third_party/skia/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp:196) [armeabi-v7a]
16 #15 pc 0031d60b skpaint_to_grpaint_impl (../../third_party/skia/src/gpu/ganesh/SkGr.cpp:594) [armeabi-v7a]
17 #16 pc 0040d4f9 shader (../../flutter/lib/ui/painting/image_shader.cc:75 [Inline: ~sk_sp]) [armeabi-v7a]
18 #17 pc 0018d659 RunExpiredTasksNow (../../flutter/fml/message_loop_impl.cc:139 [Inline: FlushTasks]) [armeabi-v7a]
19 #18 pc 0040cf7b operator() (../../third_party/skia/src/codec/SkCodec.cpp:63) [armeabi-v7a]
20 #19 pc 0018c60d __call_once_proxy<std::__1::tuple<(lambda at ../../flutter/fml/icu_util.cc:105:18) &&> > (../../flutter/fml/icu_util.cc:98) [armeabi-v7a]
21 #20 pc 0018f291 TraceEventAsyncBegin0 (../../flutter/fml/trace_event.cc:174) [armeabi-v7a]
22 #21 pc 00010867 /system/lib/libutils.so (android::Looper::pollInner(int)+666) [armeabi-v8::a4424e73dbe004e8623d6713ad30a604]
23 #22 pc 00010553 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+30) [armeabi-v8::a4424e73dbe004e8623d6713ad30a604]
24 #23 pc 0000cff5 /system/lib/libandroid.so (ALooper_pollOnce+52) [armeabi-v8::00792d9da7cb9148852bce64e1b1a393]
25 #24 pc 0018f365 TraceEventFlowStep0 (../../flutter/fml/trace_event.cc:292) [armeabi-v7a]
26 #25 pc 0018dd73 fml::MessageLoopTaskQueues::RegisterTask(fml::TaskQueueId, std::__1::function<void ()> const&, fml::TimePoint, fml::TaskSourceGrade) (../../flutter/fml/message_loop_task_queues.cc:118) [armeabi-v7a]
27 #26 pc 000a6293 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) [armeabi-v8::af31ec96b35fedca378e07659b30896c]
28 #27 pc 00060803 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) [armeabi-v8::af31ec96b35fedca378e07659b30896c]

Activity

  1. danagbemava-nc commented on Nov 2, 2022

    @danagbemava-nc
    Member

    Hi @wujinsheng-ola, are you able to reproduce this issue locally? If so kindly provide a complete minimal reproducible code sample along with steps to reproduce.

    Thank you

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 2, 2022
  3. wujinsheng-ola commented on Nov 3, 2022

    @wujinsheng-ola
    Author

    Hi @wujinsheng-ola, are you able to reproduce this issue locally? If so kindly provide a complete minimal reproducible code sample along with steps to reproduce.

    Thank you

    I'm sorry that there is no fixed recurrence path and method

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 3, 2022
  5. changed the title [-]render crash in some mtk machine [/-] [+]Random crash in some mediatek devices[/+] on Nov 3, 2022
  6. danagbemava-nc commented on Nov 3, 2022

    @danagbemava-nc
    Member

    Labeling for further investigation from the team based on the crash log above.

    Might be related to #103498

  7. added
    c: crashStack traces logged to the console
    platform-androidAndroid applications specifically
    engineflutter/engine related. See also e: labels.
    needs repro infoAutomated crash report whose cause isn't yet known
    and removed
    in triagePresently being triaged by the triage team
    on Nov 3, 2022
  8. chinmaygarde commented on Nov 7, 2022

    @chinmaygarde
    Contributor

    From the limited information, this seems like a crash in glTexImage2D. An educated guess for this would be that the application is running out of texture memory, and the driver, instead of returning a null resource, is crashing instead. Perhaps this application is texture heavy?

    Anyway, without a repro case, this isn't actionable.

  9. LiangJie1-ola commented on Nov 21, 2022

    @LiangJie1-ola

    I create a Skia-based App on Android.

    Using up the memory while textures being recreate and doing other allocations. But can not reproduced such case.

    So if there were some memory leaks by the usage of textures create by skia.

    Also I see some other drawing engine like Unity was reported such problem on their forums by users.

  10. github-actions commented on Dec 5, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoledependency: skiaSkia team may need to help use: device-specificOnly manifests on certain devicesengineflutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions