I am working on a medium size WPF application that utilizes the MVVM pattern. ViewModels use INotifyPropertyChanged
to refresh their respective Views.
This approach works perfectly, except for one problem: when this application is left running for long periods of time (3-7 days) the Views (every single View in the entire app!) suddenly stop updating their bound properties.
If I set a breakpoint in the ViewModels, they are chugging away happily, calling PropertyChanged
like nothing is wrong. However, if I set a breakpoint in the getter of one of the ViewModel objects that the View is bound to, the getter is never called!
I am stumped at this point, and don't even know how to debug this issue properly. I have checked the Visual Studio output window for data binding errors, but everything looks normal. It is almost as if the WPF data binding engine has crashed in the background. This app is also monitoring unhandled exceptions (AppDomain.UnhandledException
and Dispatcher.UnhandledException
), but no exceptions are being thrown.
Summary: After long periods of time, the Views stop updating their data bindings, but the ViewModels are still calling the PropertyChanged event.
Any advice???