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

NoSuchMethodError: The getter 'name' was called on null. #2740

Closed
isoos opened this issue Aug 16, 2021 · 1 comment · Fixed by #2741
Closed

NoSuchMethodError: The getter 'name' was called on null. #2740

isoos opened this issue Aug 16, 2021 · 1 comment · Fixed by #2741
Labels
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)

Comments

@isoos
Copy link
Contributor

isoos commented Aug 16, 2021

  • dartdoc 1.0.2
  • several packages on pub.dev are affected

To reproduce:

  • git clone https://github.com/glynskyi/ktx
  • cd ktx
  • pub global run dartdoc .
Receiver: null
Tried calling: name
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1      TypeParameter.referenceChildren (package:dartdoc/src/model/type_parameter.dart:73:17)
#2      DefinedElementType.referenceChildren (package:dartdoc/src/element_type.dart:362:20)
#3      Extension.referenceChildren (package:dartdoc/src/model/extension.dart:127:23)
#4      CommentReferable.referenceBy (package:dartdoc/src/model/comment_referable.dart:112:11)
#5      _getMatchingLinkElementCommentReferable (package:dartdoc/src/markdown_processor.dart:268:31)
#6      getMatchingLinkElement (package:dartdoc/src/markdown_processor.dart:964:16)
#7      _makeLinkNode (package:dartdoc/src/markdown_processor.dart:913:16)
#8      new MarkdownDocument.withElementLinkResolver.linkResolver (package:dartdoc/src/markdown_processor.dart:1062:14)
#9      LinkSyntax._resolveReferenceLink (package:markdown/src/inline_parser.dart:1057:34)
#10     LinkSyntax._tryCreateReferenceLink (package:markdown/src/inline_parser.dart:1085:12)
#11     LinkSyntax.close (package:markdown/src/inline_parser.dart:1028:12)
#12     InlineParser._linkOrImage (package:markdown/src/inline_parser.dart:152:29)
#13     InlineParser.parse (package:markdown/src/inline_parser.dart:108:9)
#14     MarkdownDocument._parseInlineContent (package:dartdoc/src/markdown_processor.dart:1111:67)
#15     MarkdownDocument._parseInlineContent (package:dartdoc/src/markdown_processor.dart:1116:9)
#16     MarkdownDocument.parseMarkdownText (package:dartdoc/src/markdown_processor.dart:1101:5)
#17     Documentation._parseDocumentation (package:dartdoc/src/model/documentation.dart:73:21)
#18     Documentation._renderDocumentation (package:dartdoc/src/model/documentation.dart:48:23)
#19     Documentation.asOneLiner (package:dartdoc/src/model/documentation.dart:40:7)
#20     ModelElement.oneLineDoc (package:dartdoc/src/model/model_element.dart:929:43)
#21     _renderLibrary_partial_extension_7 (package:dartdoc/src/generator/templates.aot_renderers_for_html.dart:6582:25)
#22     renderLibrary (package:dartdoc/src/generator/templates.aot_renderers_for_html.dart:6022:26)
#23     HtmlAotTemplates.renderLibrary (package:dartdoc/src/generator/templates.dart:155:7)
#24     DartdocGeneratorBackend.generateLibrary (package:dartdoc/src/generator/dartdoc_generator_backend.dart:148:29)
#25     GeneratorFrontEnd._generateDocs (package:dartdoc/src/generator/generator_frontend.dart:56:27)
#26     GeneratorFrontEnd.generate (package:dartdoc/src/generator/generator_frontend.dart:21:5)
#27     Dartdoc.generateDocsBase (package:dartdoc/dartdoc.dart:213:21)
@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) labels Aug 16, 2021
@jcollins-g
Copy link
Contributor

yep, looks like a bug in the new lookup code; it incorrectly assumes all type parameters have a bound type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants