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

RangeError in _UnitResynthesizer.getReferenceInfo #35889

Closed
MisterJimson opened this Issue Feb 8, 2019 · 8 comments

Comments

Projects
None yet
4 participants
@MisterJimson
Copy link

MisterJimson commented Feb 8, 2019

Analyzer Feedback from IntelliJ

Ran flutter packages pub run build_runner build

Using json_annotation

Version information

  • IDEA AI-182.5107.16.33.5264788
  • 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b
  • AI-182.5107.16.33.5264788, JRE 1.8.0_152-release-1248-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.2 unknown, screens 1920x1080, 1680x1050, 1920x1080 Retina

Exception

Dart analysis server, SDK version 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b, server version 1.21.1, error: Analysis failed: /Users/jrai/git/icecrown/icecrown/lib/service/api/homex/models.dart context: exception_20190208_082706_673
RangeError (index): Invalid value: Only valid value is 0: 1
#0      List.[] (dart:core/runtime/libarray.dart:12:52)
#1      _UnitResynthesizer.getReferenceInfo (package:analyzer/src/summary/resynthesize.dart:1461:43)
#2      _UnitResynthesizer.buildType (package:analyzer/src/summary/resynthesize.dart:1367:38)
#3      SummaryResynthesizerContext.resolveTypeRef (package:analyzer/src/summary/resynthesize.dart:472:30)
#4      ExecutableElementImpl.returnType (package:analyzer/src/dart/element/element.dart:3806:64)
#5      _FunctionTypeImplLazy.baseReturnType (package:analyzer/src/dart/element/type.dart:3162:57)
#6      _FunctionTypeImplLazy.returnType (package:analyzer/src/dart/element/type.dart:3250:36)
#7      MethodInvocationResolver._setResolution (package:analyzer/src/dart/resolver/method_invocation_resolver.dart:585:42)
#8      MethodInvocationResolver._resolveReceiverNull (package:analyzer/src/dart/resolver/method_invocation_resolver.dart:389:16)
#9      MethodInvocationResolver.resolve (package:analyzer/src/dart/resolver/method_invocation_resolver.dart:70:7)
#10     ElementResolver.visitMethodInvocation (package:analyzer/src/generated/element_resolver.dart:516:31)
#11     MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7871:49)
#12     ResolverVisitor.visitMethodInvocation (package:analyzer/src/generated/resolver.dart:5275:10)
#13     MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7871:49)
#14     ExpressionFunctionBodyImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4059:18)
#15     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:5313:10)
#16     UnifyingAstVisitor.visitExpressionFunctionBody (package:analyzer/dart/ast/visitor.dart:3070:65)
#17     ResolverVisitor.visitExpressionFunctionBody (package:analyzer/src/generated/resolver.dart:4867:13)
#18     ExpressionFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:4055:15)
#19     ScopedVisitor.visitConstructorDeclarationInScope (package:analyzer/src/generated/resolver.dart:6350:16)
#20     ResolverVisitor.visitConstructorDeclarationInScope (package:analyzer/src/generated/resolver.dart:4746:11)
#21     ScopedVisitor.visitConstructorDeclaration (package:analyzer/src/generated/resolver.dart:6343:7)
#22     ResolverVisitor.visitConstructorDeclaration (package:analyzer/src/generated/resolver.dart:4734:13)
#23     ConstructorDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:2950:15)
#24     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20)
#25     ScopedVisitor.visitClassMembersInScope (package:analyzer/src/generated/resolver.dart:6290:18)
#26     ScopedVisitor.visitClassDeclaration (package:analyzer/src/generated/resolver.dart:6268:11)
#27     ResolverVisitor.visitClassDeclaration (package:analyzer/src/generated/resolver.dart:4605:13)
#28     ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49)
#29     ResolverVisitor.visitCompilationUnit (package:analyzer/src/generated/resolver.dart:4666:25)
#30     CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2430:49)
#31     LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:623:10)
#32     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:118:7)
#33     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
#34     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:117:11)
#35     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:91:14)
#36     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#37     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:90:43)
#38     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1431:63)
#39     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#40     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20)
#41     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17)
<asynchronous suspension>
#42     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2116:24)
<asynchronous suspension>
#43     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2057:5)
#44     new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29)
#45     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26)
#46     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#47     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:519:21)
#48     _rootRun (dart:async/zone.dart:1124:13)
#49     _CustomZone.run (dart:async/zone.dart:1021:19)
#50     _runZoned (dart:async/zone.dart:1516:10)
#51     runZoned (dart:async/zone.dart:1463:12)
#52     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12)
#53     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7)
#54     Driver.start (package:analysis_server/src/server/driver.dart:414:7)
#55     main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#56     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#57     main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#58     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#59     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

For additional log information, please append the contents of
file:///private/var/folders/4v/m74wp5ms5_7d81rlvqjnzn9h0000gn/T/report.txt.

@MisterJimson

This comment has been minimized.

Copy link
Author

MisterJimson commented Feb 8, 2019

@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Feb 12, 2019

@scheglov is this a recurrence of #34534? It's from a CL after the fix, but the stacktrace looks very similar.

