Version 2.4.0.4488
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office x86
Host Version: 16.0.11231.20130
Host Executable: EXCEL.EXE
Got this upon closing Excel:
The text in the details:
UnhandledExceptionText.txt
The underlying reason seems to be a disconnected COM RCW Wrapper:
System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Vbe.Interop._VBProject.get_References()
at Rubberduck.VBEditor.SafeComWrappers.VBA.VBProject.get_References() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\VBProject.cs:line 45
at Rubberduck.Navigation.CodeExplorer.CodeExplorerProjectViewModel.GetProjectReferenceModels() in C:\projects\rubberduck\Rubberduck.Core\Navigation\CodeExplorer\CodeExplorerProjectViewModel.cs:line 150
at Rubberduck.Navigation.CodeExplorer.CodeExplorerProjectViewModel.SynchronizeReferences() in C:\projects\rubberduck\Rubberduck.Core\Navigation\CodeExplorer\CodeExplorerProjectViewModel.cs:line 117
at Rubberduck.Navigation.CodeExplorer.CodeExplorerProjectViewModel.AddNewChildren(List`1& updated) in C:\projects\rubberduck\Rubberduck.Core\Navigation\CodeExplorer\CodeExplorerProjectViewModel.cs:line 100
at Rubberduck.Navigation.CodeExplorer.CodeExplorerItemViewModel.SynchronizeChildren(List`1& updated) in C:\projects\rubberduck\Rubberduck.Core\Navigation\CodeExplorer\CodeExplorerItemViewModel.cs:line 73
at Rubberduck.Navigation.CodeExplorer.CodeExplorerProjectViewModel.Synchronize(List`1& updated) in C:\projects\rubberduck\Rubberduck.Core\Navigation\CodeExplorer\CodeExplorerProjectViewModel.cs:line 87
at Rubberduck.Navigation.CodeExplorer.CodeExplorerViewModel.<>c__DisplayClass46_0.<Synchronize>b__0() in C:\projects\rubberduck\Rubberduck.Core\Navigation\CodeExplorer\CodeExplorerViewModel.cs:line 263
at Rubberduck.Parsing.UIContext.UiDispatcher.<>c__DisplayClass2_0.<InvokeAsync>b__0(Object x) in C:\projects\rubberduck\Rubberduck.Parsing\UIContext\UiDispatcher.cs:line 28
We currently only have an issue pertaining to powerpoint open with this error: #4757
This has been introduced with the PR bringing the reference nodes to the CE. The problem is that it is still trying to get the reference information from the VBE when we are already in the shutdown.
I would say the source of the problem comes from this:
We start to turn off the event pipeline via this:
into:
The problem, though is that the RPS does not currently listen to the Terminate event:
It probably needs to start listening to it and use it to cancel the current parse & stop broadcasting its own events.
Not sure if this is related or not, but I'll post as additional info:
Had an XLSM open with the VBE open and the project parsed (.4533).
Opened an XLSX
RD parsed (the VBE was in the background)
Got the JIT debugging info.
Have just had the same or similar, twice on successive RubberDuck refreshes. Excel had been open for an hour or two doing desultory editing of code and code-behind-form modules, running code to test.
After clicking Continue on the .NET dialog, refreshing seemed to complete normally. Restarting Excel appears to have made the problem go away.
RubberDuck Version 2.4.1.4627
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office x86
Host Version: 16.0.11425.20202
Host Executable: EXCEL.EXE
.NET error details in attached file.
DotNet RCW exception 20190411.txt
Same again, though Excel had been open, mostly idle, for much longer. Please let me know if there's anything more helpful I can do next time.
Version 2.4.1.4627
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office x86
Host Version: 16.0.11425.20204
Host Executable: EXCEL.EXE