Repository: flutter
Issue: [tool_crash] locatedAotPath may be null if AOT snapshot is not located by SizeAnalyzer
Labels: c: crash,tool,P2,team-tool,triaged-tool

## Command
```
flutter build ios --flavor stage --analyze-size
```

## Steps to Reproduce
1. ...
2. ...
3. ...

## Logs
NoSuchMethodError: NoSuchMethodError: The method 'join' was called on null.
Receiver: null
Tried calling: join("/")
```
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      SizeAnalyzer._printLibChildrenPaths (package:flutter_tools/src/base/analyze_size.dart:227:58)
#2      SizeAnalyzer._printLibChildrenPaths (package:flutter_tools/src/base/analyze_size.dart:220:9)
#3      SizeAnalyzer.analyzeAotSnapshot (package:flutter_tools/src/base/analyze_size.dart:70:9)
#4      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:143:61)
#5      _rootRunUnary (dart:async/zone.dart:1198:47)
#6      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#8      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#9      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#10     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#11     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#12     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#13     buildXcodeProject (package:flutter_tools/src/ios/mac.dart)
#14     _rootRunUnary (dart:async/zone.dart:1198:47)
#15     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#16     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#18     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#19     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#22     _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart)
#23     _rootRunUnary (dart:async/zone.dart:1198:47)
#24     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
```
```
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H114 darwin-x64, locale en-IN)
    • Flutter version 1.22.5 at /Users/cbhagavan/development/flutter
    • Framework revision 7891006299 (4 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/cbhagavan/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    ✗ Android SDK file not found: /Users/cbhagavan/Library/Android/sdk/platforms/android-30/android.jar.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.8.4

[!] Android Studio
    • Android Studio at /Applications/Android Studio 4.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[!] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.0

[✓] Connected device (1 available)
    • iPhone 12 Pro Max (mobile) • 3D9BA846-CEE0-4912-AE46-AABCD05B3ECC • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

! Doctor found issues in 4 categories.

```

## Flutter Application Metadata
**Type**: null
**Version**: 1.0.0+1
**Material**: true
**Android X**: false
**Module**: false
**Plugin**: false
**Android package**: null
**iOS bundle identifier**: null
**Creation channel**: null
**Creation framework version**: null
### Plugins
flutter-okta-sdk-1ac2fe351a551bdb12fef48c223bbc583e63527f
camera-0.5.8+17
flutter_secure_storage-3.3.5
flutter_sound-6.4.8+2
flutter_sound_web-6.4.8+2
flutter_uploader-2.0.0-beta.6
package_info-0.4.3+2
path_provider-1.6.24
path_provider_linux-0.0.1+2
path_provider_macos-0.0.4+6
path_provider_windows-0.0.4+3
permission_handler-5.0.1+1
shared_preferences-0.5.12+4
shared_preferences_linux-0.0.2+4
shared_preferences_macos-0.0.1+11
shared_preferences_web-0.1.2+7
shared_preferences_windows-0.0.1+3
speech_to_text-2.7.0
url_launcher-5.7.10
url_launcher_linux-0.0.1+4
url_launcher_macos-0.0.1+9
url_launcher_web-0.1.5+1
url_launcher_windows-0.0.1+3
video_compress-2.1.1
video_player-1.0.1
video_player_web-0.1.4+1