Repository navigation
Description
Steps to reproduce
Steps to reproduce
- Open the app, look something up (a WebView with dictionary content is on
screen), then leave it — the task stays in recents, the activity is stopped
but not destroyed. - From another app, share text to this app. The share entry is an invisible
ProcessTextActivitythat starts the existingsingleTopMainActivity
withNEW_TASK | CLEAR_TOP | SINGLE_TOP, then finishes. - The window comes back black, and stays black.
It happens on roughly every second such entry on this device, and never after a
plain home → recents → tap cycle. See the attached black.mp4 (the black
segment starts around 16.5 s) and ok.mp4 for the same steps on the same device
with EnableImpeller=false, where it works.
App: https://github.com/mumu-lhl/Ciyue (open source, Flutter 3.47.5, release build)
Expected results
Expected results
The UI redraws as before, as it does in ok.mp4.
Actual results
Actual results
The window stays black for the rest of the process lifetime. The app is alive:
the UI thread runs, Dart receives the intent (the lookup the share asked for
does happen), back navigation responds.
ActivityTaskManager: START u0 {act=android.intent.action.PROCESS_TEXT ...
flg=0x34000000 cmp=.../MainActivity}
BufferQueueDebug: [SurfaceView[...MainActivity](BLAST)#400066] <- new surface
E flutter: [ERROR:flutter/impeller/toolkit/egl/egl.cc(56)]
EGL Error: Bad Access (12290) in .../impeller/toolkit/egl/context.cc:55
E flutter: [ERROR:flutter/shell/gpu/gpu_surface_gl_impeller.cc(76)]
Could not make the context current to acquire the frame.
ActivityTaskManager: Displayed .../MainActivity: +85ms <- "displayed"
(no BufferQueueProducer queueBuffer for that SurfaceView afterwards)
The system considers the window displayed (Displayed ... +85ms) while the
engine never submits another buffer.
On every resume that recovers, the engine logs a new context
(android_context_gl_impeller.cc(104): Using the Impeller rendering backend (OpenGLES).); in the failing resume that line is absent.
Isolation
Same app, same commit, same device; only the named line changes. Each row is
reproducible by toggling one line and rebuilding.
| Build | What differs | Result |
|---|---|---|
| as shipped | useHybridComposition: true in the InAppWebView settings |
black + EGL_BAD_ACCESS |
| A | that line set to false (surface composition) |
renders |
| B | WebView replaced by a Text (no platform view at all) |
renders |
| C | whole Dart UI replaced by ten lines (Android shell and all plugins kept) | renders |
| D | EnableImpeller=false (Skia) |
renders |
So Impeller, texture-layer hybrid composition and a real WebView are all
required: remove any one of the four and the app is fine.
Minimal reproduction attempt (negative result)
Two attempts, both with a singleTop activity and an invisible
ProcessTextActivity forwarding ACTION_PROCESS_TEXT:
PlatformViewsService.initExpensiveAndroidViewwith a plain native
TextView— no reproduction (16 cycles, no EGL errors).- The real
flutter_inappwebview6.2.0-beta.3 withuseHybridComposition: true,transparentBackground: trueandbaseUrl: http://ciyue.internal/,
the app's own settings — no reproduction either.
Remaining differences: the app's word view is a PageView, so several platform
views exist at the same time; the WebView loads through webViewAssetLoader
plus custom schemes (entry, gdlookup, sound); and the app does a large
startup (dictionaries, isolates) before the first frame. I am happy to bisect
along whichever you think is most likely.
Code sample
Code sample
The sample does not reproduce the failure — it is the closest reduction I
could reach. Full project:
https://github.com/yx-wh/impeller-platform-view-repro
The essential parts:
// lib/main.dart
class _ExpensivePlatformView extends StatelessWidget {
const _ExpensivePlatformView();
@override
Widget build(BuildContext context) {
return PlatformViewLink(
viewType: "repro/view",
surfaceFactory: (context, controller) => PlatformViewSurface(
controller: controller,
gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
),
onCreatePlatformView: (params) {
return PlatformViewsService.initExpensiveAndroidView(
id: params.id,
viewType: params.viewType,
layoutDirection: Directionality.of(context),
creationParamsCodec: const StandardMessageCodec(),
onFocus: () => params.onFocusChanged(true),
)
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
..create();
},
);
}
}// MainActivity.kt — singleTop, receives the forwarded intent
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
val text = intent.getCharSequenceExtra(Intent.EXTRA_PROCESS_TEXT)?.toString()
if (text != null) channel?.invokeMethod("text", text)
}
// ProcessTextActivity.kt — invisible entry point
val intent = Intent(this, MainActivity::class.java).apply {
action = Intent.ACTION_PROCESS_TEXT
putExtra(Intent.EXTRA_PROCESS_TEXT, text)
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
}
startActivity(intent)
finish()Screenshots or Video
Screenshots / Video demonstration
black.mp4— Impeller build: the window is black from ~16.5 s to ~21.2 s
(only the status and navigation bars are drawn), then back navigation returns
to the reader, so the process is alive.ok.mp4— same device, same steps,EnableImpeller=false: the UI renders.black-frame.png/skia-frame.png— single frames from each clip.
black:
black-small.mp4
ok:
ok-small.mp4
Logs
Logs
10-27 21:02:33.565 993 993 I BufferQueueProducer: [SurfaceView[...MainActivity](BLAST)#400048] ...
10-27 21:02:35.239 1623 2118 I ActivityTaskManager: START u0 {act=android.intent.action.PROCESS_TEXT typ=text/plain ...}
10-27 21:02:35.269 1623 1950 I ActivityTaskManager: START u0 {act=android.intent.action.PROCESS_TEXT flg=0x34000000 cmp=.../MainActivity}
10-27 21:02:35.305 993 1811 I BufferQueueDebug: [SurfaceView[...MainActivity](BLAST)#400066] <- new surface
10-27 21:02:35.307 16463 16524 E flutter : [ERROR:flutter/impeller/toolkit/egl/egl.cc(56)] EGL Error: Bad Access (12290) in ../../../flutter/impeller/toolkit/egl/context.cc:55
10-27 21:02:35.319 16463 16524 E flutter : [ERROR:flutter/shell/gpu/gpu_surface_gl_impeller.cc(76)] Could not make the context current to acquire the frame.
10-27 21:02:35.337 1623 1641 I ActivityTaskManager: Displayed .../MainActivity: +85ms <- "displayed"
(no BufferQueueProducer queueBuffer for that SurfaceView afterwards)Full sessions attached:
impeller-black-full-round.txt— the failing run (app + system lines only)skia-same-steps-ok.txt— identical steps with Skia, no failure
Flutter Doctor output
Doctor output
[!] Flutter (Channel stable, 3.47.5, on Debian GNU/Linux forky/sid 7.2.12+deb14-amd64, locale en_US.UTF-8) [216ms]
• Flutter version 3.47.5 on channel stable at /home/yx/flutter
! The flutter binary is not on your path. Consider adding /home/yx/flutter/bin to your path.
! The dart binary is not on your path. Consider adding /home/yx/flutter/bin to your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 6a19cca564 (6 weeks ago), 2026-09-17 14:13:22 -0400
• Engine revision af7e796e16
• Dart version 3.13.4
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [2.7s]
• Android SDK at /home/yx/android-sdk
• Emulator version unknown
• Platform android-37.0, build-tools 37.0.0
• Java binary at: /usr/bin/java
This JDK was found in the system PATH.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.13-ea+8-1-Debian)
• All Android licenses accepted.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome) [42ms]
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop [389ms]
• Debian clang version 21.1.8 (13)
• cmake version 4.3.4
• ninja version 1.13.2
• pkg-config version 2.5.1
• OpenGL core renderer: llvmpipe (LLVM 21.1.8, 256 bits) (X11)
• OpenGL core version: 4.6 (Core Profile) Mesa 26.1.6-1 (X11)
• OpenGL core shading language version: 4.60 (X11)
• OpenGL ES renderer: llvmpipe (LLVM 21.1.8, 256 bits) (X11)
• OpenGL ES version: OpenGL ES 3.2 Mesa 26.1.6-1 (X11)
• OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
• GL_EXT_framebuffer_blit: yes (X11)
• GL_EXT_texture_format_BGRA8888: yes (X11)
[✓] Connected device (1 available) [85ms]
• Linux (desktop) • linux • linux-x64 • Debian GNU/Linux forky/sid 7.2.12+deb14-amd64
[!] Network resources [135.2s]
✗ A network error occurred while checking "https://maven.google.com/": Connection failed
! Doctor found issues in 3 categories.
Activity
mbcorona commentedon Oct 27, 2026
Hi @yx-wh, thanks for the detailed isolation and logs. Disabling Impeller or hybrid composition both work around it.
Routing to team-engine.
j-ixcayau commentedon Oct 27, 2026
Hi! I'm having the same issue
yx-wh commentedon Oct 28, 2026
Alldocube iPlay50 mini Pro also known as 酷比魔方 掌玩mini (MediaTek MT6789 / Helio G99,
ARM Mali-G57 MC2, OpenGL ES 3.2 v1.r32p1), Android 13. Same black screen
and the same
EGL_BAD_ACCESS/ "Could not make the context current" pair afterreturning to the foreground through the share/ProcessText path, roughly every
second entry.
EnableImpeller=falseresolves it on this device.j-ixcayau commentedon Oct 28, 2026
We're hitting the same issue in a production app (internal testing track on Play Store).
Environment
Using the Impeller rendering backend (OpenGLES).(device supports Vulkan 1.1, but MediaTek < API 31 falls back to GLES)flutter_inappwebview6.1.5 (flutter_inappwebview_android1.1.3), defaultuseHybridComposition: true→initExpensiveAndroidView; plus one native ad view viainitExpensiveAndroidViewFlutterFragmentActivity,launchMode="singleTask"Scenarios
1. Deep link while the app is alive
InAppWebView.onNewIntent) → still works while the WebView screen is still showing.2. Plain background → foreground
Intermittent. It fails after a screen with WebViews has been on screen. Once broken, reopening from the launcher stays black too.
Observations
ImageReaderlayer being released and theSurfaceViewreconnecting, then pause/stop, then on resume the very first frame fails on the raster thread:Using the Impeller rendering backend (OpenGLES).line.yx-wh commentedon Oct 30, 2026
Mainline Ciyue 词悦 is using the workaroud now.
mumu-lhl/Ciyue@7a1ef84
fix(android): 禁用 Impeller,规避解锁后 EGL_BAD_ACCESS 永久黑屏
AmrTawfek commentedon Nov 2, 2026
Is a fix for this being considered for a 3.47 hotfix? For apps that show WebViews with hybrid composition (flutter_inappwebview's default on Android), the two workarounds above are both app-wide trade-offs:
EnableImpeller=falseturns Impeller off for every user, and disabling hybrid composition changes how every WebView renders. A fix in 3.47.x would let those apps upgrade without either.gaaclarke commentedon Nov 2, 2026
@yx-wh what happens on other devices? Is this seem specific to Mali-g57?
yx-wh commentedon Nov 3, 2026
Impeller OpenGLES:
EGL_BAD_ACCESSand black window after a secondACTION_PROCESS_TEXTlookup on Mali (not reproducible on Adreno)Environment (app)
OpenGLES.flutter build apk --profile --flavor full-devwithio.flutter.embedding.android.EnableImpeller = trueand
io.flutter.embedding.android.ImpellerBackend = opengles(
--impeller-backendis honoured only in debug/profile; release ignores it.)Reproduces
iPlay50_mini_Pro), Android 13 (SDK 33)iPlay50_mini_Pro_V2.0_20260301Alldocube/iPlay50_mini_Pro/iPlay50_mini_Pro:13/TP1A.220624.014/1699256002:user/release-keysOpenGL ES 3.2 v1.r32p1-01eac0...,ro.hardware.egl = meowDoes NOT reproduce this particular flow (same APK, same OpenGLES backend)
ImpellerBackend=opengles-> 0
EGL_BAD_ACCESS, 0 context-current failures for the task-background / second-intent sequence.Steps
Animecover) and share/process it to Ciyue(
ACTION_PROCESS_TEXT->ProcessTextActivity->MainActivity).Anime(a WebView platform view is created).
The firm precondition is steps 1-3: the first lookup must be a word that is not found and yields a "split into words" chip, and tapping it must create the WebView before going back. Simply backgrounding and returning (Home / recents) does not reproduce; a second invocation is also required, but its word does not appear to matter.
The same flow reproduces with a Chinese dictionary and CJK word splitting — e.g. selecting a run such as
中华人民共和(which is not a single headword) and tapping中华in the "split into words" suggestions.So it is not specific to English compounds: any not-found query that yields a split suggestion chip triggers it.
Logs at step 5 (iPlay, exact excerpt)
Every subsequent frame logs "Could not make the context current" until the process is killed.
Conclusion
This is not a single-GPU-vendor problem. The same failure — Impeller OpenGLES + a hybrid-composition
platform view + the surface being destroyed/recreated ->
EGL_BAD_ACCESS, permanently black window — hasalso been reported on an Adreno device: chengxicx/LuteForMobile@56e4145 (BOOX Leaf5C, Snapdragon 690 /
Adreno 619L, Android 13) hits it after lock/unlock. On this iPlay (Mali-G57, GLES
r32p1,ro.hardware.egl=meow) it is triggered by the task-background / second-intent cycle, while a Xiaomi 9(Adreno 640) running the same APK and the same OpenGLES backend does not reproduce that particular flow.
The failure therefore depends on the driver and on which surface-loss path is taken, not on Mali alone.
Filtered logcat from both devices (reproducer + non-reproducing Adreno control): https://gist.github.com/yx-wh/37359a798cb6174735ff1e21269b2db7
yx-wh commentedon Nov 3, 2026
Independent corroboration (translation of chengxicx/LuteForMobile@56e4145)
The linked commit message is in Chinese, so here is a translation for reference:
chengxicx/LuteForMobile@56e4145
This is a second, independent dictionary app hitting the same failure — different app, different device
(BOOX Leaf5C, Snapdragon 690 / Adreno 619L, Android 13), same
EGL_BAD_ACCESS/ permanently black screen,and the same workaround (disable Impeller). Note that this is an Adreno device, so the failure is not
Mali-specific.
yx-wh commentedon Nov 3, 2026
Reproducer build / configuration requirements
A stock build of the repo is not enough. To reach the trigger, all of the following are required:
Source: a Ciyue build that includes the "split into words" suggestions on the not-found page
(added in
mumu-lhl/Ciyue@887f58df, merged viamumu-lhl/Ciyue#770). Builds before that show a plainnot-found page with no chips, so there is no way to open an entry from it and the trigger cannot be reached.
Renderer: Impeller enabled with the OpenGLES backend. Release builds ignore the backend override
(
--impeller-backendis compiled out underFLUTTER_RELEASE), so this must be a profile (or debug) buildwith:
<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="true"/><meta-data android:name="io.flutter.embedding.android.ImpellerBackend" android:value="opengles"/>e.g.
flutter build apk --profile --flavor full-dev.UI mode: Ciyue's floating-window option must be off (this is a setting inside Ciyue, not an Android
system setting) — the share/process-text invocation has to go to the main activity, not the floating window.
Layout: must be the phone / small-tablet (narrow) UI. On a true large-screen tablet layout the navigation
takes a different path (split view /
pushReplacement) and does not reproduce.With this build, the iPlay 50 Mini Pro reproduces on the second
ACTION_PROCESS_TEXTinvocation.gaaclarke commentedon Nov 3, 2026
fyi @gmackall this is a bug at the intersection of platform views and impeller
«Опоздал» ставится в два клика: первый — без времени, повторный — вре…