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

cant recognize any class to tell me the problem where exactly in the code #38261

Closed
yamdkh opened this issue Sep 8, 2019 · 5 comments
Closed
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@yamdkh
Copy link

yamdkh commented Sep 8, 2019

Analyzer Feedback from IntelliJ

Version information

  • IDEA IC-192.6262.58
  • 2.4.1
  • IC-192.6262.58, JRE 11.0.3+12-b304.39x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.6, screens 1440x900 Retina

Exception

Dart analysis server, SDK version 2.4.1, server version 1.27.1, error: Captured exception
NoSuchMethodError: The getter 'iterator' was called on null.
Receiver: null
Tried calling: iterator
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      _protocolAvailableSuggestionSet (package:analysis_server/src/domains/completion/available_suggestions.dart:227:35)
#2      createCompletionAvailableSuggestionsNotification.<anonymous closure> (package:analysis_server/src/domains/completion/available_suggestions.dart:78:14)
#3      MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
#4      ListIterable.toList (dart:_internal/iterable.dart:219:19)
#5      createCompletionAvailableSuggestionsNotification (package:analysis_server/src/domains/completion/available_suggestions.dart:79:8)
#6      CompletionDomainHandler.setSubscriptions.<anonymous closure> (package:analysis_server/src/domain_completion.dart:497:11)
#7      new DeclarationsTrackerData.<anonymous closure> (package:analysis_server/src/domains/completion/available_suggestions.dart:300:9)
#8      _rootRunUnary (dart:async/zone.dart:1132:38)
#9      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#10     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#12     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#13     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
#14     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7)
#15     _rootRun (dart:async/zone.dart:1120:38)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#19     _rootRun (dart:async/zone.dart:1124:13)
#20     _CustomZone.run (dart:async/zone.dart:1021:19)
#21     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#22     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#23     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:391:30)
#26     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

For additional log information, please append the contents of
file:///private/var/folders/h5/7ybck4113_qb861b130n1rfh0000gn/T/report.txt.

@yamdkh yamdkh changed the title It just cant recognize any class to tell me the problem where exactly in the code cant recognize any class to tell me the problem where exactly in the code Sep 8, 2019
@yamdkh
Copy link
Author

yamdkh commented Sep 8, 2019

Dart analysis server, SDK version 2.4.1, server version 1.27.1, error: Captured exception
NoSuchMethodError: The getter 'iterator' was called on null.
Receiver: null
Tried calling: iterator
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      _protocolAvailableSuggestionSet (package:analysis_server/src/domains/completion/available_suggestions.dart:227:35)
#2      createCompletionAvailableSuggestionsNotification.<anonymous closure> (package:analysis_server/src/domains/completion/available_suggestions.dart:78:14)
#3      MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
#4      ListIterable.toList (dart:_internal/iterable.dart:219:19)
#5      createCompletionAvailableSuggestionsNotification (package:analysis_server/src/domains/completion/available_suggestions.dart:79:8)
#6      CompletionDomainHandler.setSubscriptions.<anonymous closure> (package:analysis_server/src/domain_completion.dart:497:11)
#7      new DeclarationsTrackerData.<anonymous closure> (package:analysis_server/src/domains/completion/available_suggestions.dart:300:9)
#8      _rootRunUnary (dart:async/zone.dart:1132:38)
#9      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#10     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#12     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#13     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
#14     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7)
#15     _rootRun (dart:async/zone.dart:1120:38)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#19     _rootRun (dart:async/zone.dart:1124:13)
#20     _CustomZone.run (dart:async/zone.dart:1021:19)
#21     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#22     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#23     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:391:30)
#26     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

@yamdkh
Copy link
Author

yamdkh commented Sep 8, 2019

