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.92k stars 302 forks source link

Error upon opening New Workbook #1485

Closed Zak-Michael-Armstrong closed 8 years ago

Zak-Michael-Armstrong commented 8 years ago

image

I get that error (not quite always, but nearly) when opening an external workbook via VBA. Specifically when using Workbooks.Open(filename). This started occuring immediately after installing the new Rubberduck 2.0 Alpha Preview (hotfix 1). The external workbooks contain their own code/Macros.

Update: Also observed when opening workbooks manually and opening workbooks that do not contain their own code/macros.

Update: Also triggered when renaming the project name in the properties window (with no other open projects).

Clicking Continue allows the code to finish executing and doesn't appear to cause any other adverse effects. It only occurs once per execution (despite multiple workbook openings).

Full error paste:

"Unhandled exception has occured in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

Exception from HRESULT: 0x800A01A8"

Details:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

\ Exception Text ** System.Runtime.InteropServices.COMException (0x800A01A8): Exception from HRESULT: 0x800A01A8 at Microsoft.Vbe.Interop.VBProjectClass.get_Name() at Rubberduck.Parsing.Symbols.DeclarationFinder.<.ctor>b__6(Declaration declaration) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Symbols\DeclarationFinder.cs:line 26 at System.Linq.Lookup2.Create[TSource](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.GroupedEnumerable3.GetEnumerator() at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at Rubberduck.Parsing.Symbols.DeclarationFinder..ctor(IReadOnlyList1 declarations, IEnumerable1 comments, IEnumerable1 annotations) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Symbols\DeclarationFinder.cs:line 26 at Rubberduck.Parsing.VBA.RubberduckParser.AddBuiltInDeclarations(IReadOnlyList1 projects) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParser.cs:line 171 at Rubberduck.Parsing.VBA.RubberduckParser.ParseAll() in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParser.cs:line 140 at Rubberduck.Parsing.VBA.RubberduckParser.ReparseRequested(Object sender, ParseRequestEventArgs e) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParser.cs:line 77 at Rubberduck.Parsing.VBA.RubberduckParserState.OnParseRequested(Object requestor, VBComponent component) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:line 534 at Rubberduck.App.d4.MoveNext() in c:\Users\Mathieu\Documents\GitHub\Rubberduck\RetailCoder.VBE\App.cs:line 203 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b0(Object state)

\ Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18063 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Rubberduck Assembly Version: 2.0.0.2650 Win32 Version: 2.0.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.DLL

Ninject Assembly Version: 3.2.0.0 Win32 Version: 3.2.2.0

CodeBase: file:///C:/ProgramData/Rubberduck/Ninject.DLL

Ninject.Extensions.Factory Assembly Version: 3.2.0.0 Win32 Version: 3.2.1.0

CodeBase: file:///C:/ProgramData/Rubberduck/Ninject.Extensions.Factory.DLL

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

Castle.Core Assembly Version: 3.2.0.0 Win32 Version: 3.2.0.14

CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Core.DLL

Microsoft.Vbe.Interop Assembly Version: 15.0.0.0 Win32 Version: 15.0.4823.1001

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Vbe.Interop/15.0.0.0__71e9bce111e9429c/Microsoft.Vbe.Interop.dll

Rubberduck.Parsing Assembly Version: 2.0.5959.2646 Win32 Version: 2.0.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.Parsing.DLL

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

Rubberduck.VBEditor Assembly Version: 1.0.5959.2645 Win32 Version: 1.0.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.VBEditor.DLL

Rubberduck.SourceControl Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.SourceControl.DLL

Rubberduck.SmartIndenter Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.SmartIndenter.DLL

PresentationCore Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll

WindowsBase Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll

PresentationFramework Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18060

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll

System.Xaml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18015 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll

office Assembly Version: 15.0.0.0 Win32 Version: 15.0.4823.1002

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll

System.Windows.Interactivity Assembly Version: 4.0.0.0 Win32 Version: 2.0.20525.0

CodeBase: file:///C:/ProgramData/Rubberduck/System.Windows.Interactivity.DLL

Ninject.Extensions.Conventions Assembly Version: 3.2.0.0 Win32 Version: 3.2.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Ninject.Extensions.Conventions.DLL

Antlr4.Runtime.net45 Assembly Version: 4.3.0.0 Win32 Version: 4.3.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Antlr4.Runtime.net45.DLL

Ninject.Extensions.NamedScope Assembly Version: 3.2.0.0 Win32 Version: 3.2.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Ninject.Extensions.NamedScope.DLL

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

DynamicProxyGenAssembly2 Assembly Version: 0.0.0.0 Win32 Version: 3.2.0.14

CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Core.dll

DynamicProxyGenAssembly2 Assembly Version: 0.0.0.0 Win32 Version: 3.2.0.14

CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Core.dll

WindowsFormsIntegration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll

Infralution.Localization.Wpf Assembly Version: 3.3.0.0 Win32 Version: 3.3.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/Infralution.Localization.Wpf.dll

PresentationFramework.Aero Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll

Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.0.30319.18063 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll

Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

NLog Assembly Version: 4.0.0.0 Win32 Version: 4.0.0.0

CodeBase: file:///C:/ProgramData/Rubberduck/NLog.DLL

System.ServiceModel Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll

System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

PresentationFramework-SystemXml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll

UIAutomationTypes Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll

CustomMarshalers Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll

stdole Assembly Version: 7.0.3300.0 Win32 Version: 7.00.9466

CodeBase: file:///C:/Windows/assembly/GAC/stdole/7.0.3300.0__b03f5f7f11d50a3a/stdole.dll

Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Microsoft.CSharp Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll

PresentationFramework-SystemData Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemData/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemData.dll

System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

LibGit2Sharp Assembly Version: 0.22.0.0 Win32 Version: 0.22.0

CodeBase: file:///C:/ProgramData/Rubberduck/LibGit2Sharp.DLL

\ JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

retailcoder commented 8 years ago

Hmm.. perhaps we should only pick up sink events when the project is in design mode?