-
Notifications
You must be signed in to change notification settings - Fork 364
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
CodeMaid Handled Exception - IsExternal and GetParentProjectItem #255
Comments
Thanks for reporting the issue. A couple questions:
|
I haven't reproduced the issue yet (using VS2015 Update 1), but I did see an unrelated issue when testing the no-solution scenario and created #256 |
I will try to open the file directly, outside the solution, likely this Thank you. -Dave On 6 April 2016 at 05:07, Steve Cadwallader [email protected]
|
Thanks for the extra details, especially that you were using a Node.JS/Express solution. I have now reproduced the repeated warning messages, but not the hang. NTVS (Node.JS Tools for Visual Studio) does not implement part of the VS API the same as other languages.. which results in the error messages being created. See #107 and #175 for some background on the issue we encountered when originally adding support for NTVS. The workaround is that these methods all have fallback behavior and provide the warning. Since these are "known" exceptions in some scenarios, I have demoted them to only appear when Diagnostics Mode (within CodeMaid->Options) is enabled. Since I didn't reproduce the hang, I don't know if this will address the issue you are seeing. Would you mind testing the latest CI build at http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/ (10.0.76 or higher) to see if that changes the behavior at all? If it doesn't address the issue (which wouldn't surprise me), then this would be a similar issue to #227 where the repeated checking of command availability is causing issues.. and I might consider keeping the commands permanently enabled vs. dynamically enabling/disabling them. That would bypass some state checks until on demand vs. on API demand which is triggered pretty frequently. |
I've updated to the CI build. No change in behaviour. There are no exceptions if I don't have a solution loaded. I have repeated In case it's helpful, I grabbed the diagnostic log when I set focus into ** With solution loaded Also, here is the full info of what I have installed. Please note that I Microsoft Visual Studio Enterprise 2015 Installed Version: Enterprise Architecture and Modeling Tools 00322-90200-03631-AA416 UML® and Unified Modeling Language™ are trademarks or registered trademarks Visual Basic 2015 00322-90200-03631-AA416 Visual C# 2015 00322-90200-03631-AA416 Visual C++ 2015 00322-90200-03631-AA416 Application Insights Tools for Visual Studio Package 5.2.60328.3 ASP.NET and Web Tools 2015 (RC1 Update 1) 14.1.20203.0 ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 ASP.NET Web Frameworks and Tools 2013 5.2.40314.0 Azure App Service Tools v2.9 14.0.20316.0 Azure Data Lake Node 1.0 Azure Data Lake Tools for Visual Studio 2.0.6000.0 CodeMaid 10.0.76 Common Azure Tools 1.7 DataFactoryProject 1.0 GitHub.VisualStudio 1.0 JavaScript Language Service 2.0 JavaScript Project System 2.0 Microsoft Azure Data Factory Node Node 1.0 Microsoft Azure HDInsight HQL Service 2.0.6000.0 Microsoft Azure HDInsight Tools for Visual Studio 2.0.6000.0 Microsoft Azure Mobile Services Tools 1.4 Microsoft Azure Tools 2.9 Microsoft Azure Tools 2.8 Node.js Tools 1.1.40329.04 Node.js Tools - Profiling 1.1.40329.04 NuGet Package Manager 3.4.1 PreEmptive Analytics Visualizer 1.2 SQL Server Data Tools 14.0.60311.1 ToolWindowHostedEditor 1.0 TypeScript 1.8.29.0 Visual Studio Tools for Apache Cordova Update 8 Xamarin 3.11.458.0 (7acdedd) Xamarin.Android 5.1.1.0 (3518c4ceb984ffea1f5d972ea9c09eb27738d565) Xamarin.iOS 8.10.0.0 (7741cc495ab0baf04ff0405d0604bc27f0ecae2e) Xamarin.iOS Unified Migration 1.0 Xamarin.TestCloud.Integration 1.0 Lastly, find attached my project. It's all internet tuturial code to teach I left my mercurial repository and .vs directory in there just in case Please let me know if there's anything I can do to help. -Dave On 6 April 2016 at 18:11, Steve Cadwallader [email protected]
|
Thanks for the testing and additional details.
|
I will try disabling logging. Mercurial stores its repository in the .hg folder in that zip. Thanks. -Dave On 7 April 2016 at 04:26, Steve Cadwallader [email protected]
|
…ks to remain enabled, deferring availability checks to execution time.
I've changed several of the commands that have expensive availability checks to remain enabled and defer availability checks to execution time. I think this may resolve the issue you have been seeing. Can you please test the latest CI build (10.0.81 or higher) available here: http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/ |
That is perfect. Exceptions are gone, also the repeating warnings about Also, CodeMaid has nothing to do with the hanging I have been. Even with -Dave On 9 April 2016 at 04:53, Steve Cadwallader [email protected]
|
Excellent, thanks for confirming. :) |
Environment
Description
After I switch to a window with a simple javascript controller I get repeated exceptions until I switch to a different window. Visual Studio often blocks and may not shut down properly
Steps to recreate
(function (bookController) { bookController.init = function (app) { app.get("/foo", function (req, res) { res.render("index", { firstname: "John", lastname: "Smith", title: "blah" }); }) } })(module.exports);
Current behavior
[CodeMaid Diagnostic 10:53:48 PM] WindowEventListener.OnWindowChange raised for '...\bookController.js'
The following 2 exceptions repeat, typically many times per second:
[CodeMaid Handled Exception 10:53:49 PM] Unable to determine if ProjectItem is external: System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.VisualStudioTools.Project.Automation.OAProjectItem.get_Collection()
at SteveCadwallader.CodeMaid.Helpers.ProjectItemExtensions.IsExternal(ProjectItem projectItem)
[CodeMaid Handled Exception 10:53:49 PM] Unable to retrieve parent ProjectItem: System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.VisualStudioTools.Project.Automation.OAProjectItem.get_Collection()
at SteveCadwallader.CodeMaid.Helpers.ProjectItemExtensions.GetParentProjectItem(ProjectItem projectItem)
If I switch to another window, the exceptions stop
Expected behavior
No exceptions
The text was updated successfully, but these errors were encountered: