The biggest offender that I can readily reproduce is in my jig.
In one part of the program, the user selects data files with hundreds, sometimes thousands of data points. These points are read into a data class and are subsequently parsed, sorted and inserted as attributes. Each file may have as little as one node or hundreds of nodes. If the user cancels the action during the jig an error is produced 90% of the time and it is usually a null reference.
Stepping through the code provides some clues, but its a daunting task, especially considering that there are several breaks that occur in unmanaged code that I cannot debug (you know stuff like Autodesk libraries and some windows imports). For what its worth, I didn't have this problem when it was a straight up WinForm app, but now that it is running from a palette, this has happened. I suspect it has something to do with the fact that the top level control is only disposed when AutoCAD closes and as a result maybe its a memory leak or maybe there is a variable that the compiler is linking that I don't think it should? I dunno …
I'll find the culprit, because I'd rather not just put a bandaid on the problem. I prefer fixing the problem.