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

Code Inspections not showing anything. #3051

Closed
joshkreud opened this issue Jun 6, 2017 · 15 comments
Closed

Code Inspections not showing anything. #3051

joshkreud opened this issue Jun 6, 2017 · 15 comments
Labels
feature-inspections support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask!

Comments

@joshkreud
Copy link

Hey.
On the Latest Next branch the Code Inspections seem to be broken.

Code Parses just fine for my huge test project. But when i open the code inspection window i ony see spinning ducks :D

The Logs show nothing except for the "Executing Click handler for menu item ..."

And then some "The Thread 0xXXX has ended with code 0"
But i believe these are caused by excel itself.

@retailcoder
Copy link
Member

retailcoder commented Jun 6, 2017

If you have the "run inspections on successful parse" setting unchecked, commits a84065b and d370814 (see #3046) fix this.

@joshkreud
Copy link
Author

I'm not sure where to find this setting. But then i'll wait till the PR passes ^^

@retailcoder
Copy link
Member

It's at the bottom of the "Inspection Settings" tab, in the settings dialog. I literally had forgotten about it, and for months I was wondering why 2.0.13 yielded no inspection results on my work laptop... turns out I had that checkbox unchecked, and then there's that bug with the inspections toolwindow doing stupid things when that checkbox is unchecked.

@joshkreud
Copy link
Author

Okay i just found it (That was hidden very well)
And it is checked. When i uncheck it it results in the spinning again.

@MDoerner
Copy link
Contributor

MDoerner commented Jun 6, 2017

How long have you waited for the inspection results? The inspections can take quite long, especially if there are a lot of results.

In the project I typically use to test the parser performance (about 140 classes and modules combined; parses and resolves currently in 18s) running the inspections takes several minutes.

If I recall correctly, the actual runtime is quite a bit longer than the combined runtime of the inspections themselves. Maybe something is a bit slow in generating the actual results. (I get about 1000 parameter is implicitly by ref and parameter could be by value.)

@Vogel612 Vogel612 added feature-inspections support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask! labels Jun 9, 2017
@joshkreud
Copy link
Author

Okay I tested it again after you merged the PR.

Now it shows me this error after a while when trying to display the inspections.

image

@MDoerner
Copy link
Contributor

@joshuader6 Would it be possible for you to provide the upper part of the exception message? At the moment, we can only see the lower part of the stack trace, but not the actual exception.

@joshkreud
Copy link
Author

joshkreud commented Jun 20, 2017

Oh my bad. I didn't check the full message.

Here Copyed from VS:
im trying to get more info right now.

snahme ausgelöst: "System.MissingMethodException" in mscorlib.dll
Ausnahme ausgelöst: "System.MissingMethodException" in mscorlib.dll
Ausnahme ausgelöst: "System.MissingMethodException" in mscorlib.dll
Ausnahme ausgelöst: "System.MissingMethodException" in mscorlib.dll
"EXCEL.EXE" (CLR v4.0.30319: DefaultDomain): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.resources\v4.0_4.0.0.0_de_b77a5c561934e089\System.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
---- DEBUGASSERTIONSFEHLER ----
---- Kurze Assertionsmeldung ----

---- Lange Assertionsmeldung ----

   bei Rubberduck.Parsing.VBA.Attributes.HasAttributeFor(AnnotationType annotationType, String memberName) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\Attributes.cs:Zeile 83.
   bei Rubberduck.Inspections.Concrete.MissingAttributeInspection.MissingMemberAttributeListener.ExitAnnotation(AnnotationContext context)
   bei Rubberduck.Parsing.Grammar.VBAParser.AnnotationContext.ExitRule(IParseTreeListener listener) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\Grammar\VBAParser.cs:Zeile 19073.
   bei Rubberduck.Parsing.VBA.CombinedParseTreeListener.ExitEveryRule(ParserRuleContext ctx) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\CombinedParseTreeListener.cs:Zeile 33.
   bei Antlr4.Runtime.Tree.ParseTreeWalker.ExitRule(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.Inspections.Rubberduck.Inspections.Inspector.WalkTrees(CodeInspectionSettings settings, RubberduckParserState state, IEnumerable`1 inspections, ParsePass pass)
   bei Rubberduck.Inspections.Rubberduck.Inspections.Inspector.<FindIssuesAsync>d__6.MoveNext()
   bei System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   bei Rubberduck.Inspections.Rubberduck.Inspections.Inspector.FindIssuesAsync(RubberduckParserState state, CancellationToken token)
   bei Rubberduck.UI.Inspections.InspectionResultsViewModel.<RefreshInspections>d__82.MoveNext() in C:\Users\yoshi\Documents\Git\Rubberduck\RetailCoder.VBE\UI\Inspections\InspectionResultsViewModel.cs:Zeile 285.
   bei System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   bei Rubberduck.UI.Inspections.InspectionResultsViewModel.RefreshInspections()
   bei Rubberduck.UI.Inspections.InspectionResultsViewModel.HandleStateChanged(Object sender, EventArgs e) in C:\Users\yoshi\Documents\Git\Rubberduck\RetailCoder.VBE\UI\Inspections\InspectionResultsViewModel.cs:Zeile 276.
   bei System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   bei Rubberduck.Parsing.VBA.RubberduckParserState.OnStateChanged(Object requestor, ParserState state) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:Zeile 332.
   bei Rubberduck.Parsing.VBA.RubberduckParserState.set_Status(ParserState value) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:Zeile 564.
   bei Rubberduck.Parsing.VBA.RubberduckParserState.EvaluateParserState() in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\RubberduckParserState.cs:Zeile 409.
   bei Rubberduck.Parsing.VBA.ParserStateManagerBase.EvaluateOverallParserState(CancellationToken token) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\ParserStateManagerBase.cs:Zeile 41.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ExecuteCommonParseActivities(IReadOnlyCollection`1 toParse, IReadOnlyCollection`1 toReresolveReferencesInput, CancellationToken token) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 276.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 376.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 325.
   bei Rubberduck.Parsing.VBA.ParseCoordinator.<>c__DisplayClass13_0.<ReparseRequested>b__0() in C:\Users\yoshi\Documents\Git\Rubberduck\Rubberduck.Parsing\VBA\ParseCoordinator.cs:Zeile 85.
   bei System.Threading.Tasks.Task.InnerInvoke()
   bei System.Threading.Tasks.Task.Execute()
   bei System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   bei System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   bei System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   bei System.Threading.ThreadPoolWorkQueue.Dispatch()
   bei System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

@joshkreud
Copy link
Author

Okay i can't seem to get any error message out of it.
But this seems to be where the error gets printed:

image

@retailcoder
Copy link
Member

Hmm, that assert should probably be replaced with return false then.

@retailcoder
Copy link
Member

Or something went wrong with my merge...

@joshkreud
Copy link
Author

Okay now the inspections seem to work somehow :)
But when filling the inspections into the form my complete system gets unresponsive for a few minutes.
And even after it displayed all of them, clicking one almost crashes the system again.

@Vogel612
Copy link
Member

@joshuader6 depending on how many inspection results are generated, your system might already be quite busy with just keeping track of them. We used to have a humungous problem with how we displayed inspection results, because every occurrence had it's own row in the grid-view that was always fully rendered, but IIRC that was fixed .

How many inspection results does Rubberduck find?

@joshkreud
Copy link
Author

It's a pretty huge project with ~700 Inspections.

@Vogel612
Copy link
Member

@retailcoder soo .. why is this issue closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-inspections support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask!
Projects
None yet
Development

No branches or pull requests

4 participants