Skip to content

nullref when StructuredFormatDisplay has bogus property name on portable profile #309

Closed

Description

@latkin

As mentioned at #251 (comment)

If one provides a bogus property name to StructuredFormatDisplay, a reasonable error is expected. On portable profiles we instead get a nullref error message.

test cenwoiwe12: expected 
    '<StructuredFormatDisplay exception: Method 'Test+CheckDisplayAttributes12+Foo.Val{Hello' not found.>' but produced 
    '<StructuredFormatDisplay exception: Object reference not set to an instance of an object.>'

Culprit is these lines I believe. If first reflection call returns null, second line will nullref. We should be checking for that and throwing a better error.

Activity

  1. latkin commented on Mar 17, 2015

    @latkin
    ContributorAuthor

    Marking up for grabs as the fix is very small.

    Testing is a bit tricky due to need for portable -- suggestion when doing private validation is to strip down the core\portable test code to include only the printf tests, then run from there. I can provide more details as needed.

  2. latkin commented on Aug 4, 2015

    @latkin
    ContributorAuthor

    ping on up-for-grabs

  3. added
    Area-Debug
    Impact-Low
    on Jan 8, 2016
  4. dsyme commented on Feb 2, 2017

    @dsyme
    Contributor

    Because this involves a corner case in portable profiles only, and .NET Standard is the new new, I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-DebugBugImpact-Lowgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions