-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
This Windows error happens on Flutter beta version 3.7.0-1.1.pre.
When calling method FlutterEngine::Run, I get this error:
Exception thrown at 0x00007FFA8192BEA1 (flutter_windows.dll) in cherish.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
Stack trace:
flutter_windows.dll!00007ffa8192bea1() Unknown
flutter_windows.dll!00007ffa80a724a3() Unknown
> cherish.exe!flutter::FlutterEngine::Run(const char * entry_point) Line 57 C++
cherish.exe!flutter::FlutterEngine::Run() Line 46 C++
cherish.exe!wWinMain(HINSTANCE__ * instance, HINSTANCE__ * prev, wchar_t * command_line, int show_command) Line 39 C++
[External Code]
Line 57 above is a call to FlutterDesktopEngineRun in flutter_windows.h.
In previous versions of Flutter, calling method FlutterEngine::Run runs the engine as expected and it doesn't generate the access violation exception.
Steps to reproduce
Using flutter beta version 3.7.0-1.1.pre:
flutter create cherish
cd cherish
flutter run -d windows
Then edit windows\runner\main.cpp with these contents:
int APIENTRY wWinMain(...) {
...
window.SetQuitOnClose(true);
flutter::FlutterEngine engine(project); // add this line to reproduce
engine.Run(); // add this line to reproduce
::MSG msg;
...
}
Run flutter run -d windows, the process will end and you will get an error like Error connecting to the service protocol: failed to connect to http://127.0.0.1:61313/9siaEbAyD0c=/.
Open Visual Studio solution file build\windows\cherish.sln to get the actual error. Set the cherish project as the startup project. Then hit F5 or Start Debugging. You should get the access violation exception:
Exception thrown at 0x00007FFA8192BEA1 (flutter_windows.dll) in cherish.exe: 0xC0000005: Access violation reading location 0x0000000000000000.