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

VS 2019 Update 9 Preview 3: IDE is crashing after changing the color of the selected text through Syntax Visualizer. #708

Closed
Raviuppa opened this issue Jan 25, 2021 · 4 comments · Fixed by #709

Comments

@Raviuppa
Copy link

VS IDE is crashing after selecting the desired color to change the selected text. After choosing the color for the 2nd time in which case the Syntax Visualizer and the Propertied Window become blank except the display of newly chosen color and then clicking on it restarts the IDE with System.InvalidOperationException.

0:000> kL5
ChildEBP RetAddr
00 00cfedd8 747728f0 KERNELBASE!RaiseException+0x62
01 00cfee74 74773796 clr!RaiseTheExceptionInternalOnly+0x27c
02 00cfef3c 73c90c39 clr!IL_Throw+0x146
03 00cfef4c 19dbeb4b mscorlib_ni!System.ThrowHelper.ThrowInvalidOperationException+0x39
04 00cff03c 7a4f1f70 Roslyn_SyntaxVisualizer_Control!Roslyn.SyntaxVisualizer.Control.SyntaxVisualizerControl.ColorPickerButton_Click+0x15b

0:000> !u 19dbeb4b
Normal JIT generated code
Roslyn.SyntaxVisualizer.Control.SyntaxVisualizerControl.ColorPickerButton_Click(System.Object, System.Windows.RoutedEventArgs)
Begin 19dbe9f0, size 279

19dbe9f0 55 push ebp
19dbe9f1 8bec mov ebp,esp
19dbe9f3 57 push edi
19dbe9f4 56 push esi
19dbe9f5 53 push ebx
19dbe9f6 81ecdc000000 sub esp,0DCh
19dbe9fc 8bf1 mov esi,ecx
19dbe9fe 8dbd24ffffff lea edi,[ebp-0DCh]
19dbea04 b934000000 mov ecx,34h
19dbea09 33c0 xor eax,eax
19dbea0b f3ab rep stos dword ptr es:[edi]
19dbea0d 8bce mov ecx,esi
19dbea0f 898d20ffffff mov dword ptr [ebp-0E0h],ecx
………………………………………………..
………………………………………………

19dbeb30 8bb520ffffff mov esi,dword ptr [ebp-0E0h]
19dbeb36 81c674010000 add esi,174h
19dbeb3c 803e00 cmp byte ptr [esi],0
19dbeb3f 750a jne
(19dbeb4b)
19dbeb41 b926000000 mov ecx,26h
19dbeb46 e8b520ed59 call mscorlib_ni!System.ThrowHelper.ThrowInvalidOperationException (73c90c00)

19dbeb4b 8d7dc4 lea edi,[ebp-3Ch]

0:000> dc 00cff03c-0E0h
00cfef5c 2916f2c8 00000000 00000000 00000000 ...)............
00cfef6c 00000000 00000000 00000000 00000000 ................
00cfef7c 00000000 00000000 00000000 00000000 ................
00cfef8c 00000000 00000000 00000000 00000000 ................
00cfef9c 00000000 00000000 00000000 00000000 ................
00cfefac 3f800000 3f35581d 3f18e237 3c607eb4 ...?.X5?7..?.~`<
00cfefbc 1fcbdbff 00000000 00000000 00000000 ................
00cfefcc 00000000 00000000 00000000 00000000 ................

0:000> dc 2916f2c8+174h
2916f43c 00000000 00000000 00000000 00000000 ................
2916f44c 00000000 79ed73f0 2916f03c 047e6428 .....s.y<..)(d~.
2916f45c 000001ab 80000000 731324e4 00000047 .........$.sG...
2916f46c 0052002f 0073006f 0079006c 002e006e /.R.o.s.l.y.n...
2916f47c 00790053 0074006e 00780061 00690056 S.y.n.t.a.x.V.i.
2916f48c 00750073 006c0061 007a0069 00720065 s.u.a.l.i.z.e.r.
2916f49c 0043002e 006e006f 00720074 006c006f ..C.o.n.t.r.o.l.
2916f4ac 0063003b 006d006f 006f0070 0065006e ;.c.o.m.p.o.n.e.

0:000> !DumpVC /d 0f5e0c60 2916f43c
Name: System.Nullable`1[[Microsoft.CodeAnalysis.Classification.ClassifiedSpan, Microsoft.CodeAnalysis.Workspaces]]
MethodTable: 0f5e0c60
EEClass: 0f5b751c
Size: 24(0x18) bytes
File: C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
Fields:
MT Field Offset Type VT Attr Value Name
7313878c 400074a 0 System.Boolean 1 instance 0 hasValue
1cabd2c4 400074b 4 ...on.ClassifiedSpan 1 instance 2916f440 value

0:000> !DumpVC /d 1cabd2c4 2916f440
Name: Microsoft.CodeAnalysis.Classification.ClassifiedSpan
MethodTable: 1cabd2c4
EEClass: 1ca58f30
Size: 20(0x14) bytes
File: c:\program files (x86)\microsoft visual studio\2019\preview\common7\ide\commonextensions\microsoft\managedlanguages\vbcsharp\languageservices\Microsoft.CodeAnalysis.Workspaces.dll
Fields:
MT Field Offset Type VT Attr Value Name
731324e4 4000d5c 0 System.String 0 instance 00000000 k__BackingField
1d633b6c 4000d5d 4 ...sis.Text.TextSpan 1 instance 2916f444 k__BackingField

0:000> dc 2916f440
2916f440 00000000 00000000 00000000 00000000 ................
2916f450 79ed73f0 2916f03c 047e6428 000001ab .s.y<..)(d~.....
2916f460 80000000 731324e4 00000047 0052002f .....$.sG.../.R.

@Raviuppa
Copy link
Author

Here are steps to reproduce the problem.

  1. Create a new .NET Core Console Application.
  2. Add a Class called "TestClass"
  3. Highlight "Test Class" and chose View->Other Windows -> Syntax Visualizer to pop up the Syntax Visualizer Window.
  4. Change the color to desired and click OK
  5. Close the Syntax Visualizer Window.
  6. Select and highlight the Text "TestClass" again.
  7. Chose View->Other Windows -> Syntax Visualizer to pop up the Syntax Visualizer Window.
  8. The Visualizer window is blank with just only the color element visible.
  9. Chose the desired color and click OK.

Observed Behavior:
IDE crashes silently and restarts.

Expected Behavior:
The Text color should be changed without any IDE crash and restart.

@ryzngard
Copy link
Contributor

Thanks for filing @Raviuppa! The detailed repro steps are really useful. There seem to be two problems here:

  1. Syntax Visualizer is getting into a state where it won't display anything
  2. Even in that state, the color selector is wrongly being displayed.

I'll look into fixing 2 here. @jmarolf do you know if we have a bug tracking 1?

@ryzngard
Copy link
Contributor

found it #494

@jmarolf
Copy link
Contributor

jmarolf commented Jan 25, 2021

I'll look at #494

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants