Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while refreshing for the first time #4031

Closed
ebayol opened this issue May 23, 2018 · 8 comments
Closed

Error while refreshing for the first time #4031

ebayol opened this issue May 23, 2018 · 8 comments
Labels
bug Identifies work items for known bugs support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask!

Comments

@ebayol
Copy link

ebayol commented May 23, 2018

Hi, I just installed rubberduck and tried to run it on an empty project.
When refreshing for the first time, I get the following message:
Unable to compile for parsing

the following project(s) cannot be compiled, which will most likely result in parser errors. Continue anyway?

VBAProject

this is the logfile generated:
RubberduckLog.txt

@Vogel612
Copy link
Member

Is that really the complete logfile? Can you reproduce the error? If yes, could you please set the log-level to TRACE in the settings and upload that logfile? Thanks!

2018-05-23 10:10:38.3421;ERROR-2.2.6716.24410;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 14).;System.Runtime.InteropServices.COMException (0x80029C4A): Erreur lors du chargement de la bibliothèque/DLL du type. (Exception de HRESULT : 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
   à Microsoft.Vbe.Interop.Reference.get_IsBroken()
   à Rubberduck.VBEditor.SafeComWrappers.VBA.Reference.get_IsBroken() dans C:\projects\rubberduck\Rubberduck.VBEditor.VBA\SafeComWrappers\VB\Reference.cs:ligne 67
   à Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase.GetReferencesToLoadAndSaveReferencePriority(IReadOnlyList`1 projects) dans C:\projects\rubberduck\Rubberduck.Parsing\VBA\COMReferenceSynchronizerBase.cs:ligne 106
   à Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase.SyncComReferences(IReadOnlyList`1 projects, CancellationToken token) dans C:\projects\rubberduck\Rubberduck.Parsing\VBA\COMReferenceSynchronizerBase.cs:ligne 69
   à Rubberduck.Parsing.VBA.ParsingStageService.SyncComReferences(IReadOnlyList`1 projects, CancellationToken token) dans C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParsingStageService.cs:ligne 99
   à Rubberduck.Parsing.VBA.ParseCoordinator.ExecuteCommonParseActivities(IReadOnlyCollection`1 toParse, IReadOnlyCollection`1 toReresolveReferencesInput, CancellationToken token) dans C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:ligne 174
   à Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) dans C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:ligne 383
   à Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) dans C:\projects\rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:ligne 313

@Vogel612 Vogel612 added bug Identifies work items for known bugs support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask! labels May 23, 2018
@ebayol
Copy link
Author

ebayol commented May 23, 2018

there you go:
RubberduckLog.txt

@MDoerner
Copy link
Contributor

Seems as if we need more localised exception handling in the COM reference synchroniser. For some reason the reference COM object is throwing.

@retailcoder
Copy link
Member

Would you happen to have any <MISSING> references? Does Debug/Compile succeed?

The "cannot be compiled" message is just a warning; you can disable it by un-ticking the "compile before parse" checkbox in the general settings tab of the settings dialog. Working with compilable code was always an assumption in Rubberduck, only recently we've been having the ability to instruct the VBE to attempt a compilation and report back to us before launching a parse task.

Ignoring the warning, or turning off "compile before parse", may confuse the parser, or produce resolver errors, depending on the exact nature of the reason why the code couldn't be compiled.

@bclothier
Copy link
Contributor

Tried to reproduce by deliberately introducing a missing reference - this does cause the symptom described but as indicated, if it's due to missing reference, then that's beyond Rubberduck's control and therefore I'm closing the issue as resolved as it seems to me expected behavior. If there is a reproduction to the contrary, feel free to reopen.

Semi-automatic bug tracker automation moved this from ToDo to Done Jul 17, 2018
@inDeev
Copy link

inDeev commented Aug 20, 2018

Hi, I had a same issue with TYPE_E_CANTLOADLIBRARY and I've found a solution.
I searched through regedit. You need to go to "HKEY_CLASSES_ROOT\TypeLib\{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}" open latest sub-key (for me it is 2.8), then subkey 0 and subkey Win32. Check in file explorer if on shown path really MSO.dll exists. If not, go to earlier version of subkey (like 2.7 or 2.6) and check if file exists on paths defined there. When you find it, just copy the path to the latest subkey -> 0 -> Win32. It started to work for me, after excel was reopened. I hope, this will help.

@PeterMTaylor
Copy link

Just a curious question to ask reading this...What’s the big thing about subkey in the registry is this the same as checkin for the bitness of MSO.dll when loaded or version management Of which version of MSO.dll to use?

@bclothier
Copy link
Contributor

This implies to me that there were multiple installations of Office on a single PC, and from my experience, while it's "supported" by Microsoft, it's not totally robust and heavy use can mess up the registration -- you know how changing versions shows that dialog about installing Office, slowing down the startup? That's basically doing registration. If one loads multiple versions concurrently or do not allow the "Installing" message to complete, it can corrupt the registry (among other things) which would result in strange behavior like the missing library as originally reported.

In this case, I would prefer to either repair or even better, uninstall all and install only one version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies work items for known bugs support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask!
Projects
Development

No branches or pull requests

7 participants