Skip to content

AndroidView not working properly on a Samsung Galaxy S6 #23900

Closed

Description

@kunit1

Steps to Reproduce

On Samsung Galaxy S6 the google maps plug in causes the device to freeze and the screen shows flickering black pixels.

Minimal Repro

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

class MapTest extends StatelessWidget {
  final LatLng center = const LatLng(32.0, 34.9);
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: SizedBox(
          width: 300.0,
          height: 300.0,
          child: GoogleMap(
            onMapCreated: onMapCreated,
            options: GoogleMapOptions(
              cameraPosition: CameraPosition(
                target: center,
                zoom: 11.0
              )
            ),
            gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
              Factory<OneSequenceGestureRecognizer>(
                () => EagerGestureRecognizer()
              )
            ].toSet(),
          ),
        ),
      ),
    );
  }

  void onMapCreated(GoogleMapController controller) {
    controller.addMarker(MarkerOptions(
      position: LatLng(
        center.latitude, 
        center.longitude
      ),
      infoWindowText: const InfoWindowText("Test Location", 'AA')
    ));
  }

}
[√] Flutter (Channel dev, v0.10.2, on Microsoft Windows [Version 10.0.17134.345], locale en-CA)
    • Flutter version 0.10.2 at D:\flutter
    • Framework revision d8cbb80206 (8 days ago), 2018-10-26 01:30:21 -0400
    • Engine revision 6c2ade9fa2
    • Dart version 2.1.0-dev.8.0.flutter-bf26f760b1

[√] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at C:\Users\kusay\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • SM G920W8 • 0216029abaa90a03 • android-arm64 • Android 6.0.1 (API 23)

• No issues found!

Activity

  1. dnfield commented on Nov 3, 2018

    @dnfield
    Contributor
  2. amirh commented on Nov 4, 2018

    @amirh
    Contributor

    Thanks for the report @kunit1!
    Would you mind trying the android_views integration test on that device? I'm curious to see if embedding a simple view causes the same issue on the device.

    From your local flutter checkout:

    cd dev/integration_tests/android_views
    flutter run
    

    Does your device freeze when launching this app?

  3. kunit1 commented on Nov 4, 2018

    @kunit1
    Author

    @amirh Thank you for the response.
    I tried to run the test app but got the following error in the packages get step:

    Because android_views depends on assets_for_android_views from path which doesn't exist (could not find package
    assets_for_android_views at "..\..\..\bin\cache\pkg\goldens\dev\integration_tests\assets_for_android_views"), version
    solving failed.
    pub get failed (66)
    

    I couldn't find the referenced directory. If you point me in the right direction I would gladly run the test on the device.

  4. amirh commented on Nov 4, 2018

    @amirh
    Contributor

    Try running flutter drive in the android_views directory, it should clone the goldens repo.

  5. kunit1 commented on Nov 4, 2018

    @kunit1
    Author

    I ran the test on the device. This is the result:
    https://drive.google.com/open?id=1ZKb6zO12Sn02wyiH3bLbUU7_UntB41yc

    Error In Log
    GLES-MALI OOM error: execution failed (gles_fbp_wait_for_events at hardware/samsung_slsi/MaliT760_r7p0_Istor/product/gles/src/fb/mali_gles_fb_module_api.c:1869)

    Touching the screen causes the black portion to flicker. The device is not frozen but the view is corrupted as far as I can see.
    With google maps, similar view corruption occurs but the phone becomes unresponsive to any action including the power button. It eventually restarts on its own after a few minutes.

  6. changed the title [-]Google Maps Plugin causes device to freeze[/-] [+]AndroidView not working properly on a Samsung Galaxy S6[/+] on Nov 7, 2018
  7. beroso commented on Nov 16, 2018

    @beroso
    Contributor

    We are facing this Google Maps issue on a LG K4 X230 too.

    Debug log is attached:
    degub.log

  8. amirh commented on Nov 19, 2018

    @amirh
    Contributor

    It seems that this has regressed with the Skia roll at flutter-team-archive/engine#6652
    I'm continuing to bisect the individual Skia commits on that roll.

  9. amirh commented on Nov 19, 2018

    @amirh
    Contributor

    The issue was introduced with google/skia@dc82994 (which also introduced #24402)

    @bsalomon

  10. 7 remaining items

  11. tvolkert commented on Nov 24, 2018

    @tvolkert
    Contributor
  12. amirh commented on Nov 25, 2018

    @amirh
    Contributor

    I'm keeping this open until we confirm the Skia fix fixes the AndroidView issue.

  13. tvolkert commented on Nov 27, 2018

    @tvolkert
    Contributor

    @amirh the Skia roll has landed in flutter/flutter - are you still seeing the issue?

  14. aldobm commented on Nov 28, 2018

    @aldobm

    Hello, in Huawei VNS-L23 android 6 the device freeze and the screen shows flickering pixels.

    I Update Now:

    [✓] Flutter (Channel master, v0.11.11-pre.8, on Mac OS X 10.13.6 17G65, locale
        en-EC)
        • Flutter version 0.11.11-pre.8 at /Users/aldo/flutter
        • Framework revision fe706145bd (2 hours ago), 2018-11-27 19:10:23 -0500
        • Engine revision 2ab019412d
        • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
    

    The Log Say:

    W/System  (15768): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/00000090/n/arm64-v8a
    I/System.out(15768): [/system/bin/getprop, debug.mapview.logs]
    I/System.out(15768): null
    I/System.out(15768): null
    I/System.out(15768): Calling by::className:com.google.maps.api.android.lib6.common.r  MethodName:a
    I/Google Maps Android API(15768): Google Play services client version: 12451000
    I/Google Maps Android API(15768): Google Play services package version: 14574021
    I/System.out(15768): [/system/bin/getprop, debug.mapview.renderer]
    I/System.out(15768): null
    I/System.out(15768): null
    I/System.out(15768): Calling by::className:com.google.maps.api.android.lib6.common.r  MethodName:a
    I/System.out(15768): [/system/bin/getprop, debug.mapview.gmmserver]
    I/System.out(15768): null
    I/System.out(15768): null
    I/System.out(15768): Calling by::className:com.google.maps.api.android.lib6.common.r  MethodName:a
    I/System.out(15768): [/system/bin/getprop, debug.mapview.renderer.label]
    I/System.out(15768): null
    I/System.out(15768): null
    I/System.out(15768): Calling by::className:com.google.maps.api.android.lib6.common.r  MethodName:a
    I/System  (15768): core_booster, getBoosterConfig = false
    I/System  (15768): core_booster, getBoosterConfig = false
    I/flutter (15768): search get token Not login
    W/DynamiteModule(15768): Local module descriptor class for com.google.android.gms.googlecertificates not found.
    I/DynamiteModule(15768): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4
    I/DynamiteModule(15768): Selected remote version of com.google.android.gms.googlecertificates, version >= 4
    W/System  (15768): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000008f/n/arm64-v8a
    I/FirebaseAuth(15768): [FirebaseAuth:] Loading module via FirebaseOptions.
    I/FirebaseAuth(15768): [FirebaseAuth:] Preparing to create service connection to gms implementation
    

    In android 7 Samsung galaxy S6 works fine.

  15. tvolkert commented on Nov 28, 2018

    @tvolkert
    Contributor

    Ok, second take... can you please try v0.11.11 (on the latest dev and beta channels - available via flutter upgrade)? Thanks!

  16. amirh commented on Nov 28, 2018

    @amirh
    Contributor

    Confirmed that this is fixed on master (for a Samsung Galaxy S6).

  17. aldobm commented on Nov 29, 2018

    @aldobm

    In Huawei VNS-L23 android 6 Works Fine, with update now. FIX Thanks

    [✓] Flutter (Channel master, v0.11.12-pre.5, on Mac OS X 10.13.6 17G65, locale
        en-EC)
        • Flutter version 0.11.12-pre.5 at /Users/aldo/flutter
        • Framework revision 06ec8d3b41 (71 minutes ago), 2018-11-28 15:56:58 -0800
        • Engine revision 72c7a75672
        • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
    
    [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
        • Android SDK at /Users/aldo/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling
          support)
        • Platform android-28, build-tools 28.0.3
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_152-release-1136-b06)
        • All Android licenses accepted.
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 10.1, Build version 10B61
        • ios-deploy 1.9.4
        • CocoaPods version 1.5.3
    
    [✓] Android Studio (version 3.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 30.0.1
        • Dart plugin version 181.5656
        • Java version OpenJDK Runtime Environment (build
          1.8.0_152-release-1136-b06)
    
    [✓] Connected device (1 available)
        • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 8.0.0
          (API 26) (emulator)
    
  18. KinsomyJS commented on Dec 5, 2018

    @KinsomyJS

    Hi,the same problem happens in Oppo R15,but my oneplus 5 is correct。

    [✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
    [!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    [!] iOS toolchain - develop for iOS devices (Xcode 9.2)
        ✗ Verify that all connected devices have been paired with this computer in Xcode.
          If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
          To update with Brew, run:
            brew update
            brew uninstall --ignore-dependencies libimobiledevice
            brew uninstall --ignore-dependencies usbmuxd
            brew install --HEAD usbmuxd
            brew unlink usbmuxd
            brew link usbmuxd
            brew install --HEAD libimobiledevice
            brew install ideviceinstaller
        ✗ CocoaPods installed but not initialized.
            CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
            Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
            For more info, see https://flutter.io/platform-plugins
          To initialize CocoaPods, run:
            pod setup
          once to finalize CocoaPods' installation.
    [✓] Android Studio (version 3.2)
    [!] IntelliJ IDEA Community Edition (version 2017.3.6)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.29.1)
    [✓] Connected device (2 available)
    

    I created #24974

  19. huuang commented on Mar 12, 2019

    @huuang

    Hi,the same problem happens in Oppo R15,but my oneplus 5 is correct。

    [✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
    [!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    [!] iOS toolchain - develop for iOS devices (Xcode 9.2)
        ✗ Verify that all connected devices have been paired with this computer in Xcode.
          If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
          To update with Brew, run:
            brew update
            brew uninstall --ignore-dependencies libimobiledevice
            brew uninstall --ignore-dependencies usbmuxd
            brew install --HEAD usbmuxd
            brew unlink usbmuxd
            brew link usbmuxd
            brew install --HEAD libimobiledevice
            brew install ideviceinstaller
        ✗ CocoaPods installed but not initialized.
            CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
            Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
            For more info, see https://flutter.io/platform-plugins
          To initialize CocoaPods, run:
            pod setup
          once to finalize CocoaPods' installation.
    [✓] Android Studio (version 3.2)
    [!] IntelliJ IDEA Community Edition (version 2017.3.6)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.29.1)
    [✓] Connected device (2 available)
    

    I created #24974

    I am facing the same problem, have you solved it?

  20. prashantspandey commented on Oct 6, 2020

    @prashantspandey

    Hi,the same problem happens in Oppo R15,but my oneplus 5 is correct。

    [✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
    [!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    [!] iOS toolchain - develop for iOS devices (Xcode 9.2)
        ✗ Verify that all connected devices have been paired with this computer in Xcode.
          If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
          To update with Brew, run:
            brew update
            brew uninstall --ignore-dependencies libimobiledevice
            brew uninstall --ignore-dependencies usbmuxd
            brew install --HEAD usbmuxd
            brew unlink usbmuxd
            brew link usbmuxd
            brew install --HEAD libimobiledevice
            brew install ideviceinstaller
        ✗ CocoaPods installed but not initialized.
            CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
            Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
            For more info, see https://flutter.io/platform-plugins
          To initialize CocoaPods, run:
            pod setup
          once to finalize CocoaPods' installation.
    [✓] Android Studio (version 3.2)
    [!] IntelliJ IDEA Community Edition (version 2017.3.6)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.29.1)
    [✓] Connected device (2 available)
    

    I created #24974

    I am facing the same problem, have you solved it?

    any solutions?

  21. github-actions commented on Aug 11, 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.

  22. locked as resolved and limited conversation to collaborators on Aug 11, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions