rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

Refactoring sometimes quietly exits without doing anything (Invalid callee) #5242

Open Irubataru opened 5 years ago

Irubataru commented 5 years ago

Rubberduck version information

Version 2.4.1.4901 OS: Microsoft Windows NT 10.0.17763.0, x64 Host Product: Microsoft Office x64 Host Version: 16.0.12026.20334 Host Executable: EXCEL.EXE

Description Sometimes when I am working Rubberduck stops doing refactorings. If I try to rename a class it simply doesn't do anything. The same thing also happens with opportunities such as adding attributes etc. Simply restarting Rubberduck fixes the problem until it appears again, doing a reparse doesn't help. I haven't been able to create a simple reproducible example, but I have had this issue for a while.

Logfile Here is the log section from me clicking renaming a method when it fails (including end of reparse):

2019-10-24 10:56:36.0238;INFO-2.4.1.4901;Rubberduck.Parsing.Common.ParsingStageTimer;Resolved references in 9027ms.;
2019-10-24 10:56:36.0524;INFO-2.4.1.4901;Rubberduck.Parsing.Common.ParsingStageTimer;Determined module to module references in 28ms.;
2019-10-24 10:56:36.2964;INFO-2.4.1.4901;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (600) is invoking StateChanged (Ready);
2019-10-24 10:56:37.0983;INFO-2.4.1.4901;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run finished after 18,4153738s. (thread 160).;
2019-10-24 10:56:42.0678;DEBUG-2.4.1.4901;Rubberduck.UI.Command.MenuItems.ParentMenus.ParentMenuItemBase;(33375340) Executing click handler for menu item '&Rename', hash code 26118182;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand was registered with id 49508;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorEncapsulateFieldCommand was registered with id 49337;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorMoveCloserToUsageCommand was registered with id 49344;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.CodeExplorerCommand was registered with id 49635;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ExportAllCommand was registered with id 49604;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.FindSymbolCommand was registered with id 49579;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.InspectionResultsCommand was registered with id 49527;
2019-10-24 10:56:47.7818;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ReparseCommand was registered with id 49481;
2019-10-24 10:56:47.7888;TRACE-2.4.1.4901;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.TestExplorerCommand was registered with id 49563;
2019-10-24 10:56:47.8214;ERROR-2.4.1.4901;Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
   at Microsoft.Vbe.Interop._CodePane.get_CodeModule()
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_CodeModule() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 28
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_QualifiedModuleName() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 77
   at Rubberduck.VBEditor.Utility.SelectionService.OpenModules() in C:\projects\rubberduck\Rubberduck.VBEEditor\Utility\SelectionService.cs:line 45
   at Rubberduck.Parsing.Rewriter.SelectionRecoverer.SaveSelections(IEnumerable`1 modules) in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\SelectionRecoverer.cs:line 31
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.PrimeSelectionRecovery() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 108
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.TryRewrite() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 99
   at Rubberduck.Refactorings.Rename.RenameRefactoring.RefactorImpl(RenameModel model) in C:\projects\rubberduck\Rubberduck.Refactorings\Rename\RenameRefactoring.cs:line 71
   at Rubberduck.Refactorings.InteractiveRefactoringBase`2.Refactor(TModel initialModel) in C:\projects\rubberduck\Rubberduck.Refactorings\InteractiveRefactoringBase.cs:line 48
   at Rubberduck.Refactorings.RefactoringBase.Refactor(QualifiedSelection targetSelection) in C:\projects\rubberduck\Rubberduck.Refactorings\RefactoringBase.cs:line 41
   at Rubberduck.UI.Command.Refactorings.RefactorCodePaneCommandBase.OnExecute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\Refactorings\RefactorCodePaneCommandBase.cs:line 30
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 85;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
   at Microsoft.Vbe.Interop._CodePane.get_CodeModule()
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_CodeModule() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 28
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_QualifiedModuleName() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 77
   at Rubberduck.VBEditor.Utility.SelectionService.OpenModules() in C:\projects\rubberduck\Rubberduck.VBEEditor\Utility\SelectionService.cs:line 45
   at Rubberduck.Parsing.Rewriter.SelectionRecoverer.SaveSelections(IEnumerable`1 modules) in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\SelectionRecoverer.cs:line 31
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.PrimeSelectionRecovery() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 108
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.TryRewrite() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 99
   at Rubberduck.Refactorings.Rename.RenameRefactoring.RefactorImpl(RenameModel model) in C:\projects\rubberduck\Rubberduck.Refactorings\Rename\RenameRefactoring.cs:line 71
   at Rubberduck.Refactorings.InteractiveRefactoringBase`2.Refactor(TModel initialModel) in C:\projects\rubberduck\Rubberduck.Refactorings\InteractiveRefactoringBase.cs:line 48
   at Rubberduck.Refactorings.RefactoringBase.Refactor(QualifiedSelection targetSelection) in C:\projects\rubberduck\Rubberduck.Refactorings\RefactoringBase.cs:line 41
   at Rubberduck.UI.Command.Refactorings.RefactorCodePaneCommandBase.OnExecute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\Refactorings\RefactorCodePaneCommandBase.cs:line 30
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 85

Additional context My code base is pretty big, still not sure if that is a general source of problems.

MDoerner commented 5 years ago

I am at a loss what might be the root cause here. It is expected that every CodePane belongs to a CodeModule and that it can be obtained via the CodeModule property of the code pane object from the interop library.

I guess, we could wrap the request for the QualifiedModuleName in SelectionService.OpenModules in a try-catch block and log COM exceptions as warnings. That will omit the corresponding components from the returned collection and thus prevent selection recovery for them, which is not ideal. However, it is better than aborting completely and rendering refactorings unusable for the rest of the session.

daFreeMan commented 4 years ago
Version 2.4.1.5196
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4873.1000
Host Executable: MSACCESS.EXE

Just ran across this on a Quick Fix - Select the quick fix, nothing happens. Appears to my untrained eye to be the same type of issue.

Here's the relevant log bits from 2 successive attempts on different occurrences of the same error (Replace function {x} with existing typed function):

2019-11-19 13:52:06.1741;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand was registered with id 49367;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorEncapsulateFieldCommand was registered with id 49343;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorExtractMethodCommand was registered with id 49292;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorMoveCloserToUsageCommand was registered with id 49391;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.CodeExplorerCommand was registered with id 49276;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ExportAllCommand was registered with id 49394;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.FindSymbolCommand was registered with id 49265;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentModuleCommand was registered with id 49348;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentProcedureCommand was registered with id 49403;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.InspectionResultsCommand was registered with id 49315;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ReparseCommand was registered with id 49347;
2019-11-19 13:52:06.1895;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.TestExplorerCommand was registered with id 49362;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand was registered with id 49362;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorEncapsulateFieldCommand was registered with id 49347;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorExtractMethodCommand was registered with id 49315;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorMoveCloserToUsageCommand was registered with id 49403;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.CodeExplorerCommand was registered with id 49348;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ExportAllCommand was registered with id 49265;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.FindSymbolCommand was registered with id 49394;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentModuleCommand was registered with id 49276;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentProcedureCommand was registered with id 49391;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.InspectionResultsCommand was registered with id 49292;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ReparseCommand was registered with id 49343;
2019-11-19 13:52:09.5020;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.TestExplorerCommand was registered with id 49367;
2019-11-19 13:52:10.7989;ERROR-2.4.1.5196;Rubberduck.UI.Inspections.InspectionResultsViewModel;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
   at Microsoft.Vbe.Interop._CodePane.get_CodeModule()
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_CodeModule() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 28
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_QualifiedModuleName() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 77
   at Rubberduck.VBEditor.Utility.SelectionService.OpenModules() in C:\projects\rubberduck\Rubberduck.VBEEditor\Utility\SelectionService.cs:line 45
   at Rubberduck.Parsing.Rewriter.SelectionRecoverer.SaveSelections(IEnumerable`1 modules) in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\SelectionRecoverer.cs:line 31
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.PrimeSelectionRecovery() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 108
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.TryRewrite() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 99
   at Rubberduck.Inspections.QuickFixes.QuickFixProvider.Fix(IQuickFix fix, IInspectionResult result) in C:\projects\rubberduck\Rubberduck.CodeAnalysis\QuickFixes\QuickFixProvider.cs:line 95
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 85;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
   at Microsoft.Vbe.Interop._CodePane.get_CodeModule()
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_CodeModule() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 28
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_QualifiedModuleName() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 77
   at Rubberduck.VBEditor.Utility.SelectionService.OpenModules() in C:\projects\rubberduck\Rubberduck.VBEEditor\Utility\SelectionService.cs:line 45
   at Rubberduck.Parsing.Rewriter.SelectionRecoverer.SaveSelections(IEnumerable`1 modules) in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\SelectionRecoverer.cs:line 31
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.PrimeSelectionRecovery() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 108
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.TryRewrite() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 99
   at Rubberduck.Inspections.QuickFixes.QuickFixProvider.Fix(IQuickFix fix, IInspectionResult result) in C:\projects\rubberduck\Rubberduck.CodeAnalysis\QuickFixes\QuickFixProvider.cs:line 95
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 85
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand was registered with id 49265;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorEncapsulateFieldCommand was registered with id 49367;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorExtractMethodCommand was registered with id 49343;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorMoveCloserToUsageCommand was registered with id 49292;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.CodeExplorerCommand was registered with id 49391;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ExportAllCommand was registered with id 49276;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.FindSymbolCommand was registered with id 49394;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentModuleCommand was registered with id 49387;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentProcedureCommand was registered with id 49393;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.InspectionResultsCommand was registered with id 49368;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ReparseCommand was registered with id 49354;
2019-11-19 13:53:30.4874;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.TestExplorerCommand was registered with id 49381;
2019-11-19 13:53:33.5658;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand was registered with id 49381;
2019-11-19 13:53:33.5658;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorEncapsulateFieldCommand was registered with id 49354;
2019-11-19 13:53:33.5658;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorExtractMethodCommand was registered with id 49368;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorMoveCloserToUsageCommand was registered with id 49348;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.CodeExplorerCommand was registered with id 49393;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ExportAllCommand was registered with id 49396;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.FindSymbolCommand was registered with id 49347;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentModuleCommand was registered with id 49362;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.IndentCurrentProcedureCommand was registered with id 49403;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.InspectionResultsCommand was registered with id 49387;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.ReparseCommand was registered with id 49394;
2019-11-19 13:53:33.5812;TRACE-2.4.1.5196;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.ComCommands.TestExplorerCommand was registered with id 49276;
2019-11-19 13:53:35.2844;ERROR-2.4.1.5196;Rubberduck.UI.Inspections.InspectionResultsViewModel;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
   at Microsoft.Vbe.Interop._CodePane.get_CodeModule()
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_CodeModule() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 28
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_QualifiedModuleName() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 77
   at Rubberduck.VBEditor.Utility.SelectionService.OpenModules() in C:\projects\rubberduck\Rubberduck.VBEEditor\Utility\SelectionService.cs:line 45
   at Rubberduck.Parsing.Rewriter.SelectionRecoverer.SaveSelections(IEnumerable`1 modules) in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\SelectionRecoverer.cs:line 31
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.PrimeSelectionRecovery() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 108
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.TryRewrite() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 99
   at Rubberduck.Inspections.QuickFixes.QuickFixProvider.Fix(IQuickFix fix, IInspectionResult result) in C:\projects\rubberduck\Rubberduck.CodeAnalysis\QuickFixes\QuickFixProvider.cs:line 95
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 85;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
   at Microsoft.Vbe.Interop._CodePane.get_CodeModule()
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_CodeModule() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 28
   at Rubberduck.VBEditor.SafeComWrappers.VBA.CodePane.get_QualifiedModuleName() in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\CodePane.cs:line 77
   at Rubberduck.VBEditor.Utility.SelectionService.OpenModules() in C:\projects\rubberduck\Rubberduck.VBEEditor\Utility\SelectionService.cs:line 45
   at Rubberduck.Parsing.Rewriter.SelectionRecoverer.SaveSelections(IEnumerable`1 modules) in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\SelectionRecoverer.cs:line 31
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.PrimeSelectionRecovery() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 108
   at Rubberduck.Parsing.Rewriter.RewriteSessionBase.TryRewrite() in C:\projects\rubberduck\Rubberduck.Parsing\Rewriter\RewriteSessionBase.cs:line 99
   at Rubberduck.Inspections.QuickFixes.QuickFixProvider.Fix(IQuickFix fix, IInspectionResult result) in C:\projects\rubberduck\Rubberduck.CodeAnalysis\QuickFixes\QuickFixProvider.cs:line 95
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 85

Closing and reopening Access seems to have cured the problem. Of course, I forgot to save off the complete log in case there was anything meaningful prior to what I posted.

MDoerner commented 4 years ago

I will introduce a symptomatic fix for this later today, but I am at a loss on how to fix the underlying issue.