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 Resolving #2845

Open
ChriHi opened this Issue Mar 12, 2017 · 14 comments

Comments

6 participants
@ChriHi

ChriHi commented Mar 12, 2017

Hello,
I'm new to rubberduck (and Github for that matter) and wanted to run it for the first time.
However I always get the error "Error Resolving" when opening my Excel project. I enabled logging (trace) and rubberduck creates about 6MB of logfiles. I've attached both logfiles. Any help is very much welcome!
RubberduckLog.txt

RubberduckLog.1.txt

@ChriHi ChriHi changed the title from Error Reolving to Error Resolving Mar 12, 2017

@ThunderFrame

This comment has been minimized.

Member

ThunderFrame commented Mar 12, 2017

Hi and thanks for raising an issue. I've only skimmed the logs, but it would be helpful if you could confirm that your VBA project compiles. Rubberduck relies on the VBA code being in a compilable state.

You can check if your project compiles by choosing Debug..Compile in the VBE.

The errors seem to be occurring with modules.

  • VBAProject.mdlFehlerbehandlung
  • VBAProject.mdlBSSync
  • VBAProject.mdlBSNummernVerbrauchen
  • VBAProject.mdlBSNummernAbrufen

Are you perhaps able to share those modules?

@ChriHi

This comment has been minimized.

ChriHi commented Mar 12, 2017

Hello ThunderFrame! Yes the project does compile without any errors. I can post the module mdlFehlerbehandlung as it is the smallest of those modules you mentioned:

Option Explicit

Function WieWeiterMitFehler(strProzName As String, strModulName As String) As VbMsgBoxResult

On Error Resume Next
Application.ScreenUpdating = True
ThisWorkbook.Sheets("Start").Activate

Workbooks(p_strLokaleBSNr).Close SaveChanges:=True

'TODO
'hier müssen alle Blätter die in manchen prozeduren temporär eingeblendet werden ausgeblendet werden falls ein fehler in der prozedur entsteht

WieWeiterMitFehler = MsgBox("Fehler in '" & strProzName & "' im Modul '" & strModulName & "." & vbLf & vbLf & "Zeile " & Erl() & " (Fehler Nr. " & Err.Number & "): " & _
    Err.Description & vbCrLf & vbCrLf & _
    "Wollen Sie abbrechen, wiederholen oder den Fehler ignorieren?", _
    vbAbortRetryIgnore + vbDefaultButton2, _
    "Nachricht (Version " & p_cstrVersion & ")")

End Function
@Vogel612

This comment has been minimized.

Member

Vogel612 commented Mar 12, 2017

Sometimes I love .NET and sometimes I hate it ... this time I'm not quite sure yet:

