-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] msvcp140.dll crashes and closes the app on windows 11 when playing sound #272
Comments
This issue has eaten the last four days of my life, so bare with me if this explanation takes a bit.
Lines 263 to 270 in 2faab7e
As far as fixes are concerned, I'm not sure the best approach here. The current approach of bundling an static version of the VC++ redist with this module is fundamentally broken, but I acknowledge that we need some kind of fix to make it easier to bundle the required libraries with the installer. I'm still working through a proper fix for my app, and will report back once I have one. |
OK - I have a workaround that Works For Me:
I'll work on getting a proper PR up and getting my package onto pub.dev - for now, you'll need to use the packages from git. Update your pubspec like: dependencies:
msvcredist:
git:
url: https://github.com/insertjokehere/flutter_msvcredist.git
ref: main
dev_dependencies:
msix:
git:
url: https://github.com/insertjokehere/msix.git
ref: msvc_redist |
Thank you for discovering the problem. I noticed that my local build worked fine but production build in GitHub Actions had the crash, and I analyzed the difference between the MSIX files and saw that they had a different DLL for a WebRTC plugin I use (which in an older version, immediately initiated an audio connection (still don't know why it gets a different DLL for it, but that's another issue)). This made the app crash on startup, only in the production build lol. I also noticed that it had the old msvcp140.dll, vcruntime140.dll, and vcruntime140_1.dll. I noticed that replacing them with the new versions fixed it (or leaving them and instead changing the DLL of the WebRTC plugin). I was going to fix it by changing the DLL's manually, but I like the closure of knowing that it was audio (mutex) specifically that was causing the issue |
Thank you for posting this workaround! We had a similar issue on Windows 11 where our Flutter Windows app crashing whenever we accessed the webcam through the camera_windows library. We're also using this msix package for bundling our Windows app with flutter as well. |
Error find from Event Viewer |
@riccardo-lomazzi fix it #273 (version 3.16.8) |
When I build my flutter windows app which has "audio_players" and "video_player" on windows 11 using msix, it crashes and closes the app when I play sound or play video.
I checked using "Event Viewer". it says the fault is from msvcp140.dll file.
when I replace that .dll file with file which is located in "visual studio" folder. it works fine.
The text was updated successfully, but these errors were encountered: