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 running the analyzer with ML completions enabled. #39079

Closed
jacob314 opened this issue Oct 24, 2019 · 5 comments
Closed

Crash running the analyzer with ML completions enabled. #39079

jacob314 opened this issue Oct 24, 2019 · 5 comments
Assignees
Labels
analyzer-completion Issues with the analysis server's code completion feature area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@jacob314
Copy link
Member

Analyzer Feedback from IntelliJ

Version information

  • IDEA IU-192.6817.14
  • 2.6.0-edge.cccb9ffb2ab3268389a08d20261861115864156c
  • IU-192.6817.14, JRE 11.0.4+10-b304.69x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.6, screens 1680x1050 Retina

Exception

Dart analysis server, SDK version 2.6.0-edge.cccb9ffb2ab3268389a08d20261861115864156c, server version 1.27.3, FATAL error: NoSuchMethodError: The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      LanguageModel._transformInput.<anonymous closure> (package:analysis_server/src/services/completion/dart/language_model.dart:99:67)
#2      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:29)
#3      SubListIterable.toList (dart:_internal/iterable.dart:307:29)
#4      _TypedDoubleListMixin.setRange (dart:typed_data-patch/typed_data_patch.dart:807:40)
#5      _DoubleListMixin.setAll (dart:typed_data-patch/typed_data_patch.dart:735:5)
#6      LanguageModel._transformInput (package:analysis_server/src/services/completion/dart/language_model.dart:99:9)
#7      LanguageModel.predictWithScores (package:analysis_server/src/services/completion/dart/language_model.dart:76:21)
#8      entrypoint.<anonymous closure> (package:analysis_server/src/services/completion/dart/completion_ranking.dart:39:34)
#9      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#10     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#11     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#12     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
#13     _StreamController._add (dart:async/stream_controller.dart:640:7)
#14     _StreamController.add (dart:async/stream_controller.dart:586:5)
#15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

For additional log information, please append the contents of
file:///private/var/folders/pl/5yqcvds916b39jxc_pb66y700025bq/T/report.txt.

@bwilkerson
Copy link
Member

@lambdabaa Could you take a look at this?

@gspencergoog
Copy link
Contributor

I had a similar crash.

Version information

  • IDEA IC-192.6817.14
  • 2.6.0-edge.d43cd7e9096875bf0fb2d1f34b8f9857616a2f9a
  • IC-192.6817.14, JRE 11.0.4+10-b304.69x64 JetBrains s.r.o, OS Linux(amd64) v4.19.37-5+deb10u2rodete2-amd64, screens 3840x2160, 3840x2160

Exception

Dart analysis server, SDK version 2.6.0-edge.d43cd7e9096875bf0fb2d1f34b8f9857616a2f9a, server version 1.27.3, FATAL error: NoSuchMethodError: The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      LanguageModel._transformInput.<anonymous closure> (package:analysis_server/src/services/completion/dart/language_model.dart:99:67)
#2      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:29)
#3      SubListIterable.toList (dart:_internal/iterable.dart:307:29)
#4      _TypedDoubleListMixin.setRange (dart:typed_data-patch/typed_data_patch.dart:807:40)
#5      _DoubleListMixin.setAll (dart:typed_data-patch/typed_data_patch.dart:735:5)
#6      LanguageModel._transformInput (package:analysis_server/src/services/completion/dart/language_model.dart:99:9)
#7      LanguageModel.predictWithScores (package:analysis_server/src/services/completion/dart/language_model.dart:76:21)
#8      entrypoint.<anonymous closure> (package:analysis_server/src/services/completion/dart/completion_ranking.dart:39:34)
#9      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#10     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#11     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#12     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
#13     _StreamController._add (dart:async/stream_controller.dart:640:7)
#14     _StreamController.add (dart:async/stream_controller.dart:586:5)
#15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Crash Report

1571936305482 <= {"id":"163","result":{}}
1571936305505 => {"id":"164","method":"edit.getAssists","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","offset":21049,"length":0},"client
1571936305627 <= {"event":"analysis.errors","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","errors":[]}}
1571936305628 <= {"id":"164","result":{"assists":[]}}
1571936305635 <= {"event":"analysis.highlights","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","regions":[{"type":"DIRECTIVE","offset":16
1571936305640 <= {"event":"analysis.navigation","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","regions":[{"offset":173,"length":33,"targ
1571936305640 <= {"event":"analysis.closingLabels","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","labels":[{"offset":505,"length":300,"l
1571936305640 <= {"event":"analysis.outline","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","kind":"LIBRARY","outline":{"element":{"kind"
1571936305640 <= {"event":"analysis.overrides","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","overrides":[]}}
1571936305645 <= {"event":"flutter.outline","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","outline":{"kind":"DART_ELEMENT","offset":0,"l
1571936305648 <= {"event":"completion.availableSuggestions","params":{"changedLibraries":[{"id":1280,"uri":"file:///usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test
1571936305667 <= {"event":"analysis.implemented","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","classes":[],"members":[]}}
1571936306012 => {"id":"165","method":"edit.getAssists","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","offset":21049,"length":0},"client
1571936306016 <= {"id":"165","result":{"assists":[]}}
1571936306795 => {"id":"166","method":"edit.getAssists","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","offset":21084,"length":14},"clien
1571936306799 <= {"id":"166","result":{"assists":[]}}
1571936307926 => {"id":"167","method":"edit.getAssists","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","offset":21084,"length":20},"clien
1571936307929 <= {"id":"167","result":{"assists":[]}}
1571936308331 => {"id":"168","method":"edit.getAssists","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","offset":21084,"length":18},"clien
1571936308335 <= {"id":"168","result":{"assists":[]}}
1571936308900 => {"id":"169","method":"analysis.updateContent","params":{"files":{"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart":{"type":"add","content":"
1571936308900 => {"id":"170","method":"completion.getSuggestions","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","offset":21086},"clientR
1571936308903 <= {"id":"169","result":{}}
1571936309058 <= {"id":"170","result":{"id":"3"}}
1571936309059 <= {"event":"analysis.errors","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","errors":[{"severity":"ERROR","type":"STATIC_W
1571936309072 <= {"event":"analysis.highlights","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","regions":[{"type":"DIRECTIVE","offset":16
1571936309088 <= {"event":"analysis.navigation","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","regions":[{"offset":173,"length":33,"targ
1571936309090 <= {"event":"analysis.closingLabels","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","labels":[{"offset":505,"length":300,"l
1571936309093 <= {"event":"analysis.outline","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","kind":"LIBRARY","outline":{"element":{"kind"
1571936309093 <= {"event":"analysis.overrides","params":{"file":"/usr/local/google/home/gspencer/code/flutter/packages/flutter/test/material/page_test.dart","overrides":[]}}

@lambdabaa
Copy link
Contributor

@jacob314 @gspencergoog Did you see this behavior on the latest flutter master channel? Or somewhere else?

@lambdabaa lambdabaa self-assigned this Oct 24, 2019
lambdabaa added a commit to flutter/engine that referenced this issue Oct 24, 2019
I still don't totally understand why there are two revisions of the package specified here, but an older model is currently being distributed with a newer version of analysis server. That's causing dart-lang/sdk#39079.
@devoncarew devoncarew added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-completion Issues with the analysis server's code completion feature analyzer-completion-ml labels Oct 24, 2019
@gspencergoog
Copy link
Contributor

gspencergoog commented Oct 25, 2019

Yes, latest Flutter master:

Flutter 1.10.15-pre.253 • channel density • [email protected]:gspencergoog/flutter.git
Framework • revision 3cc69eacaf (3 minutes ago) • 2019-10-25 08:55:02 -0700
Engine • revision 8d6b74aee6
Tools • Dart 2.6.0 (build 2.6.0-dev.8.2 1bd6e20d76)

I've had it happen several more times, same stack trace.

lambdabaa added a commit to flutter/engine that referenced this issue Oct 25, 2019
…E4C (#13337)

I still don't totally understand why there are two revisions of the package specified here, but an older model is currently being distributed with a newer version of analysis server. That's causing dart-lang/sdk#39079.
@lambdabaa
Copy link
Contributor

Thanks! This will be fixed once flutter/engine@c272b18 is picked up in the next roll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-completion Issues with the analysis server's code completion feature area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

5 participants