2017-03-12 11:49:34.7811;ERROR-2.0.12.688;Rubberduck.Parsing.VBA.ParseCoordinator;Exception thrown resolving 'VBAProject.mdlFehlerbehandlung' (thread 12).;System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
   bei System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
   bei Rubberduck.Parsing.Symbols.DeclarationFinder.FindParameter(Declaration procedure, String parameterName) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Symbols\DeclarationFinder.cs:Zeile 256.
   bei Rubberduck.Parsing.Binding.DefaultBindingContext.<>c__DisplayClass18.<CreateNamedArgumentExpressionCreator>b__17(Declaration calledProcedure) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Binding\DefaultBindingContext.cs:Zeile 200.
   bei Rubberduck.Parsing.Binding.ArgumentListArgument.Resolve(Declaration calledProcedure) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Binding\ArgumentListArgument.cs:Zeile 55.
   bei Rubberduck.Parsing.Binding.IndexDefaultBinding.ResolveArgumentList(Declaration calledProcedure) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Binding\IndexDefaultBinding.cs:Zeile 63.
   bei Rubberduck.Parsing.Binding.IndexDefaultBinding.Resolve() in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Binding\IndexDefaultBinding.cs:Zeile 75.
   bei Rubberduck.Parsing.Binding.DefaultBindingContext.Resolve(Declaration module, Declaration parent, ParserRuleContext expression, IBoundExpression withBlockVariable, StatementResolutionContext statementContext) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Binding\DefaultBindingContext.cs:Zeile 29.
   bei Rubberduck.Parsing.Symbols.IdentifierReferenceResolver.ResolveDefault(ParserRuleContext expression, StatementResolutionContext statementContext, Boolean isAssignmentTarget, Boolean hasExplicitLetStatement) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Symbols\IdentifierReferenceResolver.cs:Zeile 156.
   bei Rubberduck.Parsing.Symbols.IdentifierReferenceListener.EnterCallStmt(CallStmtContext context) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Symbols\IdentifierReferenceListener.cs:Zeile 159.
   bei Rubberduck.Parsing.Grammar.VBAParser.CallStmtContext.EnterRule(IParseTreeListener listener) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\Grammar\VBAParser.cs:Zeile 9981.
   bei Antlr4.Runtime.Tree.ParseTreeWalker.EnterRule(IParseTreeListener listener, IRuleNode r)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t)
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ResolveReferences(DeclarationFinder finder, QualifiedModuleName qualifiedName, IParseTree tree, CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 592.

Seems we're trying to resolve a reference that doesn't exist yet and the Dictionary Lookup blows up here ... @MDoerner you did some major changes around there IIUC. Maybe you can shed some light?

@Vogel612 Vogel612 added the bug label Mar 12, 2017

@MDoerner

This comment has been minimized.

Contributor

MDoerner commented Mar 12, 2017

I cannot reproduce the issue with the current build and the module provided.

@ChriHi Could you try whether the issue still exists with the freshly released hotfix release 2.0.13?

@ChriHi

This comment has been minimized.

ChriHi commented Mar 12, 2017

Hello MDoerner! I installed the hotfix release - thanks for the quick support!
Unfortunately I get an error right when I click refresh. Here's the logfile:

2017-03-12 22:23:38.8346;INFO-2.0.13.25332;Rubberduck.App;Rubberduck version 2.0.13.25332 loading:
	Operating System: Microsoft Windows NT 10.0.14393.0 x64
	Host Product: Microsoft Office 2013 x86
	Host Version: 15.0.4903.1002
	Host Executable: EXCEL.EXE;
2017-03-12 22:23:39.2825;INFO-2.0.13.25332;DynamicInjector750587447c7c461bb918754f998ef75a;Executing version check.;
2017-03-12 22:25:01.7390;DEBUG-2.0.13.25332;Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase;(43084780) Executing click handler for commandbar item 'Pending', hash code 21910925;
2017-03-12 22:25:01.7545;DEBUG-2.0.13.25332;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run started. (thread 12).;
2017-03-12 22:25:04.0828;ERROR-2.0.13.25332;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 12).;System.Runtime.InteropServices.COMException (0x80010105): Ausnahmefehler des Servers. (Ausnahme von HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
   bei Microsoft.Vbe.Interop._VBComponent.get_CodeModule()
   bei Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.get_CodeModule() in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:Zeile 25.
   bei Rubberduck.VBEditor.QualifiedModuleName..ctor(IVBComponent component) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.VBEEditor\QualifiedModuleName.cs:Zeile 54.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.<ParseAllInternal>b__53_1(IVBComponent component) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 728.
   bei System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   bei System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   bei System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 728.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 682.
2017-03-12 22:25:04.0985;DEBUG-2.0.13.25332;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState raised StateChanged (Error);
2017-03-12 22:25:04.4523;DEBUG-2.0.13.25332;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run finished after 2s. (thread 12).;
@ChriHi

This comment has been minimized.

ChriHi commented Mar 12, 2017

btw - I don't know whether this is relevant or not but I do not recognize the path "C:\Users\hosch..." mentioned in the logfile. There is no such User on my System.

@retailcoder

This comment has been minimized.

Member

retailcoder commented Mar 12, 2017

@ChriHi that's just debugging information - it's the build path of the release, which @Hosch250 built for us.

@retailcoder

This comment has been minimized.

Member

retailcoder commented Mar 12, 2017

@ChriHi I suspect this would be an intermittent/unpredictable issue that doesn't reliably occur (COM interop is fun like that!) - does it happen again if you exit completely and restart Excel?

@ChriHi

This comment has been minimized.

ChriHi commented Mar 12, 2017

Just to be sure I rebooted Windows. I still get the error but this time I first got a messagebox saying "not enough memory".

As I mentioned before I am completely new to rubberduck. Are there maybe any settings I have to check or any (obvious) mistakes, maybe some libraries you are not supposed to use?

@retailcoder

This comment has been minimized.

Member

retailcoder commented Mar 12, 2017

@ChriHi we'd like Rubberduck to "just work" with everything people can throw at it - that OOM message is worrying me. Are you loading the VBE with an empty VBA project? If not, what libraries are you referencing? Is there anything in the logs about that error?

@ChriHi

This comment has been minimized.

ChriHi commented Mar 12, 2017

heres the logfile from after the reboot:

2017-03-12 23:03:02.1035;INFO-2.0.13.25332;Rubberduck.App;Rubberduck version 2.0.13.25332 loading:
	Operating System: Microsoft Windows NT 10.0.14393.0 x64
	Host Product: Microsoft Office 2013 x86
	Host Version: 15.0.4903.1002
	Host Executable: EXCEL.EXE;
2017-03-12 23:03:02.5647;INFO-2.0.13.25332;DynamicInjector09e7d4cecc674e55807cbe756139b77e;Executing version check.;
2017-03-12 23:03:17.2052;DEBUG-2.0.13.25332;Rubberduck.UI.Command.MenuItems.CommandBars.AppCommandBarBase;(43084780) Executing click handler for commandbar item 'Pending', hash code 21910925;
2017-03-12 23:03:17.2206;DEBUG-2.0.13.25332;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run started. (thread 6).;
2017-03-12 23:03:23.5567;ERROR-2.0.13.25332;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 6).;System.Runtime.InteropServices.COMException (0x80004005): Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler zurückgegeben.
   bei Microsoft.Vbe.Interop._VBComponent.get_CodeModule()
   bei Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.get_CodeModule() in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:Zeile 25.
   bei Rubberduck.VBEditor.QualifiedModuleName..ctor(IVBComponent component) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.VBEEditor\QualifiedModuleName.cs:Zeile 54.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.<ParseAllInternal>b__53_1(IVBComponent component) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 728.
   bei System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   bei System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   bei System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 728.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 682.
2017-03-12 23:03:23.5878;DEBUG-2.0.13.25332;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState raised StateChanged (Error);
2017-03-12 23:03:23.9560;DEBUG-2.0.13.25332;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run finished after 6s. (thread 6).;

I do open a .xlsm file with quite some code in it (like module I posted earlier). When opening VBE/rubberduck from a newly created/empty file everything works just fine. However even when quitting this empty file I also do get the crash on exit mentioned in the known issues.

My project uses the following libraries:

  • Visual Basis For Applications
  • Microsoft Excel 15.0 Object Library
  • OLE Automation
  • Microsoft Office 15.0 Object Library
  • Microsoft Forms 2.0 Object Library
  • Microsoft ActiveX Data Objects Library
  • Microsoft Windows Common Controls 6.0
@comintern

This comment has been minimized.

Contributor

comintern commented Mar 12, 2017

Do you have any other VBE add-ins installed?

@ChriHi

This comment has been minimized.

ChriHi commented Mar 12, 2017

no, this is the first add-in i've ever used.

@retailcoder

This comment has been minimized.

Member

retailcoder commented Aug 19, 2017

Can you repro with the latest 2.1 pre-release build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment