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 Inspection freezes when using the disable this Inspection feature #4637

Closed
CharlesRHall opened this issue Dec 13, 2018 · 6 comments
Closed
Assignees
Labels
bug Identifies work items for known bugs difficulty-02-ducky Resolving these involves the internal API, but with relatively easy problems to solve. has-workaround There is some way of working around this limitation / bug that is confirmed to work user-interface This issue explicitly relates to the visible interface of Rubberduck.
Milestone

Comments

@CharlesRHall
Copy link

the ducks start spinning and it never returns - can close and reopne, but the ducks are still spinning - must close excel - arghhh

@comintern comintern added bug Identifies work items for known bugs user-interface This issue explicitly relates to the visible interface of Rubberduck. critical Marks a bug as a must-fix, showstopper issue difficulty-02-ducky Resolving these involves the internal API, but with relatively easy problems to solve. labels Dec 13, 2018
@comintern comintern added this to the 2.4.0 milestone Dec 13, 2018
@retailcoder retailcoder changed the title Code Inspection freezes when using the Delete this Inspection feature Code Inspection freezes when using the disable this Inspection feature Dec 14, 2018
@retailcoder
Copy link
Member

Must be a bug with the busy state of the inspection results viewmodel - triggering a reparse from the RD commandbar or main menu should bring it back to normal, after a successful parse and inspection run.

@retailcoder
Copy link
Member

My guess is that the parser state says "I'm already all up-to-date" and never fires a "state changed" event with the "ready" state the viewmodel is expecting; if that's the case then modifying the content of a single module (a single character suffices) and reparsing, would fix the state glitch.

@retailcoder retailcoder added has-workaround There is some way of working around this limitation / bug that is confirmed to work and removed critical Marks a bug as a must-fix, showstopper issue labels Dec 14, 2018
@comintern
Copy link
Contributor

Replicated locally. This appears to be due to the command not running on the UI thread.

Exception thrown: 'System.ArgumentException' in Rubberduck.VBEditor.dll
2018-12-13 17:53:39.0483;ERROR;Rubberduck.UI.Command.ReparseCommand;System.ArgumentException: Expected COM object, but validation failed.
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper..ctor(IntPtr rawObjectPtr, Boolean isRefCountedInput) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibs.cs:line 196
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper.FromVBProject(IVBProject vbProject) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibs.cs:line 176
   at Rubberduck.VBEditor.ComManagement.TypeLibsAPI.VBETypeLibsAPI.CompileProject(IVBProject project) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibsAPI.cs:line 124
   at Rubberduck.UI.Command.ReparseCommand.AreAllProjectsCompiled(List`1& failedNames) in C:\Rubberduck\Rubberduck.Core\UI\Command\ReparseCommand.cs:line 91
   at Rubberduck.UI.Command.ReparseCommand.OnExecute(Object parameter) in C:\Rubberduck\Rubberduck.Core\UI\Command\ReparseCommand.cs:line 56
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\Rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 47;System.ArgumentException: Expected COM object, but validation failed.
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper..ctor(IntPtr rawObjectPtr, Boolean isRefCountedInput) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibs.cs:line 196
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper.FromVBProject(IVBProject vbProject) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibs.cs:line 176
   at Rubberduck.VBEditor.ComManagement.TypeLibsAPI.VBETypeLibsAPI.CompileProject(IVBProject project) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibsAPI.cs:line 124
   at Rubberduck.UI.Command.ReparseCommand.AreAllProjectsCompiled(List`1& failedNames) in C:\Rubberduck\Rubberduck.Core\UI\Command\ReparseCommand.cs:line 91
   at Rubberduck.UI.Command.ReparseCommand.OnExecute(Object parameter) in C:\Rubberduck\Rubberduck.Core\UI\Command\ReparseCommand.cs:line 56
   at Rubberduck.UI.Command.CommandBase.Execute(Object parameter) in C:\Rubberduck\Rubberduck.Core\UI\Command\CommandBase.cs:line 47

@retailcoder
Copy link
Member

Hmm.. Ignore what I said then - this is another thing entirely. That said there is a busy state glitch when a reparse is requested from the inspection results toolwindow, and then cancelled ...but for that the code must be uncompilable and the parser setting for 'compile before parse' must be enabled.

@MDoerner
Copy link
Contributor

The exception from the log above essentially has the same effect as canceling at that specific point.

BTW, we fire a state change to Ready on every successful parse, no matter whether there were changes or not.

@MDoerner
Copy link
Contributor

The offending line is

Task.Run(() => _configService.SaveConfiguration(config)).ContinueWith(t => RefreshCommand.Execute(null));
.

@comintern comintern self-assigned this Jan 16, 2019
@MDoerner MDoerner modified the milestones: 2.4.0, 2.x Cycle Jan 22, 2019
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 difficulty-02-ducky Resolving these involves the internal API, but with relatively easy problems to solve. has-workaround There is some way of working around this limitation / bug that is confirmed to work user-interface This issue explicitly relates to the visible interface of Rubberduck.
Projects
None yet
Development

No branches or pull requests

4 participants