Is there an existing issue for this?
Current Behavior
Description:
The Flutter application crashes during process termination on the Windows platform when the flutter_inappwebview plugin (version 6.1.5) is integrated. The crash occurs consistently when closing the application through any method (taskbar close button, window close button, or system shutdown).
Steps to Reproduce:
- Create a new Flutter example project
- Add flutter_inappwebview: ^6.1.5 dependency in pubspec.yaml
- Build the Windows executable: flutter build windows
- Run the generated executable on Windows
- Close the application using any method (taskbar, window close button, etc.)
- Observe the application crash during process termination
Expected Behavior:
The application should exit cleanly without crashes when closed normally.
Actual Behavior:
The application crashes with an access violation during process shutdown. The crash occurs in the flutter_inappwebview_windows_plugin.dll during the cleanup of WinRT Composition objects.
Crash Details:
Crash Location: winrt::com_ptrABI::Windows::UI::Composition::ICompositor::unconditional_release_ref()
Trigger: DLL process detachment (DLL_PROCESS_DETACH)
Root Cause: Static object destruction order issue - WinRT components (CoreMessaging.dll, dcomp.dll) are unloaded before the plugin's static compositor_ object is destroyed
Expected Behavior
The application should exit cleanly without crashes when closed normally.
Steps with code example to reproduce
Steps with code example to reproduce
Stacktrace/Logs
Stacktrace/Logs
<Replace this line by pasting your stacktrace or logs here>
Flutter version
v3.35.7
Operating System, Device-specific and/or Tool
windows11
Plugin version
v6.1.5
Additional information
No response
Self grab
Is there an existing issue for this?
Current Behavior
Description:
The Flutter application crashes during process termination on the Windows platform when the flutter_inappwebview plugin (version 6.1.5) is integrated. The crash occurs consistently when closing the application through any method (taskbar close button, window close button, or system shutdown).
Steps to Reproduce:
Expected Behavior:
The application should exit cleanly without crashes when closed normally.
Actual Behavior:
The application crashes with an access violation during process shutdown. The crash occurs in the flutter_inappwebview_windows_plugin.dll during the cleanup of WinRT Composition objects.
Crash Details:
Crash Location: winrt::com_ptrABI::Windows::UI::Composition::ICompositor::unconditional_release_ref()
Trigger: DLL process detachment (DLL_PROCESS_DETACH)
Root Cause: Static object destruction order issue - WinRT components (CoreMessaging.dll, dcomp.dll) are unloaded before the plugin's static compositor_ object is destroyed
Expected Behavior
The application should exit cleanly without crashes when closed normally.
Steps with code example to reproduce
Steps with code example to reproduce
// Paste your code hereStacktrace/Logs
Stacktrace/Logs
Flutter version
v3.35.7
Operating System, Device-specific and/or Tool
windows11
Plugin version
v6.1.5
Additional information
No response
Self grab