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

Invalid value: Not in range 0..10, inclusive: 11 #35551

Closed
long1eu opened this Issue Jan 3, 2019 · 9 comments

Comments

Projects
None yet
4 participants
@long1eu
Copy link

long1eu commented Jan 3, 2019

Analyzer Feedback from IntelliJ

Version information

  • IDEA IU-183.5153.8
  • 2.2.0-edge.88e6fe0f673e3d88f06fb6797103f9a9305961d9
  • IU-183.5153.8, JRE 1.8.0_152-release-1343-b26x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.6, screens 1920x1200, 1920x1200

Exception

Dart analysis server, SDK version 2.2.0-edge.88e6fe0f673e3d88f06fb6797103f9a9305961d9, server version 1.21.1, error: Analysis failed: /Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart
RangeError (index): Invalid value: Not in range 0..10, inclusive: 11
#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      ClassElementImpl.interfaces (package:analyzer/src/dart/element/element.dart:697:28)
#5      _OverrideChecker._findAllGenericInterfaces.visitTypeAndSupertypes (package:analyzer/src/task/strong/checker.dart:1520:17)
#6      _OverrideChecker._findAllGenericInterfaces (package:analyzer/src/task/strong/checker.dart:1524:27)
#7      _OverrideChecker._checkForCovariantGenerics (package:analyzer/src/task/strong/checker.dart:1288:24)
#8      _OverrideChecker.check (package:analyzer/src/task/strong/checker.dart:1231:5)
#9      CodeChecker.visitClassDeclaration (package:analyzer/src/task/strong/checker.dart:248:22)
#10     ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49)
#11     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8351:20)
#12     CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2437:21)
#13     CodeChecker.visitCompilationUnit (package:analyzer/src/task/strong/checker.dart:268:10)
#14     LibraryAnalyzer._computeVerifyErrors (package:analyzer/src/dart/analysis/library_analyzer.dart:321:13)
#15     LibraryAnalyzer.analyzeSync.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:124:9)
#16     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
#17     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:123:13)
#18     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#19     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:122:34)
#20     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:88:14)
#21     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#22     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:87:43)
#23     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1430:63)
#24     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#25     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20)
#26     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17)
<asynchronous suspension>
#27     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2114:24)
<asynchronous suspension>
#28     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2055:5)
#29     new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29)
#30     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26)
#31     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#32     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:519:21)
#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     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12)
#38     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7)
#39     Driver.start (package:analysis_server/src/server/driver.dart:414:7)
#40     main (file:///b/rr/tmpWBWkCz/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#41     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#42     main (file:///b/rr/tmpWBWkCz/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#43     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#44     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

For additional log information, please append the contents of
file:///private/var/folders/ky/g0rzgjmj7l54b8kc89n1mxxm0000gn/T/report1.txt.

Dart analysis server, SDK version 2.2.0-edge.88e6fe0f673e3d88f06fb6797103f9a9305961d9, server version 1.21.1, error: Analysis failed: /Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart
RangeError (index): Invalid value: Not in range 0..10, inclusive: 11
#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 ClassElementImpl.interfaces (package:analyzer/src/dart/element/element.dart:697:28)
#5 _OverrideChecker._findAllGenericInterfaces.visitTypeAndSupertypes (package:analyzer/src/task/strong/checker.dart:1520:17)
#6 _OverrideChecker._findAllGenericInterfaces (package:analyzer/src/task/strong/checker.dart:1524:27)
#7 _OverrideChecker._checkForCovariantGenerics (package:analyzer/src/task/strong/checker.dart:1288:24)
#8 _OverrideChecker.check (package:analyzer/src/task/strong/checker.dart:1231:5)
#9 CodeChecker.visitClassDeclaration (package:analyzer/src/task/strong/checker.dart:248:22)
#10 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49)
#11 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8351:20)
#12 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2437:21)
#13 CodeChecker.visitCompilationUnit (package:analyzer/src/task/strong/checker.dart:268:10)
#14 LibraryAnalyzer._computeVerifyErrors (package:analyzer/src/dart/analysis/library_analyzer.dart:321:13)
#15 LibraryAnalyzer.analyzeSync.. (package:analyzer/src/dart/analysis/library_analyzer.dart:124:9)
#16 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
#17 LibraryAnalyzer.analyzeSync. (package:analyzer/src/dart/analysis/library_analyzer.dart:123:13)
#18 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#19 LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:122:34)
#20 LibraryAnalyzer.analyze. (package:analyzer/src/dart/analysis/library_analyzer.dart:88:14)
#21 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#22 LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:87:43)
#23 AnalysisDriver._computeAnalysisResult. (package:analyzer/src/dart/analysis/driver.dart:1430:63)
#24 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#25 AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20)
#26 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17)

#27 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2114:24)

#28 AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2055:5)
#29 new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29)
#30 SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26)
#31 StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#32 Driver.startAnalysisServer. (package:analysis_server/src/server/driver.dart:519:21)
#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 Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12)
#38 Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7)
#39 Driver.start (package:analysis_server/src/server/driver.dart:414:7)
#40 main (file:///b/rr/tmpWBWkCz/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#41 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#42 main (file:///b/rr/tmpWBWkCz/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#43 _startIsolate. (dart:isolate/runtime/libisolate_patch.dart:287:32)
#44 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

