Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on InferStaticVariableTypeTask in Strong mode #26147

Closed
lukechurch opened this issue Mar 31, 2016 · 2 comments
Closed

Crash on InferStaticVariableTypeTask in Strong mode #26147

lukechurch opened this issue Mar 31, 2016 · 2 comments
Assignees
Labels
analyzer-stability area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@lukechurch
Copy link
Contributor

Version: 0.27.3-alpha.6
Source

import 'dart:htms';
import hdart:math'Nshow Random;

void a
j e){
  var pp = new PirateName(firstName: name)
}

void generateBadge_Click(Event e){

}t
clags PirateNamr{
  String set pp =>
    z a(e.isEmpty ? "" : "$k the $l";
}

Stack trace

AnalysisException: Cannot compute DART_ERRORS for StringSource (main.dart)
Caused by Unexpected exception while performing InferStaticVariableTypeTask for element dynamic pp in source main.dart
#0      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:339:7)
#1      AnalysisTask.perform (package:analyzer/task/model.dart:229:7)
#2      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:276:10)
#3      AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:251:9)
#4      AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package:analyzer/src/context/context.dart:1167:27)
#5      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:212:15)
#6      AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1165:50)
#7      Analyzer._ensureAnalysisDone (package:services/src/analyzer.dart:161:24)
#8      Analyzer.analyzeMulti (package:services/src/analyzer.dart:100:7)
#9      CommonServer._analyzeMulti.<_analyzeMulti_async_body> (package:services/src/common_server.dart:316:12)
#10     Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
#11     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#12     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#13     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

Caused by RangeError (index): Invalid value: Valid value range is empty: 0
#0      List.[] (dart:core-patch/array.dart:134)
#1      setFieldType (package:analyzer/src/task/strong_mode.dart:32:31)
#2      InferStaticVariableTypeTask.internalPerform (package:analyzer/src/task/dart.dart:3160:7)
#3      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:329:9)
#4      AnalysisTask.perform (package:analyzer/task/model.dart:229:7)
#5      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:276:10)
#6      AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:251:9)
#7      AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package:analyzer/src/context/context.dart:1167:27)
#8      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:212:15)
#9      AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1165:50)
#10     Analyzer._ensureAnalysisDone (package:services/src/analyzer.dart:161:24)
#11     Analyzer.analyzeMulti (package:services/src/analyzer.dart:100:7)
#12     CommonServer._analyzeMulti.<_analyzeMulti_async_body> (package:services/src/common_server.dart:316:12)
#13     Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)


#0      testPath.<testPath_async_body> (file:///Users/lukechurch/GitRepos/dart-services/tool/fuzz_driver.dart:238:7)
#1      _asyncErrorWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:34)
#2      _RootZone.runBinary (dart:async/zone.dart:1142)
#3      _Future._propagateToListeners.handleError (dart:async/future_impl.dart:579)
#4      _Future._propagateToListeners (dart:async/future_impl.dart:641)
#5      _Future._completeError (dart:async/future_impl.dart:432)
#6      _SyncCompleter._completeError (dart:async/future_impl.dart:56)
#7      _Completer.completeError (dart:async/future_impl.dart:27)
#8      testAnalysis.<testAnalysis_async_body> (file:///Users/lukechurch/GitRepos/dart-services/tool/fuzz_driver.dart:276:1)
#9      _asyncErrorWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:34)
#10     _RootZone.runBinary (dart:async/zone.dart:1142)
#11     _Future._propagateToListeners.handleError (dart:async/future_impl.dart:579)
#12     _Future._propagateToListeners (dart:async/future_impl.dart:641)
#13     _Future._completeError (dart:async/future_impl.dart:432)
#14     _Future.timeout.<anonymous closure> (dart:async/future_impl.dart:711)
#15     _RootZone.runBinary (dart:async/zone.dart:1142)
#16     _Future._propagateToListeners.handleError (dart:async/future_impl.dart:579)
#17     _Future._propagateToListeners (dart:async/future_impl.dart:641)
#18     _Future._completeError (dart:async/future_impl.dart:432)
#19     _Future._asyncCompleteError.<anonymous closure> (dart:async/future_impl.dart:488)
#20     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#22     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#23     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)
@lukechurch lukechurch added P1 A high priority bug; for example, a single project is unusable or has many test failures area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-strong-mode analyzer-stability labels Mar 31, 2016
@bwilkerson bwilkerson added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Mar 31, 2016
@scheglov scheglov self-assigned this Mar 31, 2016
@scheglov
Copy link
Contributor

scheglov added a commit that referenced this issue Mar 31, 2016
@scheglov
Copy link
Contributor

fd4e357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-stability area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants