[DevExpress Support Team: CLONED FROM T317724: Do I already use CodeRush for Roslyn?]
Hi there
I just decided to uninstall CodeRush for Roslyn because working with it has too many unacceptable side-effects.
The most important is the one, that if you have a Region containing a huge amount of constants and you would like to delete then these constants, VS freezes while increasing the amount of Memory used by 10 MB/s.
The only solution is to uninstall CodeRush for Roslyn and then all works as expected.
The attachment contains the file with the Region named "DataSet Constants"
I don't know whether it depends on the whole solution structure but maybe you can reproduce this behavior on your side by trying to delete this Region.
Any Feedback would greatly appreciated.
Best regards,from Switzerland,
Alex
Visual Studio freezes when a file with many types is being edited
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
Hello Alex,
Thank you for providing the sample file.
I reproduced the issue on it and passed it to our developers for repair. We will notify you when we have any results.
Hello Alex,
We have found and fixed the cause of this issue.
Please use the following link to download the updated build containing the hotfix: CodeRush.Roslyn-1.0.8.1625.vsix and let us know if it help you.
Hi Pavel
This fix doesn't seem to fix anything.
The behavior is the same as before.
Attached you will find the latest logfile.
Best regards,
Alex
Hello Alex,
I am concerned to hear that the hotfix does not help you. I was able to reproduce this issue on my side before, but cannot reproduce any freezing after I have installed the hotfix.
I have attached a screencast that illustrates my attempts. It would be a great help for us if you provide us with a screencast illustrating the problem in action. For instance, you can capture it using a free Jing tool from TechSmith.
We are looking forward to your response.
Hi Pavel
Maybe this ActivityLog entry helps to found the Problem:
CodeRush 2016/01/21 12:06:36.324
1174 ERROR System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List`1.ToArray() at DevExpress.CodeRush.Foundation.Adornments.TextViewAdornmentHolder.GetAllAdornments() at DevExpress.CodeRush.VisualStudio.TextViewObjects.<GetAllAdornments>d__12.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at DevExpress.CodeRush.VisualStudio.VsTextViewCreationListener.WpfTextViewAdornmentLineTransformSource.Microsoft.VisualStudio.Text.Formatting.ILineTransformSource.GetLineTransform(ITextViewLine line, Double yPosition, ViewRelativePosition placement) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.GetLineTransform(ITextViewLine formattedLine, Double yPosition, ViewRelativePosition placement) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.CalculateAndSetTransform(IFormattedLine formattedLine, Double yPosition, ViewRelativePosition placement) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoLayoutDown(ITextSnapshotLine visualLine, Double referenceLine, Double effectiveViewportHeight, Double& distanceBelowReferenceLine, Nullable`1 cancel) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoCompleteLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportHeight, Double& referenceLine, Double& distanceAboveReferenceLine, Double& distanceBelowReferenceLine, Nullable`1 cancel) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.InnerPerformLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight, Boolean preserveViewportTop, Nullable`1 cancel) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight, Boolean preserveViewportTop, Nullable`1 cancel) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshot(TextSnapshotChangedEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshotOnUIThread(TextSnapshotChangedEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnVisualBufferChanged(Object sender, TextContentChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) Editor or Editor Extension 2016/01/21 12:06:42.789
Best regards,
Alex
Hello Alex,
Thank you for providing this information.
I have reviewed our code and fixed this issue. Please use the following link to download the updated build containing the hotfix: CodeRush.Roslyn-1.0.8.1628.vsix.
Hi Pavel
Thanks for the update.
VS doesn't crash but it still freezes.
I just try to delete the mentioned constants section. The waitcursor appears and after 2 Minutes of waiting I kill the process by using the TaskManager.
There's no activitylog entry written for this.
Are you interested in looking on my Screen by using TeamViewer?
Best regards,
Alex
Just restarted vs and received the attached ActivityLog
Thank you for the clarification and providing additional information, Alex.
It is a great option to connect to your machine by using TeamViewer, but we need to do some preparation to make our session more productive.
First, please clarify if you are using CodeRush for Roslyn and CodeRush Classic together? If so, unload CodeRush Classic (by clicking DevExpress -> CodeRush -> Unload ) and try to reproduce the freezing without it.
Second, are you observing full freezing of Visual Studio or just a slowdown? If it is full freezing, it can be related with threads' deadlock. In this case, we would need the call stacks from you received at the moment of the freezing. To capture them, follow the steps described in the Collecting a call stack to track down the cause of VS crash or freeze issues article.
On the other hand, if this issue is a slowdown in the VS operation, we need to collect information about its performance. The best way to do it is to use the PerfView tool from Microsoft. Please install it and perform the steps shown in the attached video. Or, if you have any difficulties with it, we will connect to you by using TeamViewer and will perform these steps on your side.
We greatly appreciate your cooperation.