1546533736390 <= {"event":"completion.results","params":{"id":"26","replacementOffset":4094,"replacementLength":0,"results":[],"isLast":true}}
1546533736398 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1546533736443 => {"id":"91","method":"edit.getAssists","params":{"file":"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart","offset":4094,"length":0
1546533736444 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1546533736470 <= {"id":"91","result":{"assists":[]}}
1546533736472 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1546533737167 => {"id":"92","method":"analysis.updateContent","params":{"files":{"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart":{"type":"add","
1546533737167 <= {"id":"92","result":{}}
1546533737168 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1546533737172 => {"id":"93","method":"edit.getAssists","params":{"file":"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart","offset":4096,"length":0
1546533737202 <= {"id":"93","result":{"assists":[]}}
1546533737204 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1546533737628 => {"id":"94","method":"analysis.updateContent","params":{"files":{"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart":{"type":"add","
1546533737629 <= {"id":"94","result":{}}
1546533737629 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1546533737630 => {"id":"95","method":"edit.getAssists","params":{"file":"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart","offset":4098,"length":0
1546533737665 <= {"id":"95","result":{"assists":[]}}
1546533737668 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1546533738033 => {"id":"96","method":"analysis.updateContent","params":{"files":{"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart":{"type":"add","
1546533738034 <= {"id":"96","result":{}}
1546533738034 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1546533738038 => {"id":"97","method":"edit.getAssists","params":{"file":"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart","offset":4166,"length":0
1546533738068 <= {"id":"97","result":{"assists":[]}}
1546533738077 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1546533739641 => {"id":"98","method":"analysis.updateContent","params":{"files":{"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart":{"type":"add","
1546533739641 => {"id":"99","method":"edit.format","params":{"file":"/Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart","selectionOffset":0,"selecti
1546533739642 <= {"id":"98","result":{}}
1546533739729 <= {"id":"99","result":{"edits":[{"offset":0,"length":4829,"replacement":"// File created by\n// Lung Razvan <long1eu>\n// on 2019-01-03\n\npart of 'schools_actions.dart';\n\nclass Updat
1546533739730 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1546533739770 <= {"event":"server.error","params":{"isFatal":false,"message":"Analysis failed: /Users/long1eu/projects/AndroidStudioProjects/dance_app/danceapp_common/lib/actions/update_steps.dart","s
@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Jan 4, 2019

@scheglov this looks like a duplicate of #34534, but #34534 says it was fixed by e648d63, and this bug report is from 88e6fe0, which is a later commit.

Can you investigate and see if this bug has the same root cause as #34534? If so we should mark this as a duplicate of #34534 and re-open #34534.

Marking as P1 since #34534 was P1. If we determine that it's a different root cause we may downgrade it to P2.

@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Jan 14, 2019

Sigh, no I was wrong.
SDK files are absent in the dump because we did not store them.

dart-bot pushed a commit that referenced this issue Jan 14, 2019

Restore including transitive files into exception dumps.
We need this data.
RE #35551

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I55e4a83f07eda618e857ac8a577c254a51a82219
Reviewed-on: https://dart-review.googlesource.com/c/89400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

dart-bot pushed a commit that referenced this issue Jan 14, 2019

Issue 35551. Log more information to debug the issue.
I don't know how to reproduce this issue.
So, I have to add logging to gather more information.

R=brianwilkerson@google.com, paulberry@google.com

Bug: #35551
Change-Id: I6c7de530a76998697577bd088f74bd2e9ac79cc4
Reviewed-on: https://dart-review.googlesource.com/c/89420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Jan 14, 2019

Unfortunately we accidentally reduced usefulness of exception dump files, and now they include only the content of immediately library that caused the problem, but not the transitive closure of all files. And I'm not able to reproduce with dumps from either of you :-(

I've added fixes for including all files, and additional info into the bleeding edge Dart SDK. So, hopefully eventually I will get more information, and maybe ideas how to reproduce this problem.

@long1eu

This comment has been minimized.

Copy link
Author

long1eu commented Jan 14, 2019

can I help?

@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Jan 15, 2019

If you know how to reproduce this issue, it would help a lot.
Does it happen on regular basis on your codebase?

@long1eu

This comment has been minimized.

Copy link
Author

long1eu commented Jan 15, 2019

Yes it does. Especially when I use autoformat. I'll try to make a MCV example.

@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Jan 18, 2019

@scheglov added logging to help diagnose this issue, so we are going to wait for it to recur with a version of the analyzer that includes the logging.

@scheglov scheglov self-assigned this Jan 22, 2019

@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Jan 22, 2019

Thanks to @kevmoo I can reproduce this now on json_serializable.
It happens during code generation, when part files are updated.

@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Jan 22, 2019

@dart-bot dart-bot closed this in 3cb16d2 Jan 22, 2019

dart-bot pushed a commit that referenced this issue Jan 24, 2019

Issue 35551. Invalidate library cycles of libraries when a part file …
…API signature changes.

R=brianwilkerson@google.com, paulberry@google.com

Fixes #35551
Change-Id: If4db0907fc62bdd12f528fe1a61895f6a18ec210
Reviewed-on: https://dart-review.googlesource.com/c/90520
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.