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.91k stars 300 forks source link

RD Loads but does not function - Stays at PENDING #4711

Closed DaveSemon closed 5 years ago

DaveSemon commented 5 years ago

MS ACCESS 2010. Normal installation of RD. Loads normally when Access VBA opened. RD button says PENDING and most menu items grayed-out. Clicking on PENDING button does nothing. Code Explorer says "Rubberduck doesn't see anything yet." Clicking on REFRESH does nothing. Code Indenter works fine. Settings for Code Indenter imported from Smart Indenter.

I've seen the same problem identified here in 2017, but there was no definitive resolution. RD Version 2.3.1.4308. I'd really like to try this add-in. Any help would be greatly appreciated. Thanks.

Vogel612 commented 5 years ago

Was there anything written to the logfiles at %APP_DATA%\Rubberduck\Logs?

DaveSemon commented 5 years ago

Yes .... This is the log:

2019-01-14 14:09:08.7349;TRACE-2.3.1.4308;Rubberduck.Common.LogLevelHelper;
    Rubberduck version 2.3.1.4308 loading:
    Operating System: Microsoft Windows NT 6.2.9200.0 x64
    Host Product: Microsoft Office 2010 x86
    Host Version: 14.0.7195.5000
    Host Executable: MSACCESS.EXE;
2019-01-14 14:09:12.4067;DEBUG-2.3.1.4308;Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase;(28090371) Executing click handler for commandbar item 'Pending', hash code 22527411;
2019-01-14 14:09:12.4147;DEBUG-2.3.1.4308;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run started. (thread 20).;
2019-01-14 14:09:12.4147;INFO-2.3.1.4308;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (5) is invoking StateChanged (Started);
2019-01-14 14:09:12.4337;ERROR-2.3.1.4308;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 20).;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.Office12.CommandBarButton.set_IsEnabled(Boolean value) in C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\Office\CommandBarButton.cs:line 193
   at Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase.EvaluateCanExecute(RubberduckParserState state) in C:\projects\rubberduck\Rubberduck.Core\UI\Command\MenuItems\CommandBars\AppCommandBarBase.cs:line 156
   at Rubberduck.UI.Command.MenuItems.CommandBars.RubberduckCommandBar.OnParserStateChanged(Object sender, EventArgs e) in C:\projects\rubberduck\Rubberduck.Core\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, CancellationToken token, ParserState state, ParserState oldStatus) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 399
   at Rubberduck.Parsing.VBA.RubberduckParserState.SetStatusAndFireStateChanged(Object requestor, ParserState status, CancellationToken token) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 614
   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 437
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor) in C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:line 406
2019-01-14 14:09:12.4677;INFO-2.3.1.4308;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (6) is invoking StateChanged (UnexpectedError);
2019-01-14 14:09:17.2191;DEBUG-2.3.1.4308;Rubberduck.UI.Command.MenuItems.ParentMenus.ParentMenuItemBase;(1686169) Executing click handler for menu item 'S&ettings', hash code 56342274;
DaveSemon commented 5 years ago

Thanks. Hit the wrong button.

Vogel612 commented 5 years ago

3033 seems closely related. The specific error message in the log seems to indicate that your office installation is somewhat corrupted. #4078 also seems related.

A remotely related issue has already been closed at #3058

DaveSemon commented 5 years ago

Thanks. I'll check them out and do a "repair" on the office installation.

DaveSemon commented 5 years ago

No luck yet. Did a clean install of MS Office on 2 computers, then installed RD. Still getting same behavior on both . Is it possible that the OS is the problem? I participate in the Windows Insider Program and am running Build 18312.rs_prerelease.190104-1630.

Vogel612 commented 5 years ago

I'm developing on the Win10 Insider build, so I doubt that the OS is responsible in this case..

DaveSemon commented 5 years ago

OK, will continue to investigate. But, I don't know where else to look. But, I'll keep trying.

DaveSemon commented 5 years ago

Unfortunately, all my efforts have failed to resolve the issue. I still cannot get RD to work. Too bad, because it looks like a great add-in. I guess I'll try again in a couple of months and see if anything changes. Thanks for your help.

bclothier commented 5 years ago

@DaveSemon I just want to double check --- do you have any other VBE add-ins installed? Have you tried disabling them and enabling only the RD?

bclothier commented 5 years ago

One more thing to check - did you test with a blank Access database? A different database? Need to rule out it's not related to the contents of VBA project.

DaveSemon commented 5 years ago

I will uninstall other add-ins then test RD and test it on a blank database. Thanks for the input.

DaveSemon commented 5 years ago

Well, after days of trying various fixes, I have to give up. I cannot get RD to work. I removed all add-ins, reinstalled RD - still did not work. I uninstalled MS Access and all add-ins, then reloaded Access and RD. Same problem. And, I did this on 2 computers. So, thanks for all the help, but .... I'll try again in a couple of months.

bclothier commented 5 years ago

That's sad to hear and frustrating as we don't have a reproduction on our end. It may be related to the need for shimming (c.f. #4041 ) - we have observed somehow similar error with #3837 though the symptoms are quite different (this has to do with loading RD whereas you can load it just fine but then error on the casting the commandbars).

That said, because you are on an Insider build, it can't hurt to report this, especially if you have a 3rd computer that isn't on a insider build and can demonstrate it works fine.

bclothier commented 5 years ago

One more question that may seem totally random -- do you have or have you ever installed Office version older than 2003? (2000, 97...)

DaveSemon commented 5 years ago

Sorry it has taken so long to reply ... Been busy. I will report the issue to the Windows Insider group soon. Also, there has never been anything but Office 2010 loaded on either computer. Thanks again for your help.

bclothier commented 5 years ago

Following up on this - has anything changed since in the intervening months? We'd love to close this as resolved...

DaveSemon commented 5 years ago

I never could get Rubberduck to work with Office 2010. But, I upgraded to Office 365 and Rubberduck works fine with it. Thanks for your assistance. Please consider this closed.

bclothier commented 5 years ago

Thanks! As always, if you have any further feedback, feel free to open an issue!