Activity overview
Latest activity by Chris Faulhaber
While I haven't been successful in creating a small test project, I was able to find the new code which causes the crash. To give some context, this code appears in a lazy-loaded list class which retrieves data and maps this data to an object model using reflection. The source of my troubles is a new bit of code which adjusts the parent back references of the retrieved objects in a list: T[] items = ...
object _instance = ...
string _targetProperty = ...
Type type = typeof(T);
PropertyInfo member = type.GetProperty(_targetProperty);
foreach (T item in items)
member.SetValue(item, _instance, null); // Crash caused by this line.
Remove the marked line and the profiler does not crash. I hope this helps you narrow down the problem.
One other note: In my efforts to narrow this down I copied the code for the above class to a test project. The identical code had absolutely no problems running there! Thinking it was related to referenced projects, I created a separate library and placed a copy of this code in it, and still there were no problems. / comments
While I haven't been successful in creating a small test project, I was able to find the new code which causes the crash. To give some context, this code appears in a lazy-loaded list class which ...
Tom Harris wrote:
The problem always seems to occur with generic lists of different value types (e.g int's and bool's), but we have not got to the bottom of it yet.
FYI, my problem occurs with a list parametized with a reference type.
I'll look into creating a test project shortly. / comments
Tom Harris wrote:
The problem always seems to occur with generic lists of different value types (e.g int's and bool's), but we have not got to the bottom of it yet.
FYI, my problem occurs with ...