Skip to content

Skia crash in GrContext::setResourceCacheLimits on Genymotion (android_x86) #4611

Closed

Description

@eseidelGoogle

Stack from #490 (comment)
Symbolicated by me in #490 (comment)

/src/engine/src/out/android_debug_x86/../../third_party/skia/src/gpu/GrContext.cpp:766
/src/engine/src/out/android_debug_x86/../../sky/shell/gpu/direct/ganesh_canvas.cc:37 (discriminator 1)
/src/engine/src/out/android_debug_x86/../../sky/shell/gpu/direct/rasterizer_direct.cc:161 (discriminator 1)
/src/engine/src/out/android_debug_x86/../../sky/shell/gpu/direct/rasterizer_direct.cc:64
/src/engine/src/out/android_debug_x86/../../base/bind_internal.h:176 (discriminator 5)
/src/engine/src/out/android_debug_x86/../../base/callback.h:396 (discriminator 1)

Crashing line is:

void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
    ASSERT_SINGLE_OWNER
    fResourceCache->setLimits(maxTextures, maxTextureBytes); // line 766
}

The above code is from google/skia@8cc2091

I don't know what the crash point is.

@spierce7 could you upload a tombstone file or post a gist of the full crash stack? Would be nice to know what the crash point is (i.e. is this that fResourceCache is null).

This crash was reported with 6d2d495369 and flutter-team-archive/engine@a943c732d5
#490 (comment)

Activity

  1. eseidelGoogle commented on Jun 17, 2016

    @eseidelGoogle
    ContributorAuthor

    @abarth or @chinmaygarde, suggestions for next steps here?

  2. abarth commented on Jun 17, 2016

    @abarth
    Contributor

    This happens very early in GL startup. Maybe we're failing to bring up the GL driver?

  3. ScottPierce commented on Jun 18, 2016

    @ScottPierce

    @eseidel I'm not sure what a tombstone file is. Also I believe I pasted the entire log that was displayed for the crash. If you give me some instructions, I'd be happy to help.

  4. eseidelGoogle commented on Jun 20, 2016

    @eseidelGoogle
    ContributorAuthor

    @ScottPierce when android apps crash, they typically write out crash logs called "tombstones":
    https://source.android.com/devices/tech/debug/

    In this case it may say in the log where it wrote it, or likely in /data/tombstones, and a adb pull /data/tombstones/tombstone_01 might work to pull it? It's just a slightly more complete version of the above log since adb can trim long logs.

  5. ScottPierce commented on Jun 22, 2016

    @ScottPierce

    @eseidelGoogle I've been trying to get you what you want, but I've been having issues building apps with flutter recently. I've reported #4681, but I'm still getting ADB errors. At first I thought ADB was just getting itself into weird states as it sometimes does, but after numerous restarts I've been unable to fix the issue.

    I'm getting another build error that seems to only be happening with genymotion. I downloaded some updates for Android a few days ago. I'm assuming that must be somewhat related.

    _Below is the build error I'm getting. Flutter is having difficulty talking to ADB. This only happens with genymotion emulator, as flutter can build for my nexus 5x. Android studio has no issue pushing non-flutter builds to my genymotion emulator. How would you like to proceed?_

    command

    flutter run

    exception

    Exit code 1 from: /Users/spierce7/Android/sdk/platform-tools/adb -s adb shell pm list packages com.yourcompany.myapp3

    package:flutter_tools/src/base/process.dart 144                   _runWithLoggingSync
    package:flutter_tools/src/base/process.dart 81                    runCheckedSync
    package:flutter_tools/src/android/android_device.dart 204         AndroidDevice.isAppInstalled
    package:flutter_tools/src/commands/install.dart 37                installApp
    package:flutter_tools/src/commands/run.dart 210                   startApp.<async>
    ===== asynchronous gap ===========================
    dart:async                                                        _Completer.completeError
    package:flutter_tools/src/commands/run.dart 252                   startApp.<async>
    ===== asynchronous gap ===========================
    dart:async                                                        _asyncThenWrapperHelper
    package:flutter_tools/src/commands/run.dart                       startApp
    package:flutter_tools/src/commands/run.dart 129                   RunCommand.runInProject.<async>
    ===== asynchronous gap ===========================
    dart:async                                                        Future.Future.microtask
    package:flutter_tools/src/commands/run.dart                       RunCommand.runInProject
    package:flutter_tools/src/runner/flutter_command.dart 172         FlutterCommand._run.<async>
    dart:async                                                        _SyncCompleter.complete
    package:flutter_tools/src/cache.dart 121                          Cache.updateAll.<async>
    ===== asynchronous gap ===========================
    dart:async                                                        _asyncThenWrapperHelper
    package:flutter_tools/src/runner/flutter_command.dart             FlutterCommand._run
    package:flutter_tools/src/runner/flutter_command.dart 103         FlutterCommand.run
    package:args/command_runner.dart 176                              CommandRunner.runCommand.<fn>
    dart:async                                                        Future.Future.sync
    package:args/command_runner.dart 129                              CommandRunner.runCommand
    package:flutter_tools/src/runner/flutter_command_runner.dart 180  FlutterCommandRunner.runCommand
    package:args/command_runner.dart 103                              CommandRunner.run.<fn>
    dart:async                                                        Future.Future.sync
    package:args/command_runner.dart 103                              CommandRunner.run
    package:flutter_tools/src/runner/flutter_command_runner.dart 123  FlutterCommandRunner.run
    package:flutter_tools/executable.dart 88                          main.<async>.<fn>.<async>
    ===== asynchronous gap ===========================
    package:stack_trace                                               Chain.capture
    package:flutter_tools/executable.dart 82                          main.<async>
    

    flutter doctor

    [✓] Flutter (on Mac OS, channel alpha)
        • Flutter at /Users/spierce7/frameworks/flutter
        • Framework revision 6d2d495369 (2 weeks ago), engine revision a943c732d5
    
    [✓] Android toolchain - develop for Android devices (Android SDK 23.0.3)
        • Android SDK at /Users/spierce7/Android/sdk
        • Platform android-N, build-tools 23.0.3
        • Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 7.3.1)
        • XCode at /Applications/Xcode.app/Contents/Developer
        • Xcode 7.3.1, Build version 7D1014
    
    [✓] Atom - a lightweight development environment for Flutter
        • flutter plugin version 0.2.2
        • dartlang plugin version 0.6.22
    
  6. eseidelGoogle commented on Jun 22, 2016

    @eseidelGoogle
    ContributorAuthor

    Thanks for the report @ScottPierce! What API version is your emulator running? It's likely included in the name of the emulator shown in adb devices or flutter devices.

  7. ScottPierce commented on Jun 22, 2016

    @ScottPierce

    @eseidelGoogle This error was reproduced with 2 Genymotion emulators:

    1. Google Nexus 5 - 5.1.0 - API 22
    2. Google Nexus 5X - 6.0.0 - API 23
  8. devoncarew commented on Jun 22, 2016

    @devoncarew
    Contributor

    @ScottPierce, can you run adb shell getprop ro.product.cpu.abi?

    Also /Users/spierce7/Android/sdk/platform-tools/adb -s adb shell pm list packages com.yourcompany.myapp3 - perhaps the format changed a bit from what we're expecting.

    It'd be great to have the stdout/stderr as well as the exit code (echo $?). Thanks!

  9. ScottPierce commented on Jun 22, 2016

    @ScottPierce

    I was able to resolve the adb issue. Genymotion defaults to using it's own ADB instance, and with the update to adb that I recently downloaded, they were out of sync. I was seeing adb server version (32) doesn't match this client (36); killing... in the logs all over the place, even while running normal adb commands like adb devices.

    I was able to resolve this by telling Genymotion to use my adb that I downloaded from google, instead of it's own version:
    screen shot 2016-06-22 at 2 39 02 pm

    I'm back to getting the error this thread was originally about. I'll try to comply with the original request again.

  10. ScottPierce commented on Jun 22, 2016

    @ScottPierce

    @eseidelGoogle The tombstone you requested:
    tombstone_00.txt

  11. eseidelGoogle commented on Jun 22, 2016

    @eseidelGoogle
    ContributorAuthor

    Thank you very much! @ScottPierce to confirm before we forget: what's the flutter version which generated that tombstone? :) I'll get symbols for you shortly!

  12. ScottPierce commented on Jun 22, 2016

    @ScottPierce
    spierce7$ flutter --version
    Flutter on channel alpha (from https://github.com/flutter/flutter.git)
    Framework revision 6d2d495369 (2 weeks ago); engine revision a943c732d5
    
  13. modified the milestone: on Aug 1, 2016
  14. modified the milestones: , 2: Make Early Adopters happy on Jan 18, 2017
  15. eseidelGoogle commented on Feb 28, 2017

    @eseidelGoogle
    ContributorAuthor

    This crash is over a year old, we've rolled skia many times since then. I suspect this bug is no longer useful. I just tested in genymotion on my MacBook Pro just now and no crashes (there were other bugs):
    Google Nexus 6, 7 0 0, API 24, 1440x2560 • 192.168.56.101:5555 • android-x86 • Android 7.0 (API 24)

  16. github-actions commented on Sep 5, 2021

    @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.

  17. locked as resolved and limited conversation to collaborators on Sep 5, 2021
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 consoleplatform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions