Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering levele: device-specificOnly manifests on certain devicesOnly manifests on certain devicese: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestse: impeller-naughty-driverDevices & drivers that may be behaving unexpectedly and may need workarounds.Devices & drivers that may be behaving unexpectedly and may need workarounds.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
What target platforms are you seeing this bug on?
Android
Steps to reproduce
- Enable Impeller on Android
<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="true" />
- Use native views directly or through plugin
Expected results
Native view is rendered
Actual results
Native view is not displayed, screen is either empty or black with weird "glitch artifacts".
Issue seems to be device related and so far I can consistently reproduce it on:
- Samsung Galaxy Note 10 Lite (Android 13)
- Honor 10 (HarmonyOS 3.0)
Code sample
Flutter code sample
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
brightness: Brightness.dark,
),
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
// This is used in the platform side to register the view.
const String viewType = '<platform-view-type>';
// Pass parameters to the platform side.
const Map<String, dynamic> creationParams = <String, dynamic>{};
return SafeArea(
child: Scaffold(
body: Column(
children: [
Expanded(
child: Container(
padding: const EdgeInsets.all(16),
color: Colors.blue,
height: MediaQuery.of(context).size.height / 2,
width: MediaQuery.of(context).size.width,
child: Container(
color: Colors.white,
child: const Center(
child: Text(
'Flutter view',
style: TextStyle(
fontSize: 20,
color: Colors.black,
),
),
),
),
),
),
Expanded(
child: Container(
padding: const EdgeInsets.all(16),
color: Colors.green,
height: MediaQuery.of(context).size.height / 2,
width: MediaQuery.of(context).size.width,
child: PlatformViewLink(
viewType: viewType,
surfaceFactory: (context, controller) {
return AndroidViewSurface(
controller: controller as AndroidViewController,
gestureRecognizers: const <Factory<
OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
);
},
onCreatePlatformView: (params) {
return PlatformViewsService.initSurfaceAndroidView(
id: params.id,
viewType: viewType,
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
onFocus: () {
params.onFocusChanged(true);
},
)
..addOnPlatformViewCreatedListener(
params.onPlatformViewCreated)
..create();
},
),
),
),
],
),
),
);
}
}
Native code sample
package com.example.google_maps_impeller_issue
import android.content.Context
import android.graphics.Color
import android.view.View
import android.widget.TextView
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.StandardMessageCodec
import io.flutter.plugin.platform.PlatformView
import io.flutter.plugin.platform.PlatformViewFactory
class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
flutterEngine
.platformViewsController
.registry
.registerViewFactory("<platform-view-type>",
NativeViewFactory())
}
}
internal class NativeView(context: Context, id: Int, creationParams: Map<String?, Any?>?) :
PlatformView {
private val textView: TextView
override fun getView(): View {
return textView
}
override fun dispose() {}
init {
textView = TextView(context)
textView.textSize = 42f
textView.setBackgroundColor(Color.rgb(255, 255, 255))
textView.text = "Rendered on a native Android view"
}
}
class NativeViewFactory : PlatformViewFactory(StandardMessageCodec.INSTANCE) {
override fun create(context: Context, viewId: Int, args: Any?): PlatformView {
val creationParams = args as Map<String?, Any?>?
return NativeView(context, viewId, creationParams)
}
}Screenshots or Videos
Logs
Logs
D/zzcc (17186): preferredRenderer: null
I/Google Maps Android API(17186): Google Play services package version: 210613039
W/_impeller_issu(17186): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
I/PlatformViewsController(17186): Hosting view in a virtual display for platform view: 0
I/PlatformViewsController(17186): PlatformView is using SurfaceProducer backend
I/DecorView[](17186): pkgName:com.example.google_maps_impeller_issue old windowMode:0 new windoMode:1, isFixedSize:false
D/MouseWheelSynthesizer(17186): mMoveStepInDp: 64, mMoveStepInPixel: 192, mUpTimeDelayed: 100
D/ViewRootImpl(17186): ViewRootImpl mIsInProductivePCDisplay: false
D/InputEventReceiver(17186): dispatchInputInterval 1000000
I/GoogleMapController(17186): No TextureView found. Likely using the LEGACY renderer.
E/GoogleMapController(17186): Cannot enable MyLocation layer as location permissions are not granted
D/OpenGLRenderer(17186): disableOutlineDraw is true
I/HiTouch_HiTouchSensor(17186): HiTouch restricted: Sub windows restricted.
D/HiTouch_PressGestureDetector(17186): onAttached, package=com.example.google_maps_impeller_issue, windowType=2030, mIsHiTouchRestricted=true
2
D/mali_winsys(17186): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/vulkan (17186): vkAcquireNextImageKHR: non-infinite timeouts not yet implemented
W/ImageReaderSurfaceProducer(17186): ImageTextureEntry can't wait on the fence on Android < 33
W/vulkan (17186): vkAcquireNextImageKHR: non-infinite timeouts not yet implemented
I/chatty (17186): uid=10235(com.example.google_maps_impeller_issue) 1.raster identical 5 lines
2
W/vulkan (17186): vkAcquireNextImageKHR: non-infinite timeouts not yet implemented
I/chatty (17186): uid=10235(com.example.google_maps_impeller_issue) 1.raster identical 17 lines
8
W/vulkan (17186): vkAcquireNextImageKHR: non-infinite timeouts not yet implemented
W/_impeller_issu(17186): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/_impeller_issu(17186): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/_impeller_issu(17186): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
I/chatty (17186): uid=10235(com.example.google_maps_impeller_issue) GoogleApiHandle identical 25 lines
W/_impeller_issu(17186): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
26
W/vulkan (17186): vkAcquireNextImageKHR: non-infinite timeouts not yet implementedFlutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.2.1 23C71 darwin-arm64, locale en-US)
• Flutter version 3.22.3 on channel stable at /Users/djordje/Development Tools/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b0850beeb2 (4 weeks ago), 2024-07-16 21:43:41 -0700
• Engine revision 235db911ba
• Dart version 3.4.4
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/djordje/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/djordje/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C65
• CocoaPods version 1.14.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.92.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.94.0
[✓] Connected device (5 available)
• COL AL10 (mobile) • 9YE0218711000121 • android-arm64 • Android 10 (API 29)
• Android SDK built for arm64 (mobile) • emulator-5554 • android-arm64 • Android 9 (API 28) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.2.1 23C71 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.2.1 23C71 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.100
[✓] Network resources
• All expected network resources are available.Doctor output updated
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.2.1 23C71 darwin-arm64, locale en-US)
• Flutter version 3.24.0 on channel stable at /Users/djordje/Development Tools/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 80c2e84975 (13 days ago), 2024-07-30 23:06:49 +0700
• Engine revision b8800d88be
• Dart version 3.5.0
• DevTools version 2.37.2
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/djordje/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/djordje/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C65
• CocoaPods version 1.14.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.92.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.94.0
[✓] Connected device (4 available)
• SM A127F (mobile) • R58RA18NREM • android-arm64 • Android 12 (API 31)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.2.1 23C71 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.2.1 23C71 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.100
[✓] Network resources
• All expected network resources are available.
• No issues found!Reacted by Etienne Théodore and AristideVB
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering levele: device-specificOnly manifests on certain devicesOnly manifests on certain devicese: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestse: impeller-naughty-driverDevices & drivers that may be behaving unexpectedly and may need workarounds.Devices & drivers that may be behaving unexpectedly and may need workarounds.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team


Activity
huycozy commentedon Aug 12, 2024
Hi @DjordjeMancic97,
I just checked this issue on my end using two devices: Pixel 7, Android 14 and Galaxy Tab A7 Lite (Android 14) but the map is rendered normally. I'm on the latest Flutter stable release 3.24.0. Can you please try upgrading Flutter SDK and retry on your devices?
Also, this issue only happens when you enabled Impeller, right?
DjordjeMancic97 commentedon Aug 12, 2024
Hello @huycozy
I updated to latest Flutter however issue is still there.
What I noticed is the message in logs
W/vulkan (17186): vkAcquireNextImageKHR: non-infinite timeouts not yet implementedThis only appears on the non-working devices.
Also what Samsung Galaxy Note 10 Lite and Honor 10 have in common is ARM Mali-G72 GPU.
Here is a website listing devices with this GPU.
And yes this issue only happens with Impeller enabled. So I guess this might not even be a google_maps_flutter problem but something on Impeller side. However I did not yet test if this happens with other native views, will do soon.
DjordjeMancic97 commentedon Aug 12, 2024
Okay, performed more tests.
Native views are definitely dead on these devices with Impeller enabled.
I created simple native view displaying text - with Impeller off it is shown normally.
With Impeller on it is broken.
Tried both Hybrid Composition and Texture Layer Hybrid Composition.
Impeller Off:

Impeller On:

I edited the issue a bit since its definitely not on google_maps_flutter side. Let me know if I can do anything else to help with resolving this.
[-][Impeller] [google_maps_flutter] Map not rendering on some devices[/-][+][Impeller] [Android] Map not rendering on some devices[/+][-][Impeller] [Android] Map not rendering on some devices[/-][+][Impeller] [Android] Native views not rendering on some devices[/+]huycozy commentedon Aug 13, 2024
I re-checked this using my complete sample code here: enable-impeller-android but still couldn't see the issue. Since this only occurs on your devices above, does that mean this doesn't occur on your other devices, right? I just want to confirm if there is a specific implementation code or not. Can you also try running my sample code and confirm again? Thanks!
DjordjeMancic97 commentedon Aug 13, 2024
Yes it appears only on these two devices.
I also have:
Samsung Galaxy S23 Ultra
Xiaomi 14 Ultra
Samsung Galaxy A12
Motorola Moto X 2nd Gen
None of them have this issue.
So again, this issue might not be present on just the two devices I listed - it can also be present on all other devices using the same GPU - as at the moment the GPU is the only connection I see. For example Moto X is way older and weaker device than the ones problem appears on - yet it is working fine.
I tried your sample code, same thing - if impeller is enabled, native views are broken.
Impeller OFF:
SVID_20240813_110034_1.mp4
Impeller ON:
SVID_20240813_105815_1.mp4
huycozy commentedon Aug 13, 2024
Thank you for re-testing! Marking this as a device-specific issue.
26 remaining items
jonahwilliams commentedon Feb 4, 2025
Currently waiting on order of Samsung Galaxy Note 10 Lite to reproduce.
ogak-github commentedon Feb 14, 2025
This issue occurs in specific device (Honor 10 with Harmony OS 3.0), using latest flutter version
In my case when using google_maps package (latest version):
Flutter Doctor
[✓] Flutter (Channel stable, 3.29.0, on Linux Mint 21.3 5.15.0-131-generic, locale en_US.UTF-8) [81ms] • Flutter version 3.29.0 on channel stable at /home/ogak/Documents/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 35c388afb5 (3 days ago), 2025-02-10 12:48:41 -0800 • Engine revision f73bfc4522 • Dart version 3.7.0 • DevTools version 2.42.2 [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,253ms] • Android SDK at /home/ogak/Android/Sdk/ • Platform android-35, build-tools 35.0.0 • ANDROID_HOME = /home/ogak/Android/Sdk/ • Java binary at: /home/ogak/Documents/android-studio/jbr/bin/java This is the JDK bundled with the latest Android Studio installation on this machine. To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`. • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314) • All Android licenses accepted. [✓] Chrome - develop for the web [14ms] • Chrome at google-chrome [✓] Linux toolchain - develop for Linux desktop [133ms] • Ubuntu clang version 14.0.0-1ubuntu1.1 • cmake version 3.22.1 • ninja version 1.10.1 • pkg-config version 0.29.2 [✓] Android Studio (version 2024.1) [12ms] • Android Studio at /home/ogak/Documents/android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314) [✓] VS Code (version 1.97.2) [11ms] • VS Code at /usr/share/code • Flutter extension version 3.104.0 [✓] Connected device (3 available) [157ms] • COL AL10 (mobile) • VBJ0218703002838 • android-arm64 • Android 10 (API 29) • Linux (desktop) • linux • linux-x64 • Linux Mint 21.3 5.15.0-131-generic • Chrome (web) • chrome • web-javascript • Google Chrome 133.0.6943.98 [✓] Network resources [543ms] • All expected network resources are available.Sample Code:
Adding this in
AndroidManifestdoes not helpSVID_20250214_101812_1.mp4
GabrielSamojlo commentedon Feb 14, 2025
Hey!
I have exact same issue on Samsung S9 with Android 10. Turning off the Impeller makes the map appear but, it seems like, it affects the performance of it.
AristideVB commentedon Feb 14, 2025
On Android 13 exclusively we've also had feedback from users on different devices not seing the map from GoogleMap.
Turning off the Impeller makes the map appear for those users
Flutter (Channel stable, 3.27.2)jonahwilliams commentedon Feb 14, 2025
For most of the issues reported here, I believe this is fixed by disabling Vulkan on certain exynos SoCs. that will cover the Samsung Galaxy Note 10 Lite . #163265
For the HarmonyOS specific issues, we don't support this platform and using the Android embedder on it may or may not work.
Some folks have responded to this issue but not provided details on the phones that are experiencing this problem, so I cannot say if my patch will fix their isseus.
KevinBrendel commentedon Feb 14, 2025
We have not seen this issue on any of our own devices, but users have reported issues related to platform views (web views) not displaying properly that are probably caused by Impeller on the following confirmed devices (unfortunately we cannot be sure, as we do not have access to test on any of these devices):
The Gigaset seems to be powered by a MediaTek SoC.
jonahwilliams commentedon Feb 15, 2025
2/3/4 are all likely to be exynos devices. I'm not sure about, Gigaset GX290, but https://www.gsmarena.com/the_gigaset_gx290_is_a_rugged_pure_android_phone_with_ip68_rating_6200mah_battery-news-38679.php says its Android 9.0 which does not support Vulkan, unless its been upgrdaed past that?
KevinBrendel commentedon Feb 15, 2025
According to the Play Store, the Gigaset is running Android 10 (SDK 29), so it has indeed been upgraded.
AristideVB commentedon Feb 15, 2025
Flutter (Channel stable, 3.27.2)Devices with Android 13 where issues was reported :
jonahwilliams commentedon Feb 27, 2025
We've also disabled Vulkan on most mediatek SoCs. I believe that will cover every device that has reported a problem in this thread. Only the exynos changes are queued up for a cherry pick. I'll see about cherrypicking the mediatek changes
jonahwilliams commentedon Mar 13, 2025
mediatek and exynos changes will be cherry picked in 3.29.2
jonahwilliams commentedon Mar 14, 2025
Fixed in 3.29.2
github-actions commentedon Mar 28, 2025
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 -vand a minimal reproduction of the issue.