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 in Values_CollectionChanged #447

Closed
1 task done
DaleyKD opened this issue May 13, 2021 · 4 comments
Closed
1 task done

NullReferenceException in Values_CollectionChanged #447

DaleyKD opened this issue May 13, 2021 · 4 comments

Comments

@DaleyKD
Copy link
Contributor

DaleyKD commented May 13, 2021

Category

  • Bug

Describe the bug

NullReferenceException in Values_CollectionChanged event handler.

System.NullReferenceException: Object reference not set to an instance of an object.
   at PnP.Core.Model.SharePoint.FieldValueCollection.Values_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at PnP.Core.Model.SharePoint.ListDataAsStreamHandler.Deserialize(String json, List list)
   at PnP.Core.Model.SharePoint.List.LoadListDataAsStreamAsync(RenderListDataOptions renderOptions)
   at MyClass() in /src/MyClass.cs:line 198

Steps to reproduce

Not sure what's causing this. I have no way to replicate it.

Expected behavior

NullRefs are bad, mkay? 😄

Environment details (development & target environment)

  • SDK version: 1.1.41-nightly
  • OS: Windows 10
  • Framework: .NET Core v5.0.5
  • Tooling: Visual Studio 2019
@DaleyKD
Copy link
Contributor Author

DaleyKD commented May 13, 2021

Working on a PR right now...

@DaleyKD
Copy link
Contributor Author

DaleyKD commented May 14, 2021

Since I'm a goof and don't know how to operate GitHub, this is in the same PR as before... #445 . Can't figure out how to reverse it. Will create a new branch for all subsequent PRs.

@jansenbe
Copy link
Contributor

It's ok they're combined now, I'll process them together and add two change log entries. Thanks for PR @DaleyKD .

Going forward it's indeed best to create a branch per change that you want to submit as PR. I'll add a new issue to further clarify this in https://pnp.github.io/pnpcore/contributing/setup.html

@jansenbe
Copy link
Contributor

@DaleyKD : thanks for your fix, just merged it. Closing this issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants