dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.3k stars 1.59k forks source link

Crash when compiling package:flutter_localizations/src/cupertino_localizations.dart, at character offset null #38317

Open justHooman opened 5 years ago

justHooman commented 5 years ago

I'm facing this issue when execute flutter run -d chrome

-------------------- %< --------------------
    dartdevc -k arguments:
    --dart-sdk-summary=/Volumes/Data/setup/flutter/bin/cache/flutter_web_sdk/ker
    nel/flutter_ddc_sdk.dill --modules=amd --no-summarize -o
    packages/flutter_localizations/flutter_localizations.ddc.js --source-map
    --summary=packages/intl/date_symbols.ddc.dill=packages/intl/date_symbols
    --summary=packages/intl/number_symbols.ddc.dill=packages/intl/number_symbols
    --summary=packages/intl/number_symbols_data.ddc.dill=packages/intl/number_sy
    mbols_data
    --summary=packages/intl/src/plural_rules.ddc.dill=packages/intl/src/plural_r
    ules --summary=packages/intl/intl.ddc.dill=packages/intl/intl
    --summary=packages/intl/date_symbol_data_custom.ddc.dill=packages/intl/date_
    symbol_data_custom
    --summary=packages/vector_math/hash.ddc.dill=packages/vector_math/hash
    --summary=packages/vector_math/vector_math_64.ddc.dill=packages/vector_math/
    vector_math_64
    --summary=packages/flutter/src/physics/clamped_simulation.ddc.dill=packages/
    flutter/src/physics/clamped_simulation
    --summary=packages/flutter/physics.ddc.dill=packages/flutter/physics
    --summary=packages/meta/meta.ddc.dill=packages/meta/meta
    --summary=packages/typed_data/typed_buffers.ddc.dill=packages/typed_data/typ
    ed_buffers
    --summary=packages/flutter/src/foundation/_bitfield_web.ddc.dill=packages/fl
    utter/src/foundation/_bitfield_web
    --summary=packages/flutter/foundation.ddc.dill=packages/flutter/foundation
    --summary=packages/collection/src/utils.ddc.dill=packages/collection/src/uti
    ls
    --summary=packages/collection/src/algorithms.ddc.dill=packages/collection/sr
    c/algorithms
    --summary=packages/collection/src/iterable_zip.ddc.dill=packages/collection/
    src/iterable_zip
    --summary=packages/collection/src/comparators.ddc.dill=packages/collection/s
    rc/comparators
    --summary=packages/collection/src/priority_queue.ddc.dill=packages/collectio
    n/src/priority_queue
    --summary=packages/collection/src/canonicalized_map.ddc.dill=packages/collec
    tion/src/canonicalized_map
    --summary=packages/collection/collection.ddc.dill=packages/collection/collec
    tion
    --summary=packages/flutter/src/gestures/arena.ddc.dill=packages/flutter/src/
    gestures/arena
    --summary=packages/flutter/gestures.ddc.dill=packages/flutter/gestures
    --summary=packages/flutter/src/painting/_network_image_web.ddc.dill=packages
    /flutter/src/painting/_network_image_web
    --summary=packages/flutter/painting.ddc.dill=packages/flutter/painting
    --summary=packages/flutter/src/semantics/binding.ddc.dill=packages/flutter/s
    rc/semantics/binding
    --summary=packages/flutter/semantics.ddc.dill=packages/flutter/semantics
    --summary=packages/flutter/src/animation/animation.ddc.dill=packages/flutter
    /src/animation/animation
    --summary=packages/flutter/animation.ddc.dill=packages/flutter/animation
    --summary=packages/flutter/src/rendering/animated_size.ddc.dill=packages/flu
    tter/src/rendering/animated_size
    --summary=packages/flutter/rendering.ddc.dill=packages/flutter/rendering
    --summary=packages/flutter/src/widgets/actions.ddc.dill=packages/flutter/src
    /widgets/actions
    --summary=packages/flutter/widgets.ddc.dill=packages/flutter/widgets
    --summary=packages/flutter/src/cupertino/action_sheet.ddc.dill=packages/flut
    ter/src/cupertino/action_sheet
    --summary=packages/flutter/cupertino.ddc.dill=packages/flutter/cupertino
    --summary=packages/flutter/material.ddc.dill=packages/flutter/material
    --packages=file:///var/folders/lx/4m_vpcy57jng9r1r_vd93gj40000gn/T/kernel_bu
    ilder_xw4RdI/.packages
    --module-name=packages/flutter_localizations/flutter_localizations
    --multi-root-scheme=org-dartlang-app --multi-root=. --track-widget-creation
    --inline-source-map
    --libraries-file=file:///Volumes/Data/setup/flutter/bin/cache/flutter_web_sd
    k/libraries.json
    package:flutter_localizations/src/cupertino_localizations.dart
    package:flutter_localizations/src/l10n/generated_date_localizations.dart
    package:flutter_localizations/src/utils/date_localizations.dart
    package:flutter_localizations/flutter_localizations.dart
    package:flutter_localizations/src/l10n/generated_cupertino_localizations.dar
    t package:flutter_localizations/src/material_localizations.dart
    package:flutter_localizations/src/widgets_localizations.dart
    package:flutter_localizations/src/l10n/generated_material_localizations.dart
    dart --version: 2.5.0-dev.4.0.flutter-be66176534 (Thu Sep 5 15:05:53 2019
    +0000) on "macos_x64"

