This project is read-only.

T4Toolbox v11 crashing VS 2012

Jun 12, 2013 at 3:17 AM
I experience not infrequent crashes in VS on certain solutions. I finally ran adplus in crashmode and attached to VS and got a call stack. I got the following exception:
 [System.InvalidCastException]: {"Unable to cast object of type 'System.__ComObject' to type 'EnvDTE.IExtenderSite'."}

       at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
      at EnvDTE.IExtenderSite.NotifyDelete(Int32 Cookie)
      at T4Toolbox.VisualStudio.BrowseObjectExtender.Finalize()
I'd send in a patch...
Jun 20, 2013 at 6:04 PM
After decompiling T4Toolbox (I miss the open source!) I note that there is a cast in the T4Toolbox.VisualStudio.BrowseObjectExtender finalizer, which assumes that the underlying COM object is IExtenderSite with an unsafe cast. This appears to be the source of the bug.

I'd gladly help to fix this issue, but it appears that there's little I can do but wait and hope...