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

NullReferenceException when passing null for a byte[] #974

Closed
iablaauw-MS opened this issue Aug 24, 2021 · 0 comments · Fixed by #983
Closed

NullReferenceException when passing null for a byte[] #974

iablaauw-MS opened this issue Aug 24, 2021 · 0 comments · Fixed by #983
Assignees
Labels
bug Something isn't working fixed Issue has been fixed in an upcoming or existing release
Milestone

Comments

@iablaauw-MS
Copy link

Describe the bug
Using a CsWinRT projected type, constructing it and passing null causes an exception to come from inside the generated cswinrt code.
image

It appears that somewhere in MarshalBlittable null isn't handled properly.

To Reproduce

  • Use Win2D in a new project
  • new Microsoft.Graphics.Canvas.Effects.PixelShaderEffect((byte[])null))
  • Causes a NullReferenceException

Expected behavior
An argument exception from inside of Win2D complaining about the null being passed in.

Version Info

  • CsWinRT version: 1.3.0
  • .NET 5
  • Windows SDK: 10.0.18362.0

Additional context

@iablaauw-MS iablaauw-MS added the bug Something isn't working label Aug 24, 2021
@manodasanW manodasanW added this to the Release 1.3.5 milestone Aug 24, 2021
@manodasanW manodasanW self-assigned this Sep 3, 2021
@angelazhangmsft angelazhangmsft added the fixed Issue has been fixed in an upcoming or existing release label Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue has been fixed in an upcoming or existing release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants