Skip to content

[Android] Map flickers when app is resumed, and sometimes get transparent. #327

Open
@T-moz

Description

@T-moz

Flickers:

Screen_Recording_20231110-200222.mp4

Transparent:

Screen_Recording_20231110-200512_1.mp4

Steps to reproduce:

  • I reproduced the bug with the example app of flutter_maplibre_gl.
  • I used on Samsung galaxy S9 on Android 10.

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 14.0 23A344 darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.84.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

logs:

I/ViewRootImpl@374d9ac[MainActivity](28559): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)0 dur=7 res=0x1 s={true 530388320256} ch=false
I/ViewRootImpl@374d9ac[MainActivity](28559): ViewPostIme pointer 0
I/ViewRootImpl@374d9ac[MainActivity](28559): ViewPostIme pointer 1
I/ViewRootImpl@374d9ac[MainActivity](28559): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(28559): prepareNavigationBarInfo() DecorView@3c6e580[MainActivity]
D/InputMethodManager(28559): getNavigationBarColor() -855310
I/ViewRootImpl@374d9ac[MainActivity](28559): stopped(false) old=false
I/ViewRootImpl@374d9ac[MainActivity](28559): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)0 dur=6 res=0x1 s={true 530388320256} ch=false
I/ViewRootImpl@374d9ac[MainActivity](28559): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(28559): prepareNavigationBarInfo() DecorView@3c6e580[MainActivity]
D/InputMethodManager(28559): getNavigationBarColor() -855310
I/PlatformViewsController(28559): Hosting view in view hierarchy for platform view: 0
I/mali_winsys(28559): new_window_surface() [1x1] return: 0x3000
W/Gralloc3(28559): allocator 3.x is not supported
V/Mbgl-ConnectivityReceiver(28559): connected - true
I/Mbgl-EGLConfigChooser(28559): In emulator: false
I/mali_winsys(28559): new_window_surface() [1440x2640] return: 0x3000
I/Mbgl    (28559): {Thread-8}[General]: GPU Identifier: Mali-G72
W/Mbgl    (28559): {Thread-8}[ParseStyle]: Layer '6hkMgsshi2_0' has an invalid value for text-font and will not render text. Output values must be contained as literals within the expression.
W/Mbgl    (28559): {Thread-8}[ParseStyle]: Layer '6hkMgsshi2_0' has an invalid value for text-font and will not render text. Output values must be contained as literals within the expression.
I/SurfaceView(28559): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ........ 0,0-1440,2960} of ViewRootImpl@374d9ac[MainActivity]
I/SurfaceView(28559): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ........ 0,0-1440,2960}
I/mali_egl(28559): eglDestroySurface() in
I/mali_winsys(28559): delete_surface() [1440x2960] return
I/mali_egl(28559): eglDestroySurface() out
W/libEGL  (28559): EGLNativeWindowType 0x7a8f0d0010 disconnect failed
I/SurfaceView(28559): remove() io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ........ 0,0-1440,2960} Surface(name=SurfaceView - com.mapbox.mapboxglexample/com.mapbox.example.MainActivity@6136de3@0)/@0xfaf2459
I/mali_egl(28559): eglDestroySurface() in
I/mali_winsys(28559): delete_surface() [1440x2960] return
I/mali_egl(28559): eglDestroySurface() out
W/libEGL  (28559): EGLNativeWindowType 0x7b7da83710 disconnect failed
I/ViewRootImpl@374d9ac[MainActivity](28559): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)8 dur=14 res=0x5 s={false 0} ch=true
I/ViewRootImpl@374d9ac[MainActivity](28559): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(28559): prepareNavigationBarInfo() DecorView@3c6e580[MainActivity]
D/InputMethodManager(28559): getNavigationBarColor() -855310
I/ViewRootImpl@374d9ac[MainActivity](28559): stopped(true) old=false
I/SurfaceView(28559): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ........ 0,0-1440,2960} of ViewRootImpl@374d9ac[MainActivity]
D/InputTransport(28559): Input channel destroyed: 'ClientS', fd=97
I/SurfaceView(28559): onWindowVisibilityChanged(4) false io.flutter.embedding.android.FlutterSurfaceView{6136de3 G.E...... ......I. 0,0-1440,2960} of ViewRootImpl@374d9ac[MainActivity]
I/ViewRootImpl@374d9ac[MainActivity](28559): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)4 dur=4 res=0x1 s={false 0} ch=false
I/ViewRootImpl@374d9ac[MainActivity](28559): stopped(false) old=true
I/SurfaceView(28559): windowStopped(false) false io.flutter.embedding.android.FlutterSurfaceView{6136de3 G.E...... ......I. 0,0-1440,2960} of ViewRootImpl@374d9ac[MainActivity]
I/ViewRootImpl@374d9ac[MainActivity](28559): stopped(false) old=false
I/SurfaceView(28559): onWindowVisibilityChanged(0) true io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ......ID 0,0-1440,2960} of ViewRootImpl@374d9ac[MainActivity]
I/ViewRootImpl@374d9ac[MainActivity](28559): Relayout returned: old=(0,0,1440,2960) new=(0,0,1440,2960) req=(1440,2960)0 dur=5 res=0x7 s={true 530388627456} ch=true
I/mali_winsys(28559): new_window_surface() [1440x2960] return: 0x3000
I/SurfaceView(28559): surfaceCreated 1 #5 io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ......ID 0,0-1440,2960}
I/mali_winsys(28559): new_window_surface() [1440x2960] return: 0x3000
I/SurfaceView(28559): surfaceChanged (1440,2960) 1 #5 io.flutter.embedding.android.FlutterSurfaceView{6136de3 V.E...... ......ID 0,0-1440,2960}
I/OpenGLRenderer(28559): doUpdatePositionAsync is called and callVoidMethod
V/Mbgl-ConnectivityReceiver(28559): connected - true
I/ViewRootImpl@374d9ac[MainActivity](28559): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(28559): prepareNavigationBarInfo() DecorView@3c6e580[MainActivity]
D/InputMethodManager(28559): getNavigationBarColor() -855310
D/InputMethodManager(28559): prepareNavigationBarInfo() DecorView@3c6e580[MainActivity]
D/InputMethodManager(28559): getNavigationBarColor() -855310
V/InputMethodManager(28559): Starting input: tba=com.mapbox.mapboxglexample ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(28559): startInputInner - Id : 0
I/InputMethodManager(28559): startInputInner - mService.startInputOrWindowGainedFocus

Related informations:

✅ This bug is not present in Maplibre Native.
🐞 This bug is present in mapbox-map-flutter
✅ This bug is not present in google_map_flutter

The root cause might be in the platform-view implementation.

See Google Map

Screen_Recording_20231110-202506.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidbugSomething isn't workingupstreamdepends on changes upstream (flutter/maplibre)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions