Skip to content

Null exception with SDK 2.9.0-8.2.beta #2213

Closed
@axel-op

Description

@axel-op

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0A serious issue requiring immediate resolutiontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions