-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/packages
#6881Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolep: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem team
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 resourcesMetadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolep: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem team
