3

我安装了 RubberDuck 并打开了一个 Access 2007 数据库,用作代码测试场。当我单击 RD 工具栏上的刷新时,文本继续说Pending. 几次单击刷新按钮后,我打开Settings并取消选中/重新选中了一个随机复选框并单击Ok。那时我的刷新按钮文本显示Parse Error

然后我关闭了 MS Access 的所有实例并重新打开了数据库。我将最低日志记录级别更改为INFO,然后单击刷新按钮。

我的日志中确实有错误,但刷新按钮仍然显示Pending

橡皮鸭日志.txt:

2017-10-26 11:10:35.3473;INFO-2.1.1.2431;Rubberduck.Common.LogLevelHelper;
    Rubberduck version 2.1.1.2431 loading:
    Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1 x86
    Host Product: 2007 Microsoft Office system x86
    Host Version: 12.0.6423.1000
    Host Executable: MSACCESS.EXE;
2017-10-26 11:10:35.7613;INFO-2.1.1.2431;Rubberduck.UI.Command.VersionCheckCommand;Executing version check.;
2017-10-26 11:10:58.7656;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (1) is invoking StateChanged (Pending);
2017-10-26 11:10:58.7746;ERROR-2.1.1.2431;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 5).;System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.CommandBarControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C0308-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
   at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
   at Rubberduck.VBEditor.SafeComWrappers.Office.Core.CommandBarControl.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEEditor\SafeComWrappers\Office.Core\CommandBarControl.cs:line 39
   at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 124
   at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\RubberduckCommandBar.cs:line 90
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 331
   at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 555
   at Rubberduck.Parsing.VBA.ParserStateManagerBase.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:line 51
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 330
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 303
2017-10-26 11:10:59.1217;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (2) is invoking StateChanged (Error);

修订后包含来自 MS Excel 2010 的错误日志:

2017-10-26 12:17:41.2597;INFO-2.1.1.2431;Rubberduck.Common.LogLevelHelper;
    Rubberduck version 2.1.1.2431 loading:
    Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1 x86
    Host Product: Microsoft Office 2010 x86
    Host Version: 14.0.7188.5000
    Host Executable: EXCEL.EXE;
2017-10-26 12:17:41.8027;INFO-2.1.1.2431;Rubberduck.UI.Command.VersionCheckCommand;Executing version check.;
2017-10-26 12:17:42.2597;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (1) is invoking StateChanged (Pending);
2017-10-26 12:17:42.2737;ERROR-2.1.1.2431;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 6).;System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.CommandBarControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C0308-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
   at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
   at Rubberduck.VBEditor.SafeComWrappers.Office.Core.CommandBarControl.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEEditor\SafeComWrappers\Office.Core\CommandBarControl.cs:line 39
   at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 124
   at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\RubberduckCommandBar.cs:line 90
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 331
   at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 555
   at Rubberduck.Parsing.VBA.ParserStateManagerBase.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:line 51
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 330
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 303
2017-10-26 12:17:42.8447;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (2) is invoking StateChanged (Error);
2017-10-26 12:17:56.3117;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (3) is invoking StateChanged (Pending);
2017-10-26 12:17:56.3117;ERROR-2.1.1.2431;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 7).;System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.CommandBarControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C0308-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
   at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
   at Rubberduck.VBEditor.SafeComWrappers.Office.Core.CommandBarControl.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEEditor\SafeComWrappers\Office.Core\CommandBarControl.cs:line 39
   at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 124
   at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\RetailCoder.VBE\UI\Command\MenuItems\CommandBars\RubberduckCommandBar.cs:line 90
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 331
   at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 559
   at Rubberduck.Parsing.VBA.ParserStateManagerBase.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:line 51
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 330
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 303
2017-10-26 12:17:56.3117;INFO-2.1.1.2431;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (4) is invoking StateChanged (Error);
4

1 回答 1

1

不是这样的答案,但希望它可以帮助某人......

我已经使用 Rubberduck 一段时间了(长话短说),在我无意中修复了 Office 2010 然后开始执行清理任务后,它昨天停止工作。

在阅读了@Mathieu 和@this 的评论后,我怀疑是在我进行修复时安装了 Access 2016 运行时导致了这个问题(尽管不是 100% 确定)。推测的“修复”有点像更改安装顺序......?

其他促成因素可能是我在清理过程中卸载的 OneDrive 和 Skype。

我最终删除了 Office 2010 并安装了 Office 2016。

关键点,卸载 Office 2010 并安装 Office 2016 后,Rubberduck 再次工作

我非常想重新安装 Office 2010,但#TimeConstraints,你的里程可能会有所不同......


笔记:

Rubberduck 日志让我想到了这个问题,特别是类 {000C0308-0000-0000-C000-000000000046} 加载失败,与 OP 日志中的条目 4 基本相同。

于 2018-10-19T08:15:52.500 回答