Repository: flutter
Issue: running "flutter doctor --android-licenses" in bash leads to "segmentation fault" - problem in CI/CD
Labels: c: crash,platform-android,tool,t: flutter doctor,P2,team-tool,triaged-tool

### Steps to reproduce

1. update to version 3.24.3
2. open bash (Git)
3. run "flutter doctor --android-licenses"

### Expected results

1. tool works 
2. exit code == 0

### Actual results

1. tool works, but shows error "Segmentation fault"
2. exit code == 139

### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

error case Flutter version 3.24.3 :

![flutter_doctor_error](https://github.com/user-attachments/assets/04e526fe-9cd1-4669-89de-ba741c127eee)

no error case Flutter version 3.22.3:
![flutter_doctor_no_error](https://github.com/user-attachments/assets/5a37f7b3-0f01-49a2-934c-ec989ec56767)



### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4169], locale de-DE)
    • Flutter version 3.24.3 on channel stable at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (2 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\cblankenberg\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.7)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34902.65
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)

[√] VS Code, 64-bit edition (version 1.93.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.96.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.4169]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 122.0.6261.131
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 129.0.2792.52

[√] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>