Rubberduck: Install but No Menu

Created on 5 Jan 2019  路  19Comments  路  Source: rubberduck-vba/Rubberduck

I'm running Excel 2016 on a Microsoft Surface tablet with Windows 10. I've downloaded and installed several versions of Rubberduck but the Rubberduck menu doesn't appear in the VBE commandbar.
Versions tried:
2.3.1.4308
2.3.0.4221
2.3.1.4391-pre

I've tried installing as administrator and not. I've restarted. Still no joy.
Any suggestions?

bug critical support

Most helpful comment

@retailcoder I stand corrected. I thought we were always writing out a default .config file but I just verified that isn't the case.

After installation, there won't be a %APPDATA%\Rubberduck until we actually launch Rubberduck. Once it's been launched, _normally_, we should get at least the Logs and Template folder created.

However, in the no-menu case which I was able to reproduce under a different VM, we end up with nothing until we actually shut down the host. Only then we get a %APPDATA%\Rubberduck\Log with the log file containing only 2 lines already reported above about Rubberduck shutting down.

I then added the bare-bones configuration file, and was able to launch Rubberduck which then threw an exception. I'm attaching the log at the end of the comment.

My observation is that the reason why installs seems to miraculously work after uninstall & reinstall is because when installing a previous version, if the rubberduck.config is then created, the subsequent update will then work fine. It's the brand new install where the rubberduck.config is missing where we will get the no-menu thing.

The barebone of barebone config file will NOT work:

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <GeneralSettings>
    <UserEditedLogLevel>true</UserEditedLogLevel>
    <MinimumLogLevel>0</MinimumLogLevel>
  </GeneralSettings>
</Configuration>

I had to set the entire GeneralSettings as proposed in prior comment in order to get a startup exception.

It appears that because the exception is thrown within InitializeAddIn on this line:
https://github.com/rubberduck-vba/Rubberduck/blob/f7cd4dcf0d3aa57bbb0b7a48bede01eb62bf17fe/Rubberduck.Main/Extension.cs#L153

which isn't wrapped in a try block, so it fails to initialize without even logging anything. VBE simply ignores the failure and considers it "initialized". That also explains why when shutting down the host, we do get a log entry about shutting down, since those are part of the shutdown:

https://github.com/rubberduck-vba/Rubberduck/blob/f7cd4dcf0d3aa57bbb0b7a48bede01eb62bf17fe/Rubberduck.Main/Extension.cs#L250-L313

It's not clear to me why the logs isn't using the default Trace level as the method has logged several more things but we only get 2 Info level logged written. Most likely this is because due to the exception in the startup, we actually don't get to tell NLog to use the Trace level, which is read from the settings.