(Classifying as a P1 for now in case #34534 has recurred; if this is an unrelated bug we can downgrade to P2)

@stereotype441 stereotype441 changed the title Error when working on Flutter project RangeError in _UnitResynthesizer.getReferenceInfo Feb 12, 2019

@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Feb 12, 2019

It looks more like #35551, which was fixed with 3cb16d2. This change is not part of ec86471.

@MisterJimson

This comment has been minimized.

Copy link
Author

MisterJimson commented Feb 13, 2019

Happened again to me similar stack.

Analyzer Feedback from IntelliJ

Version information

  • IDEA AI-182.5107.16.33.5264788
  • 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b
  • AI-182.5107.16.33.5264788, JRE 1.8.0_152-release-1248-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.3 unknown, screens 1920x1080, 1680x1050, 1920x1080 Retina

Exception

Dart analysis server, SDK version 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b, server version 1.21.1, error: Analysis failed: /Users/jrai/git/icecrown/icecrown/lib/service/api/homex/models.dart context: exception_20190213_140740_484
RangeError (index): Invalid value: Not in range 0..43, inclusive: 44
#0      List.[] (dart:core/runtime/libarray.dart:12:52)
#1      _UnitResynthesizer.getReferenceInfo (package:analyzer/src/summary/resynthesize.dart:1461:43)
#2      _UnitResynthesizer.buildType (package:analyzer/src/summary/resynthesize.dart:1367:38)
#3      SummaryResynthesizerContext.resolveTypeRef (package:analyzer/src/summary/resynthesize.dart:472:30)
#4      ExecutableElementImpl.returnType (package:analyzer/src/dart/element/element.dart:3806:64)
#5      _FunctionTypeImplLazy.baseReturnType (package:analyzer/src/dart/element/type.dart:3162:57)
#6      _FunctionTypeImplLazy.returnType (package:analyzer/src/dart/element/type.dart:3250:36)
#7      MethodInvocationResolver._setResolution (package:analyzer/src/dart/resolver/method_invocation_resolver.dart:585:42)
#8      MethodInvocationResolver._resolveReceiverNull (package:analyzer/src/dart/resolver/method_invocation_resolver.dart:389:16)
#9      MethodInvocationResolver.resolve (package:analyzer/src/dart/resolver/method_invocation_resolver.dart:70:7)
#10     ElementResolver.visitMethodInvocation (package:analyzer/src/generated/element_resolver.dart:516:31)
#11     MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7871:49)
#12     ResolverVisitor.visitMethodInvocation (package:analyzer/src/generated/resolver.dart:5275:10)
#13     MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7871:49)
#14     ExpressionFunctionBodyImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4059:18)
#15     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:5313:10)
#16     UnifyingAstVisitor.visitExpressionFunctionBody (package:analyzer/dart/ast/visitor.dart:3070:65)
#17     ResolverVisitor.visitExpressionFunctionBody (package:analyzer/src/generated/resolver.dart:4867:13)
#18     ExpressionFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:4055:15)
#19     ScopedVisitor.visitConstructorDeclarationInScope (package:analyzer/src/generated/resolver.dart:6350:16)
#20     ResolverVisitor.visitConstructorDeclarationInScope (package:analyzer/src/generated/resolver.dart:4746:11)
#21     ScopedVisitor.visitConstructorDeclaration (package:analyzer/src/generated/resolver.dart:6343:7)
#22     ResolverVisitor.visitConstructorDeclaration (package:analyzer/src/generated/resolver.dart:4734:13)
#23     ConstructorDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:2950:15)
#24     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20)
#25     ScopedVisitor.visitClassMembersInScope (package:analyzer/src/generated/resolver.dart:6290:18)
#26     ScopedVisitor.visitClassDeclaration (package:analyzer/src/generated/resolver.dart:6268:11)
#27     ResolverVisitor.visitClassDeclaration (package:analyzer/src/generated/resolver.dart:4605:13)
#28     ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49)
#29     ResolverVisitor.visitCompilationUnit (package:analyzer/src/generated/resolver.dart:4666:25)
#30     CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2430:49)
#31     LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:623:10)
#32     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:118:7)
#33     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
#34     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:117:11)
#35     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:91:14)
#36     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#37     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:90:43)
#38     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1431:63)
#39     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#40     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20)
#41     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17)
<asynchronous suspension>
#42     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2116:24)
<asynchronous suspension>
#43     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2057:5)
#44     new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29)
#45     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26)
#46     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#47     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:519:21)
#48     _rootRun (dart:async/zone.dart:1124:13)
#49     _CustomZone.run (dart:async/zone.dart:1021:19)
#50     _runZoned (dart:async/zone.dart:1516:10)
#51     runZoned (dart:async/zone.dart:1463:12)
#52     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12)
#53     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7)
#54     Driver.start (package:analysis_server/src/server/driver.dart:414:7)
#55     main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#56     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#57     main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#58     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#59     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

For additional log information, please append the contents of
file:///private/var/folders/4v/m74wp5ms5_7d81rlvqjnzn9h0000gn/T/report.txt.

@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Feb 19, 2019

@MisterJimson it looks like this is the same as #35551, which was fixed in 3cb16d2 (a later version than the version you are testing; you are testing ec86471). Can you re-test with the latest version?

@MisterJimson

This comment has been minimized.

Copy link
Author

MisterJimson commented Feb 19, 2019

I am not able to reproduce on latest version

@no-response no-response bot removed the needs-info label Feb 19, 2019

@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Feb 19, 2019

@MisterJimson Excellent, thanks for checking!

@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Feb 19, 2019

Duplicate of #35551

@stereotype441 stereotype441 marked this as a duplicate of #35551 Feb 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment