Skip to content

Null exception with SDK 2.9.0-8.2.beta #2213

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

Closed
axel-op opened this issue May 13, 2020 · 4 comments · Fixed by #2214
Closed

Null exception with SDK 2.9.0-8.2.beta #2213

axel-op opened this issue May 13, 2020 · 4 comments · Fixed by #2214
Labels
P0 A serious issue requiring immediate resolution type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@axel-op
Copy link

axel-op commented May 13, 2020

I'm not sure I should file this issue, since this is an error that only occurs when I run dartdoc with the latest dev version of the SDK. dartdoc runs normally with the latest stable version.

Here's the stacktrace:

dartdoc failed: NoSuchMethodError: The getter 'length' was called on null.
Receiver: null
Tried calling: length
dart:core                                                                     Object.noSuchMethod
package:collection/src/comparators.dart 189:25                                compareAsciiLowerCaseNatural
package:dartdoc/src/model/nameable.dart 42:5                                  byName
dart:collection                                                               ListMixin.sort
package:dartdoc/src/model/library.dart 181:15                                 Library.extensions
package:dartdoc/src/model/library.dart 611:17                                 Library.modelElementsMap
package:dartdoc/src/model/library.dart 652:47                                 Library.allModelElements
package:dartdoc/src/model/package_graph.dart 875:48                           PackageGraph.allModelElements.<fn>.<fn>
dart:collection                                                               SetMixin.forEach
package:dartdoc/src/model/package_graph.dart 874:18                           PackageGraph.allModelElements.<fn>
dart:collection                                                               SetMixin.forEach
package:dartdoc/src/model/package_graph.dart 868:52                           PackageGraph.allModelElements
package:dartdoc/src/model/package_graph.dart 119:28                           PackageGraph.precacheLocalDocs
dart:core                                                                     Iterable.toList
package:dartdoc/src/model/package_graph.dart 70:56                            PackageGraph.initializePackageGraph
package:dartdoc/src/model/package_builder.dart 51:20                          PackageBuilder.buildPackageGraph
===== asynchronous gap ===========================
package:dartdoc/dartdoc.dart 154:26                                           Dartdoc.generateDocsBase
package:dartdoc/dartdoc.dart 194:43                                           Dartdoc.generateDocs
dart:async                                                                    runZoned
C:\b\s\w\ir\cache\builder\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 95:13  main.<fn>
package:stack_trace                                                           Chain.capture
C:\b\s\w\ir\cache\builder\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 94:17  main

EDIT: This error occurs when I run the command for my package which can be found here. I wasn't able to find other packages where the command crashes.

@jcollins-g
Copy link
Contributor

Thanks for the issue! I'll look into it.

@jcollins-g jcollins-g added 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) P0 A serious issue requiring immediate resolution and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels May 13, 2020
@jcollins-g
Copy link
Contributor

jcollins-g commented May 14, 2020

Dartdoc is broken for everything using the head SDK with a variant of this bug. Exception trace indicates it is a problem interpreting Object.noSuchMethod -- which as you might imagine, shows up via inheritance in literally every object.

@jcollins-g
Copy link
Contributor

With #2214 your exception as well as the one I was seeing are both gone and your package appears to document cleanly.

@axel-op
Copy link
Author

axel-op commented May 14, 2020

Dartdoc is broken for everything using the head SDK with a variant of this bug. Exception trace indicates it is a problem interpreting Object.noSuchMethod -- which as you might imagine, shows up via inheritance in literally every object.

Yes, I can imagine 😔

With #2214 your exception as well as the one I was seeing are both gone and your package appears to document cleanly.

Thank you for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 A serious issue requiring immediate resolution type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants