Repository navigation
Description
Steps to reproduce
-
Create a Flutter Windows application that renders four
Texturewidgets. -
Register a native Windows GPU surface texture for each widget using:
flutter::GpuSurfaceTexturekFlutterDesktopGpuSurfaceTypeDxgiSharedHandle
-
In the plugin, create a D3D11 device and two
DXGI_FORMAT_B8G8R8A8_UNORMtextures per Flutter texture withD3D11_RESOURCE_MISC_SHARED. -
Decode four video streams concurrently. For each decoded frame:
- Render it to the current D3D11 texture.
- Call
ID3D11DeviceContext::Flush(). - Call
TextureRegistrar::MarkTextureFrameAvailable(textureId).
-
Run the application on Windows with Impeller enabled:
flutter run -d windows -
As soon as the first frames are rendered, the process terminates with an access violation:
[ednet/windows] First frame rendering complete: live=1 [ednet/windows] Unhandled native exception: code=0xc0000005, module=...\flutter_windows.dll, offset=0x2c55f7 Lost connection to device. -
Run the identical application with Impeller disabled:
flutter run -d windows --no-enable-impeller
Video playback and disposal of all four textures complete without a crash.
Expected results
Windows applications should be able to render and dispose DXGI shared-handle external textures with Impeller enabled without an access violation.
Actual results
With Impeller enabled, Flutter crashes in flutter_windows.dll immediately after the first D3D11 frames are rendered. The same plugin and streams work correctly with --no-enable-impeller.
Code sample
Minimal reproduction repository:
https://github.com/ski0090/flutter-windows-dxgi-impeller-repro
Run:
flutter run -d windows
Workaround:
flutter run -d windows --no-enable-impeller
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
C:\codes\flutter-windows-dxgi-impeller-repro [master +0 ~2 -0 !]> flutter run -d windows
Launching lib\main.dart on Windows in debug mode...
Building Windows application... 6.8s
√ Built build\windows\x64\runner\Debug\flutter_windows_dxgi_impeller_repro.exe
[IMPORTANT:flutter/shell/platform/embedder/embedder_surface_gl_impeller.cc(126)] Using the Impeller rendering backend (OpenGLESSDF).
[dxgi-repro] Native channel ready.
Syncing files to device Windows... 84ms
Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on Windows is available at: http://127.0.0.1:51626/eSFBCADpbNg=/
The Flutter DevTools debugger and profiler on Windows is available at: http://127.0.0.1:51626/eSFBCADpbNg=/devtools/?uri=ws://127.0.0.1:51626/eSFBCADpbNg=/ws
[dxgi-repro] Opening texture screen
[dxgi-repro] Requesting native texture creation
[dxgi-repro] createTextures requested.
[dxgi-repro] D3D11 device created.
[dxgi-repro] Texture registered: index=0, texture=1947455395008, buffers=3
[dxgi-repro] Texture registered: index=1, texture=1947455395488, buffers=3
[dxgi-repro] Texture registered: index=2, texture=1947455394912, buffers=3
[dxgi-repro] Texture registered: index=3, texture=1947455392416, buffers=3
[dxgi-repro] Returning 4 texture IDs to Dart.
[dxgi-repro] Starting frame producer.
[dxgi-repro] First frame notifications sent.
[dxgi-repro] Texture IDs: [1947455395008, 1947455395488, 1947455394912, 1947455392416]
[dxgi-repro] Unhandled native exception: code=0xc0000005, address=00007FFE10DB55F7, module=C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll, offset=0x2c55f7
[dxgi-repro] #0 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows_dxgi_impeller_repro.exe + 0x3257b
[dxgi-repro] #1 C:\Windows\System32\KERNELBASE.dll + 0x10f613
[dxgi-repro] #2 C:\Windows\SYSTEM32\ntdll.dll + 0x1693a0
[dxgi-repro] #3 C:\Windows\SYSTEM32\ntdll.dll + 0x11f933
[dxgi-repro] #4 C:\Windows\SYSTEM32\ntdll.dll + 0x164abf
[dxgi-repro] #5 C:\Windows\SYSTEM32\ntdll.dll + 0x45e97
[dxgi-repro] #6 C:\Windows\SYSTEM32\ntdll.dll + 0x1643fe
[dxgi-repro] #7 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0x2c55f7
[dxgi-repro] #8 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0xeb8d1
[dxgi-repro] #9 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0xeb30c
[dxgi-repro] #10 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0xeb1bb
[dxgi-repro] #11 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0x547c44
[dxgi-repro] #12 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0x53fb1e
[dxgi-repro] #13 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0x548149
[dxgi-repro] #14 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0x53fb1e
[dxgi-repro] #15 C:\codes\flutter-windows-dxgi-impeller-repro\build\windows\x64\runner\Debug\flutter_windows.dll + 0x548149
Lost connection to device.
C:\codes\flutter-windows-dxgi-impeller-repro [master]> flutter run -d windows --no-enable-impeller
Launching lib\main.dart on Windows in debug mode...
Building Windows application... 6.9s
√ Built build\windows\x64\runner\Debug\flutter_windows_dxgi_impeller_repro.exe
[dxgi-repro] Native channel ready.
Syncing files to device Windows... 72ms
Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on Windows is available at: http://127.0.0.1:61253/1V_F36Emzqc=/
The Flutter DevTools debugger and profiler on Windows is available at: http://127.0.0.1:61253/1V_F36Emzqc=/devtools/?uri=ws://127.0.0.1:61253/1V_F36Emzqc=/ws
[dxgi-repro] Opening texture screen
[dxgi-repro] Requesting native texture creation
[dxgi-repro] createTextures requested.
[dxgi-repro] D3D11 device created.
[dxgi-repro] Texture registered: index=0, texture=1548382232736, buffers=3
[dxgi-repro] Texture registered: index=1, texture=1548382230048, buffers=3
[dxgi-repro] Texture registered: index=2, texture=1548382230720, buffers=3
[dxgi-repro] Texture registered: index=3, texture=1548382236096, buffers=3
[dxgi-repro] Returning 4 texture IDs to Dart.
[dxgi-repro] Starting frame producer.
[dxgi-repro] First frame notifications sent.
[dxgi-repro] Texture IDs: [1548382232736, 1548382230048, 1548382230720, 1548382236096]
[dxgi-repro] First descriptor requested: texture=1548382232736, buffer=0, handle=0000000080003042
[dxgi-repro] First descriptor requested: texture=1548382230048, buffer=0, handle=0000000040001B42
[dxgi-repro] First descriptor requested: texture=1548382230720, buffer=1, handle=0000000040002082
[dxgi-repro] First descriptor requested: texture=1548382236096, buffer=1, handle=0000000040002142
[dxgi-repro] Native shutdown requested.
[dxgi-repro] Native shutdown complete.
Lost connection to device.Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.47.0, on Microsoft Windows [Version 10.0.26200.9168], locale ko-KR) [344ms]
• Flutter version 3.47.0 on channel stable at C:\Users\ski00\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cf2416426 (9 days ago), 2026-08-11 11:53:49 -0700
• Engine revision 5f77625673
• Dart version 3.13.0
• 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
[√] Windows Version (Windows 11 or higher, 25H2, 2009) [2.6s]
[√] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [5.7s]
• Android SDK at C:\Android\android-sdk\
• Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
• Platform android-36.1, build-tools 36.1.0
! Multiple adb binaries found. This can cause conflicts and device detection issues:
- C:\Android\android-sdk\platform-tools\adb.exe
- C:\Users\ski00\scrcpy\adb.exe
• Java binary at: C:\Program Files\Android\Android Studio1\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 21.0.10+-14961533-b1163.108)
• All Android licenses accepted.
[√] Chrome - develop for the web [119ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.25 (January 2026)) [118ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.14.36915.13
• Windows 10 SDK version 10.0.26100.0
[√] Connected device (4 available) [802ms]
• SM S938N (mobile) • R3CY50K4KER • android-arm64 • Android 16 (API 36)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26200.9168]
• Chrome (web) • chrome • web-javascript • Google Chrome 151.0.7922.109
• Edge (web) • edge • web-javascript • Microsoft Edge 151.0.4129.93
[√] Network resources [468ms]
• All expected network resources are available.
• No issues found!
Activity
puneetkukreja98 commentedon Aug 21, 2026
@ski0090 Thanks for reporting it, I was able to reproduce it on windows.
Flutter doctor -v:
gaaclarke commentedon Aug 24, 2026
I fixed a problem with windows external texture in #191017, can you please try to reproduce your problem on
main?ski0090 commentedon Sep 3, 2026
I tested the reproduction project against the current main branch, and the crash no longer occurs with Impeller enabled. Thanks for the fix!
github-actions commentedon Sep 17, 2026
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.