Crash when compiling
package:flutter_localizations/src/cupertino_localizations.dart,
at character offset null:
Bad state: Empty input given.
#0      BinaryBuilder._checkEmptyInput
(package:kernel/binary/ast_from_binary.dart:436:29)
#1      BinaryBuilder.readComponent
(package:kernel/binary/ast_from_binary.dart:446:5)
#2      ProcessedOptions.loadComponent
(package:front_end/src/base/processed_options.dart:398:10)
#3      ProcessedOptions.loadInputSummaries.<anonymous closure>
(package:front_end/src/base/processed_options.dart:360:35)
#4      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:29)
#5      ListIterable.toList (dart:_internal/iterable.dart:219:19)
#6      ProcessedOptions.loadInputSummaries
(package:front_end/src/base/processed_options.dart:360:67)
<asynchronous suspension>
#7      generateKernelInternal.<anonymous closure>
(package:front_end/src/kernel_generator_impl.dart:95:50)
<asynchronous suspension>
#8      withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)
<asynchronous suspension>
#9      generateKernelInternal
(package:front_end/src/kernel_generator_impl.dart:69:10)
<asynchronous suspension>
#10     generateKernel.<anonymous closure>
(package:front_end/src/kernel_generator_impl.dart:49:18)
<asynchronous suspension>
#11     CompilerContext.runWithOptions.<anonymous closure>
(package:front_end/src/fasta/compiler_context.dart:136:20)
<asynchronous suspension>
#12     CompilerContext.runInContext.<anonymous closure>.<anonymous closure>
(package:front_end/src/fasta/compiler_context.dart:124:46)
#13     new Future.sync (dart:async/future.dart:224:31)
#14     CompilerContext.runInContext.<anonymous closure>
(package:front_end/src/fasta/compiler_context.dart:124:19)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _runZoned (dart:async/zone.dart:1516:10)
#18     runZoned (dart:async/zone.dart:1463:12)
#19     CompilerContext.runInContext
(package:front_end/src/fasta/compiler_context.dart:123:12)
#20     CompilerContext.runWithOptions
(package:front_end/src/fasta/compiler_context.dart:134:10)
#21     generateKernel (package:front_end/src/kernel_generator_impl.dart:48:32)
<asynchronous suspension>
#22     compile (package:front_end/src/api_unstable/ddc.dart:302:13)
<asynchronous suspension>
#23     _compile (package:dev_compiler/src/kernel/command.dart:320:20)
<asynchronous suspension>
#24     compile (package:dev_compiler/src/kernel/command.dart:43:18)
<asynchronous suspension>
#25     compile (package:dev_compiler/src/compiler/shared_command.dart:394:12)
#26     _CompilerWorker.performRequest.<anonymous closure>
(file:///b/s/w/ir/k/src/third_party/dart/pkg/dev_compiler/bin/dartdevc.dart:64:1
3)
#27     _rootRun (dart:async/zone.dart:1124:13)
#28     _CustomZone.run (dart:async/zone.dart:1021:19)
#29     _runZoned (dart:async/zone.dart:1516:10)
#30     runZoned (dart:async/zone.dart:1463:12)
#31     _CompilerWorker.performRequest
(file:///b/s/w/ir/k/src/third_party/dart/pkg/dev_compiler/bin/dartdevc.dart:62:2
4)
<asynchronous suspension>
#32     AsyncWorkerLoop.run.<anonymous closure>
(package:bazel_worker/src/worker/async_worker_loop.dart:33:41)
#33     _rootRun (dart:async/zone.dart:1124:13)
#34     _CustomZone.run (dart:async/zone.dart:1021:19)
#35     _runZoned (dart:async/zone.dart:1516:10)
#36     runZoned (dart:async/zone.dart:1463:12)
#37     AsyncWorkerLoop.run
(package:bazel_worker/src/worker/async_worker_loop.dart:33:26)
<asynchronous suspension>
#38     main
(file:///b/s/w/ir/k/src/third_party/dart/pkg/dev_compiler/bin/dartdevc.dart:28:5
7)
<asynchronous suspension>
#39     _startIsolate.<anonymous closure>
(dart:isolate-patch/isolate_patch.dart:301:32)
#40     _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:172:12)

