我安装了 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);