jamesmontemagno / mvvm-helpers

Collection of MVVM helper classes for any application
Other
710 stars 136 forks source link

null reference on observable object string property #74

Open shakazulu89 opened 4 years ago

shakazulu89 commented 4 years ago

Hi Great library! Weird issue: I have a simple class. just some string properties. At some point, i cant figure out when exactly, i get an "object reference not set to an instance of an object" when setting the value for a string property. the stack trace leads to line 54 in your observableobject class. on "SetProperty" the error gets thrown...

public class DynaLogItem : ObservableObject { //ommited some proprs for brevity... public string Subtitle { get; set; } // here on set i get the error... }

stack trace points here: https://github.com/jamesmontemagno/mvvm-helpers/blob/e9d6deb27734664410f6f5382a76ad985368c365/MvvmHelpers/ObservableObject.cs#L54

Its kind of hard to explain whats happening but can you think of any reason why this seems to randomly happen? I can confirm that the "DynaLogItem" is not null...

thanks for any help Roy

jamesmontemagno commented 4 years ago

I would need a repo. I haven't ever seen this. So if you can get a repo where the issue happens tha twould be great.