I think it's becoming clearer now with more context.
Herein lies the problem. If the form gets disposed somehow (it happens occasionally, still working on that) and I instantiate a new one, it will work fine in the current drawing, but if I open a new drawing or switch to a different drawing, the DocumentBecameCurrent event fires from the disposed form and crashes AutoCAD because everything has been disposed.
I think you meant to say "the DocumentBecameCurrent event
handler fires from the disposed form"
The problem with the quoted statement is that the DocumentBecameCurrent event isn't 'coming from' the form, it's being dispatched 'to' the form and if the form is disposed it should throw an exception on the null event handler method (but crashes in this case).
The problem is that when the form is disposed, the event handler remains active. I determined this by grabbing the handle of the window on close. <snip>
Again, the 'event dispatcher' remains active, the 'event handler' went with the disposed form.
After disposing the form, and re-initializing a new one, the event handler gave me the handle to the disposed form, not the current form, despite the form being disposed AND the error handler being defined in the form.
Again, replace event handler with dispatcher...
Given that, the event 'handler' registered to the 'dispatcher' is referenced to by the handle of the form that owns the event handler method but on dispose the form becomes null in the static variable.
Ultimately I think the issue is that once you define a variable in a static class, those variables apparently do not go out of scope just because the form holding them is disposed. It is working now though.
That's right, the variable can't go out of scope until the class that contains it does BUT the variable can become null when the form that was referenced by that variable becomes null (disposed).
Basically the Document was dispatching/sending an event message to a form that no longer exists. Every 'object' that needs to know when an event is fired needs to register its own callback (event handler) with the object that handles the event at a higher level (the event dispatcher). As Daniel showed, you can do this with the object that wants to handle an event when it occurs but you must de-register it when your object goes out of scope (disposed) to avoid this topic's problem.
Or you can do it how I have done it and just call whatever object is stored on the static variable, either way you are capturing the event and handling it indirectly.
Semantics maybe but I think that the problem is a lot clearer now, hope that helps anyone coming across a similar issue in the future