Visual Studio 2010 Productivity Power Tools crashing when add-in calls Application.DoEvents

April 16, 2011

I had three bug reports from customers of my MZ-Tools add-in for Visual Studio 2010 with a “System.NullReferenceException: Object reference not set to an instance of an object.” that happened “when closing Visual Studio”. The stack trace is something like this: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.Text.Editor.Implementation.DefaultScrollMap.TranslatePosition(SnapshotPoint bufferPosition) […]