dart-windows / win32

Build Win32 apps with Dart!
https://win32.pub
BSD 3-Clause "New" or "Revised" License
734 stars 118 forks source link

AOT-compiled executable of `example\hello.dart` crashes #749

Closed halildurmus closed 10 months ago

halildurmus commented 10 months ago

Running the AOT-compiled executable of the hello world example crashes:

Screenshot 2023-09-17 125106

Update: I have identified the source of the problem. The issue lies in the initApp function, where an incorrect Pointer is passed to the LocalFree function: https://github.com/dart-windows/win32/blob/ccdaaf2cd52f675a2f20eaf59f0a312156645225/lib/src/utils.dart#L61

To resolve the problem, the code must be changed to LocalFree(szArgList);.