1567939389531 <= {"id":"18879"}
1567939389532 <= {"event":"flutter.outline","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","outline":{"kind":"DART_ELEMENT","offset":0,"length":1596,"codeOffset":0,"codeL
1567939389534 <= {"event":"analysis.errors","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"/Users/YM/Docume
1567939389534 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1567939389534 <= {"event":"analysis.implemented","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","classes":[],"members":[]}}
1567939389535 <= {"event":"analysis.highlights","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","regions":[{"type":"DIRECTIVE","offset":0,"length":46},{"type":"BUILT_IN","
1567939389535 <= {"event":"analysis.navigation","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","regions":[{"offset":7,"length":38,"targets":[0]},{"offset":54,"length":8,"
1567939389535 <= {"event":"analysis.outline","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit
1567939389535 <= {"event":"analysis.overrides","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","overrides":[]}}
1567939389536 <= {"event":"flutter.outline","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","outline":{"kind":"DART_ELEMENT","offset":0,"length":1596,"codeOffset":0,"codeL
1567939389624 => {"id":"18880","method":"edit.getFixes","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","offset":7},"clientRequestTime":1567939389624}
1567939389625 <= {"id":"18880","result":{"fixes":[{"error":{"severity":"INFO","type":"HINT","location":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","offset":7,"length":38,"start
1567939389777 => {"id":"18881","method":"edit.getAssists","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","offset":535,"length":0},"clientRequestTime":1567939389777}
1567939389781 <= {"id":"18881","result":{"assists":[]}}
1567939391516 => {"id":"18882","method":"edit.getAssists","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","offset":47,"length":0},"clientRequestTime":1567939391516}
1567939391516 <= {"id":"18882","result":{"assists":[]}}
1567939391872 => {"id":"18883","method":"analysis.updateContent","params":{"files":{"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart":{"type":"add","content":"import 'package:enjaz/presenter
1567939391872 => {"id":"18884","method":"completion.getSuggestions","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","offset":48},"clientRequestTime":1567939391872}
1567939391872 <= {"id":"18883","result":{}}
1567939391872 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1567939391883 <= {"id":"18884","result":{"id":"2602"}}
1567939391884 <= {"event":"analysis.errors","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"/Users/YM/Docume
1567939391884 <= {"event":"completion.existingImports","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","imports":{"elements":{"strings":["package:enjaz/presenter/api/api.d
1567939391885 <= {"event":"completion.results","params":{"id":"2602","replacementOffset":47,"replacementLength":1,"results":[{"kind":"KEYWORD","relevance":2000,"completion":"import '';","selectionOffs
1567939391886 <= {"event":"analysis.highlights","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","regions":[{"type":"DIRECTIVE","offset":0,"length":46},{"type":"BUILT_IN","
1567939391886 <= {"event":"analysis.navigation","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","regions":[{"offset":7,"length":38,"targets":[0]},{"offset":47,"length":1,"
1567939391887 <= {"event":"analysis.outline","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit
1567939391887 <= {"event":"analysis.overrides","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","overrides":[]}}
1567939391887 <= {"event":"flutter.outline","params":{"file":"/Users/YM/Documents/flutter/enjaz/lib/model/employee.dart","outline":{"kind":"DART_ELEMENT","offset":0,"length":1597,"codeOffset":0,"codeL
1567939391903 <= {"event":"server.error","params":{"isFatal":false,"message":"Captured exception","stackTrace":"NoSuchMethodError: The getter 'iterator' was called on null.\nReceiver: null\nTried call

@bwilkerson
Copy link
Member

@scheglov

@scheglov
Copy link
Contributor

scheglov commented Sep 8, 2019

@scheglov scheglov self-assigned this Sep 8, 2019
@yamdkh
Copy link
Author

yamdkh commented Sep 9, 2019

I did find the start problem of this bug.

the problem dialog appears down when I try to extend a class inside the same file for example

@JsonSerializable
class Employee {
...///
}

class CurrentEmployee extends Employee {}

all in one file and

Notes that I have a file called employee.g.dart for JsonSerializable

Now the problem appears and the error dialog show up with and "dart server analysis terminated "

thanks very much

@mraleph mraleph added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Sep 9, 2019
dart-bot pushed a commit that referenced this issue Sep 9, 2019
I was not able to find the root reason of the problem :-(

R=brianwilkerson@google.com

Bug: #38261
Change-Id: Ib9a78366548688eab231fc941b29f608bdb6b15e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
@scheglov scheglov closed this as completed Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants