-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to reproduce
I have a reproduction repo here.
Code uses url launcher windows package. I essentially updated the messages/pigeon.dart and regenerated the code.
In a nutshell, if an arg is nullable, and null is passed, it will crash the app. Here is where it crashes in the code. Essentially, when it tries to parse the nullable value.
I have instructions in the README of the reproduction repo, but here they are for completeness:
- Run
flutter build windows --debuginexample/ - Open app on Visual Studio by opening the solution in
example/build/windows/x64/runner/runner.sln - Put two break points on these lines. Note that it gets to the first line but will crash before getting to the second line.
This issue was found when implementing this feature on FlutterFire: https://github.com/firebase/flutterfire/pull/12825/files#diff-ad8aa9e593097c77254420c5c93cccbba4478ba947392296a18cceddc6068d85R4028-R4037
Expected results
Not to crash when passing null as nullable argument.
Actual results
Crashes in Pigeon generated code on this line
Code sample
Screenshots or Video
Logs
Logs
None.
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.22631.3593], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.3)
[!] Android Studio (not installed)
[√] VS Code (version 1.89.1)
[√] Connected device (3 available)
[√] Network resources