2019-01-08 20:54:44.6433;FATAL-;Rubberduck._Extension;Startup sequence threw an unexpected exception.;Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate Rubberduck.UI.Inspections.InspectionResultsViewModel ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Rubberduck.SettingsProvider.XmlPersistanceService`1.Load(T toDeserialize) in C:\projects\rubberduck\Rubberduck.SettingsProvider\XmlPersistanceService.cs:line 20
   at Rubberduck.Settings.HotkeyConfigProvider.Create() in C:\projects\rubberduck\Rubberduck.Core\Settings\HotkeyConfigProvider.cs:line 22
   at Rubberduck.Settings.ConfigurationLoader.LoadConfiguration() in C:\projects\rubberduck\Rubberduck.Core\Settings\ConfigurationLoader.cs:line 58
   at Rubberduck.UI.Inspections.InspectionResultsViewModel..ctor(RubberduckParserState state, IInspector inspector, IQuickFixProvider quickFixProvider, INavigateCommand navigateCommand, ReparseCommand reparseCommand, IClipboardWriter clipboard, IGeneralConfigService configService, ISettingsFormFactory settingsFormFactory, IUiDispatcher uiDispatcher) in C:\projects\rubberduck\Rubberduck.Core\UI\Inspections\InspectionResultsViewModel.cs:line 90
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, ConstructorCandidate constructor)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   --- End of inner exception stack trace ---
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(IConfiguration configuration, Type targetType)
   at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion[TTarget](IConfiguration configuration)
   at Castle.MicroKernel.SubSystems.Conversion.GenericListConverter.ListHelper`1.ConvertConfigurationToCollection(IConfiguration configuration)
   at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(IConfiguration configuration, Type targetType)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromParameter(CreationContext context, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.ResolveAll(Type service, IDictionary arguments, IReleasePolicy policy)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
   at Castle.Windsor.WindsorContainer.Resolve[T]()
   at Rubberduck._Extension.Startup() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 229
2019-01-08 20:54:44.6902;FATAL-;Rubberduck._Extension;System.Exception: Rubberduck's startup sequence threw an unexpected exception. Please check the Rubberduck logs for more information and report an issue if necessary
   at Rubberduck._Extension.Startup() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 240
   at Rubberduck._Extension.InitializeAddIn() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 195;System.Exception: Rubberduck's startup sequence threw an unexpected exception. Please check the Rubberduck logs for more information and report an issue if necessary
   at Rubberduck._Extension.Startup() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 240
   at Rubberduck._Extension.InitializeAddIn() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 195

All 19 comments

I am running Excel 2016 32bit on a laptop running windows 10.

I too have been unable to get either verison 2.3.1.4340 or 2.3.1.4391 of rubberduck to start. There is no splash screen and the menu does not appear. I have had to revert to version 2.2.0.3484 to get Rubberduck to start.

The workaround I tried (from previous bug post) was install (find the problem), uninstall, then re-install. That worked for me.

I'm wondering - in all cases being reported, did you have a prior version of RD already installed?

Same for myself and one other computer

Edit:

I am unable to upload the log, but it looks like it's trying to to parse core.xml file from C:/Projects, yet there's no c:/projects

yes my use case is that I have already have a previous version of RD installed. The installer then says, "you have a previous version of RD installed, I will uninstall it for you now."
Even when I uninstall RD using the windows remove programs utility I am still unable to install version 2.3.

I was able to reinstall version 2.2.0.3484 and have it work.

Sorry for been so doey, where do I find the log?

Reading the comments...
I tried de-installing then re-installing - no joy

One suggestion is to figure out the error, uninstall, and re-install. I'm open to that but i don't know how to do step 1: figure out the error.

I didn't try dropping back as far as version 2.2.

Ok, so in response to the question about finding out the error, because you can't see the menu, you can't do this via menu to set the error log. Therefore, we need to ensure that you are running with more detailed logs to help us further diagnose the issue.

To do this, we need to edit the config file by hand. The config file is usually located in %APPDATA%\Rubberduck\rubberduck.config.

If neither folder nor the file exists, please let us know that this did not happen. Those should be created automatically as a part of the installation.

Assuming the file does exist, you should locate the line and set the values to true and 0, respectively:

<UserEditedLogLevel>true</UserEditedLogLevel>
<MinimumLogLevel>0</MinimumLogLevel>

If you do NOT have the file, create a new text file, save it with the same name in path as above:

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <GeneralSettings>
    <Language Code="en-US" />
    <CanShowSplash>true</CanShowSplash>
    <CanCheckVersion>true</CanCheckVersion>
    <CompileBeforeParse>true</CompileBeforeParse>
    <IsSmartIndenterPrompted>false</IsSmartIndenterPrompted>
    <IsAutoSaveEnabled>false</IsAutoSaveEnabled>
    <AutoSavePeriod>10</AutoSavePeriod>
    <UserEditedLogLevel>true</UserEditedLogLevel>
    <MinimumLogLevel>0</MinimumLogLevel>
    <EnableExperimentalFeatures />
  </GeneralSettings>
</Configuration>

Once you've updated/saved the rubberduck.config file, launch a new instance of the preferred host, and then try to open VBE. Assuming that the Rubberduck has been attempted to load, you should then end up with a log file located at %APPDATA%\Rubberduck\Logs\RubberduckLog.txt. That's the file to upload to here so we can see if there's any kind of pattern.

If you have failed to get a log because Rubberduck actually never starts up at all, please at least share your environment setup:

  • Operating system version & bitness
  • Office version & bitness

    • Office build number

    • Indicate if Office365 or perpetual

    • If Office365, channels used

  • Whether you installed per-user or per-machine
  • Whether the computer is a part of domain or not.

Any extra data you can provide, that will help us diagnose. Please understand that contributors currently do not experience this so this is a challenge since we can't fix the issue if we can't replicate the issue. We will be doing some tests to see if we can manage to replicate the issues on our ends, but in meanwhile, the more information you can provide, the better.

The rubberduck.config file didn't exist so I added it as you describe.

I launched Excel and the VBE but there was no new log file. There is a log file from 1/5/19; presumably created when I first tried to add rubberduck to my tablet. It reads:

2019-01-05 12:23:04.5009;INFO-;Rubberduck._Extension;Rubberduck is shutting down.;
2019-01-05 12:23:04.5847;INFO-;Rubberduck._Extension;No exceptions were thrown.;

OS: Windows 10 Pro
Version: 1803
Build: 17143.472
64 bit
Excel version 1811
Excel Build: 11029.20108
Not Office 365
I tried per-user and per-machine; no joy either way.
Part of a domain: not exactly sure but it's my home tablet on my home network
Thanks for all your help. I know it's nearly impossible to diagnose something you can't recreate.

What do you think of re-installing or repairing Office? Could it be an Office problem?

The fact that you didn't have a config file is very telling. It's likely that the failure to create a config file is contributing to the behavior being observed.

If you are willing to repair the Office, that would be useful in ruling it out as a source of the problem.

@bclothier no config file could also mean RD is launching off the defaults, no? We only write that file if/when settings change, don't we?

Grrrr.

I just went back and downloaded a number of your previous published revisions, along with the latest version released 22 hours ago,

I installed each one as administrator, for all users, and grrrr they all worked. As per the text at the bottom of this note, I am now running the latest release.

This is not the error report I was hoping to be able to give you. Because (unfortunalty?) I now have a working copy of the latest published RD.

image

Version 2.3.1.4406
OS: Microsoft Windows NT 10.0.16299.0, x64
Host Product: Microsoft Office 2016 x86
Host Version: 16.0.4266.1001
Host Executable: EXCEL.EXE

@retailcoder I stand corrected. I thought we were always writing out a default .config file but I just verified that isn't the case.

After installation, there won't be a %APPDATA%\Rubberduck until we actually launch Rubberduck. Once it's been launched, _normally_, we should get at least the Logs and Template folder created.

However, in the no-menu case which I was able to reproduce under a different VM, we end up with nothing until we actually shut down the host. Only then we get a %APPDATA%\Rubberduck\Log with the log file containing only 2 lines already reported above about Rubberduck shutting down.

I then added the bare-bones configuration file, and was able to launch Rubberduck which then threw an exception. I'm attaching the log at the end of the comment.

My observation is that the reason why installs seems to miraculously work after uninstall & reinstall is because when installing a previous version, if the rubberduck.config is then created, the subsequent update will then work fine. It's the brand new install where the rubberduck.config is missing where we will get the no-menu thing.

The barebone of barebone config file will NOT work:

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <GeneralSettings>
    <UserEditedLogLevel>true</UserEditedLogLevel>
    <MinimumLogLevel>0</MinimumLogLevel>
  </GeneralSettings>
</Configuration>

I had to set the entire GeneralSettings as proposed in prior comment in order to get a startup exception.

It appears that because the exception is thrown within InitializeAddIn on this line:
https://github.com/rubberduck-vba/Rubberduck/blob/f7cd4dcf0d3aa57bbb0b7a48bede01eb62bf17fe/Rubberduck.Main/Extension.cs#L153

which isn't wrapped in a try block, so it fails to initialize without even logging anything. VBE simply ignores the failure and considers it "initialized". That also explains why when shutting down the host, we do get a log entry about shutting down, since those are part of the shutdown:

https://github.com/rubberduck-vba/Rubberduck/blob/f7cd4dcf0d3aa57bbb0b7a48bede01eb62bf17fe/Rubberduck.Main/Extension.cs#L250-L313

It's not clear to me why the logs isn't using the default Trace level as the method has logged several more things but we only get 2 Info level logged written. Most likely this is because due to the exception in the startup, we actually don't get to tell NLog to use the Trace level, which is read from the settings.

2019-01-08 20:54:44.6433;FATAL-;Rubberduck._Extension;Startup sequence threw an unexpected exception.;Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate Rubberduck.UI.Inspections.InspectionResultsViewModel ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Rubberduck.SettingsProvider.XmlPersistanceService`1.Load(T toDeserialize) in C:\projects\rubberduck\Rubberduck.SettingsProvider\XmlPersistanceService.cs:line 20
   at Rubberduck.Settings.HotkeyConfigProvider.Create() in C:\projects\rubberduck\Rubberduck.Core\Settings\HotkeyConfigProvider.cs:line 22
   at Rubberduck.Settings.ConfigurationLoader.LoadConfiguration() in C:\projects\rubberduck\Rubberduck.Core\Settings\ConfigurationLoader.cs:line 58
   at Rubberduck.UI.Inspections.InspectionResultsViewModel..ctor(RubberduckParserState state, IInspector inspector, IQuickFixProvider quickFixProvider, INavigateCommand navigateCommand, ReparseCommand reparseCommand, IClipboardWriter clipboard, IGeneralConfigService configService, ISettingsFormFactory settingsFormFactory, IUiDispatcher uiDispatcher) in C:\projects\rubberduck\Rubberduck.Core\UI\Inspections\InspectionResultsViewModel.cs:line 90
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, ConstructorCandidate constructor)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   --- End of inner exception stack trace ---
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(IConfiguration configuration, Type targetType)
   at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion[TTarget](IConfiguration configuration)
   at Castle.MicroKernel.SubSystems.Conversion.GenericListConverter.ListHelper`1.ConvertConfigurationToCollection(IConfiguration configuration)
   at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(IConfiguration configuration, Type targetType)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromParameter(CreationContext context, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.ResolveAll(Type service, IDictionary arguments, IReleasePolicy policy)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
   at Castle.Windsor.WindsorContainer.Resolve[T]()
   at Rubberduck._Extension.Startup() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 229
2019-01-08 20:54:44.6902;FATAL-;Rubberduck._Extension;System.Exception: Rubberduck's startup sequence threw an unexpected exception. Please check the Rubberduck logs for more information and report an issue if necessary
   at Rubberduck._Extension.Startup() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 240
   at Rubberduck._Extension.InitializeAddIn() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 195;System.Exception: Rubberduck's startup sequence threw an unexpected exception. Please check the Rubberduck logs for more information and report an issue if necessary
   at Rubberduck._Extension.Startup() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 240
   at Rubberduck._Extension.InitializeAddIn() in C:\projects\rubberduck\Rubberduck.Main\Extension.cs:line 195

My guess is that the problem right after this line.

https://github.com/rubberduck-vba/Rubberduck/blob/4e2af2a7b5c5ff9ea47c9b5f55246d9160cbcb11/Rubberduck.SettingsProvider/XmlPersistanceService.cs#L21

When this class got refactored about a month ago, the null check following this line vanished. If the node, which gets returned from a FirstOrDefault is null, we get an exception on the next line.

Just to document this here, the base problem in the refactoring about a month ago was that there was an implicit assumption that the loader would bail out on

https://github.com/rubberduck-vba/Rubberduck/blob/4e2af2a7b5c5ff9ea47c9b5f55246d9160cbcb11/Rubberduck.SettingsProvider/XmlPersistanceService.cs#L15

in case CachedOrNotFound returned the default value. The problem is that the default value is null.

Wow! You guys are amazing! I really appreciate your jumping on my problem with so much horsepower. If someone will respond on this thread when the Pull is incorporated and in which version, I'll try it out.

@BriargateExcel the next prerelease will contain the fix. It should be available as 2.3.1.4414 in about 30 minutes

I've de-installed Office 2016 and installed Office 2019. I re-installed RD 3.2.1.4414. RD still doesn't show up when I launch Excel's VBE. Could there be something unique about my tablet and Windows 10 setup?

Solution!
I figured out what I was doing wrong. in the VBE Add-In Manager, I didn't check the Loaded/Unloaded Checkbox. As soon as I did that, Rubberduck appeared in all its glory!
This is a suggestion for others having a similar problem: check the VBE Add-In manager.

Great I'm glad you found it. For others' reference; we also have an wiki article on troubleshooting.

Note that the hosts may automatically disable the add-ins, especially after a crash. It's meant to allow you back in even when an add-in misbehave, but sometime the host crashes and mistakenly blame the addin, so it's necessary to check the addin manager in such situations.

Was this page helpful?
0 / 5 - 0 ratings