#0      BinaryBuilder._checkEmptyInput
(package:kernel/binary/ast_from_binary.dart:436:29)
#1      BinaryBuilder.readComponent
(package:kernel/binary/ast_from_binary.dart:446:5)
#2      ProcessedOptions.loadComponent
(package:front_end/src/base/processed_options.dart:398:10)
#3      ProcessedOptions.loadInputSummaries.<anonymous closure>
(package:front_end/src/base/processed_options.dart:360:35)
#4      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:29)
#5      ListIterable.toList (dart:_internal/iterable.dart:219:19)
#6      ProcessedOptions.loadInputSummaries
(package:front_end/src/base/processed_options.dart:360:67)
<asynchronous suspension>
#7      generateKernelInternal.<anonymous closure>
(package:front_end/src/kernel_generator_impl.dart:95:50)
<asynchronous suspension>
#8      withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)
<asynchronous suspension>
#9      generateKernelInternal
(package:front_end/src/kernel_generator_impl.dart:69:10)
<asynchronous suspension>
#10     generateKernel.<anonymous closure>
(package:front_end/src/kernel_generator_impl.dart:49:18)
<asynchronous suspension>
#11     CompilerContext.runWithOptions.<anonymous closure>
(package:front_end/src/fasta/compiler_context.dart:136:20)
<asynchronous suspension>
#12     CompilerContext.runInContext.<anonymous closure>.<anonymous closure>
(package:front_end/src/fasta/compiler_context.dart:124:46)
#13     new Future.sync (dart:async/future.dart:224:31)
#14     CompilerContext.runInContext.<anonymous closure>
(package:front_end/src/fasta/compiler_context.dart:124:19)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _runZoned (dart:async/zone.dart:1516:10)
#18     runZoned (dart:async/zone.dart:1463:12)
#19     CompilerContext.runInContext
(package:front_end/src/fasta/compiler_context.dart:123:12)
#20     CompilerContext.runWithOptions
(package:front_end/src/fasta/compiler_context.dart:134:10)
#21     generateKernel (package:front_end/src/kernel_generator_impl.dart:48:32)
<asynchronous suspension>
#22     compile (package:front_end/src/api_unstable/ddc.dart:302:13)
<asynchronous suspension>
#23     _compile (package:dev_compiler/src/kernel/command.dart:320:20)
<asynchronous suspension>
#24     compile (package:dev_compiler/src/kernel/command.dart:43:18)
<asynchronous suspension>
#25     compile (package:dev_compiler/src/compiler/shared_command.dart:394:12)
#26     _CompilerWorker.performRequest.<anonymous closure>
(file:///b/s/w/ir/k/src/third_party/dart/pkg/dev_compiler/bin/dartdevc.dart:64:1
3)
#27     _rootRun (dart:async/zone.dart:1124:13)
#28     _CustomZone.run (dart:async/zone.dart:1021:19)
#29     _runZoned (dart:async/zone.dart:1516:10)
#30     runZoned (dart:async/zone.dart:1463:12)
#31     _CompilerWorker.performRequest
(file:///b/s/w/ir/k/src/third_party/dart/pkg/dev_compiler/bin/dartdevc.dart:62:2
4)
<asynchronous suspension>
#32     AsyncWorkerLoop.run.<anonymous closure>
(package:bazel_worker/src/worker/async_worker_loop.dart:33:41)
#33     _rootRun (dart:async/zone.dart:1124:13)
#34     _CustomZone.run (dart:async/zone.dart:1021:19)
#35     _runZoned (dart:async/zone.dart:1516:10)
#36     runZoned (dart:async/zone.dart:1463:12)
#37     AsyncWorkerLoop.run
(package:bazel_worker/src/worker/async_worker_loop.dart:33:26)
<asynchronous suspension>
#38     main
(file:///b/s/w/ir/k/src/third_party/dart/pkg/dev_compiler/bin/dartdevc.dart:28:5
7)
<asynchronous suspension>
#39     _startIsolate.<anonymous closure>
(dart:isolate-patch/isolate_patch.dart:301:32)
#40     _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:172:12)
justHooman commented 5 years ago

My flutter doctor:

Flutter 1.10.2-pre.36 • channel master • https://github.com/flutter/flutter.git
Framework • revision 32c946f31b (7 hours ago) • 2019-09-10 20:49:27 -0700
Engine • revision 7ea9884ab0
Tools • Dart 2.5.0 (build 2.5.0-dev.4.0 be66176534)

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.2-pre.36, on Mac OS X 10.14.6 18G95, locale en-VN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[!] Xcode - develop for iOS and macOS (Xcode 10.3)
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods
        pod setup
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Community Edition (version 2019.1.3)
[✓] VS Code (version 1.38.0)
[✓] Connected device (2 available)

! Doctor found issues in 4 categories.
Setting "enable-web" value to "true".
nydlmaster commented 4 years ago

Just had a similar issue. In my case there was a type in one of the imports.I had "F" instead of "f" in one if the import files. Just double check all the imports (cases, spaces, underscores, etc) thoroughly .