Skip to content

Using --analyze-size with --split-debug-info crashes the snapshot analysis package #66962

@sidrao2006

Description

@sidrao2006

Command

flutter build apk --target-platform android-arm64 --split-debug-info ./build/debug_info --shrink --obfuscate --flavor dev --analyze-size

Steps to Reproduce

Build apk with --analyze-size

Note: cannot be reproduced without --analyze-size

Logs

Logs

NoSuchMethodError: NoSuchMethodError: The getter 'type' was called on null.
Receiver: null
Tried calling: type

#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      _ProgramInfoBuilder.createInfoNodeFor (package:vm_snapshot_analysis/v8_profile.dart:415:29)
#2      _ProgramInfoBuilder.getInfoNodeFor (package:vm_snapshot_analysis/v8_profile.dart:350:14)
#3      _ProgramInfoBuilder.createInfoNodeFor (package:vm_snapshot_analysis/v8_profile.dart:398:54)
#4      _ProgramInfoBuilder.getInfoNodeFor (package:vm_snapshot_analysis/v8_profile.dart:350:14)
#5      ListIterable.forEach (dart:_internal/iterable.dart:39:13)
#6      _ProgramInfoBuilder.build (package:vm_snapshot_analysis/v8_profile.dart:314:16)
#7      toProgramInfo (package:vm_snapshot_analysis/v8_profile.dart:258:8)
#8      _treemapFromSnapshot (package:vm_snapshot_analysis/treemap.dart:157:16)
#9      treemapFromJson (package:vm_snapshot_analysis/treemap.dart:85:5)
#10     SizeAnalyzer.analyzeZipSizeAndAotSnapshot (package:flutter_tools/src/base/analyze_size.dart:117:59)
#11     _performCodeSizeAnalysis (package:flutter_tools/src/android/gradle.dart:533:57)
#12     buildGradleApp (package:flutter_tools/src/android/gradle.dart:513:11)
#13     _rootRunUnary (dart:async/zone.dart:1198:47)
#14     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#15     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#17     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#18     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#19     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#20     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#21     _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
#22     _rootRunUnary (dart:async/zone.dart:1198:47)
#23     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#24     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[✓] Flutter (Channel beta, 1.22.0-12.2.pre, on Microsoft Windows [Version 10.0.19041.508], locale en-US)
    • Flutter version 1.22.0-12.2.pre at C:\Users\Aneesh\flutter
    • Framework revision 2bafdc8226 (5 days ago), 2020-09-25 12:48:22 -0700
    • Engine revision f763b5b9b9
    • Dart version 2.10.0 (build 2.10.0-110.5.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\Aneesh\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.49.2)
    • VS Code at C:\Users\Aneesh\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.14.1

[✓] Connected device (3 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 85.0.4183.121
    • Edge (web)       • edge       • web-javascript • Microsoft Edge 85.0.564.63

• No issues found!

Flutter Application Metadata

Type: app
Version: 0.0.1+5
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: master
Creation framework version: e44c041

Plugins

cloud_firestore-0.14.0+2
cloud_firestore_web-0.2.0+1
firebase_analytics-6.0.0
firebase_analytics_web-0.1.1
firebase_auth-0.18.0+1
firebase_auth_web-0.3.0+1
firebase_core-0.5.0
firebase_core_web-0.2.0
path_provider-1.6.18
path_provider_linux-0.0.1+2
path_provider_macos-0.0.4+4
path_provider_windows-0.0.4+1
sqflite-1.3.1+1

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toolc: crashStack traces logged to the consolefound in release: 1.22Found to occur in 1.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work ontoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions