madskristensen / EditorConfigLanguage

A Visual Studio extension
Other
128 stars 37 forks source link

Visual Studio hangs when there are multiple kinds #36

Open red-man opened 6 years ago

red-man commented 6 years ago

Installed product versions

Description

Visual Studio will hang after adding a rule with multiple kinds

Steps to recreate

  1. Add this: csharp_new_line_before_open_brace = control_blocks, methods, properties, types
  2. Hit enter key then start typing a new rule

Current behavior

Visual Studio hangs

Expected behavior

Visual Studio should not hang

madskristensen commented 6 years ago

Can you please try the newly released version to see if the issue has been fixed?

red-man commented 6 years ago

Updated to 1.17.230 and still have the issue. There seems to be a difference between pasting the line "csharp_new_line_before_open_brace = control_blocks, methods, properties, types" vs typing it in. Pasting it and then hitting enter and adding a new rule did not lock VS but when I typed it in and hit enter then started typing a new rule it locked up VS.

madskristensen commented 6 years ago

I can't repro. Can you share the exact .editorconfig file and on what line you add the property?

craigeddy commented 6 years ago

I'm having the same issue. Version 1.17.230, visual studio 15.5.2.

Editor config before locking up:

# Top-most EditorConfig file
root = true

# Tab indentation
[*.cs]
indent_style = space
indent_size = 4

As soon as I new-line after indent_size line and type t, Visual Studio locks up. Task Manager shows S continued & increased CPU and memory usage when this happens.

Hope this helps!

enricoreich commented 6 years ago

I run into the same issue!

Here is my .editorconfig:

root = true

[*]
end_of_line = crlf
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.cs]
dotnet_sort_system_directives_first = true

csharp_new_line_before_open_brace = local_functions,anonymous_types,types,anonymous_methods,methods
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = no_change

csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_for_built_in_types = true:suggestion

[*.md]
trim_trailing_whitespace = false
max_line_length = off

Steps to reproduce

  1. put cursor at end of line 15 (csharp_new_line_before_open_brace)
  2. set a comma after methods
  3. delete it with backspace
  4. put cursor in front of local_functions at line 15
  5. press spacebar

at this point VS gets freezed. My .editorconfig file is in the same directory as the sln file.

vs_highload

Took the screenshot from ProcessHacker. Thread TID 2776 is the troublemaker. After searching the interwebs it looks like it is a old "friend" from the past. Maybe it has something todo with caching.

TheFanatr commented 6 years ago

Same issue. It has happened multiple times in a row with multiple different options. I am now forced to uninstall. It caused me to lose some minor changes in files because Visual Studio would become unresponsive, and would not react to the save command or close button.

TheFanatr commented 6 years ago

I actually decided to keep trying to use the extension, which caused my entire Visual Studio installation to become corrupt and it wouldn't let me open any .csproj files named the same thing as the ones that were in the solution I was using this extension with. It caused that solution to completely break down and made it impossible to reload any project at all. I had to reinstall Visual Studio. Please fix this.

akiraKido commented 6 years ago

Same issue.

wmjordan commented 6 years ago

@craigeddy what you said had happened on my VS as well. Latest extension release, latest VS 2017, Win10.