vs-editor-api icon indicating copy to clipboard operation
vs-editor-api copied to clipboard

Crash by exception when using the non-obsolete constructor of SuggestedActionSet

Open LaraSQP opened this issue 5 years ago • 2 comments
trafficstars

Attached is a sample solution (including the ActivityLog.xml detailing the crash) which has been created by following to the letter the instructions in:

https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/extensibility/walkthrough-displaying-light-bulb-suggestions.md

When using the obsolete constructor (line 90 in TestSuggestedActionsSource.cs), the extension behaves as expected.

When commenting out line 90 and using the non-obsolete constructor in line 91, the extension will throw an exception and crash VS when invoked via the keyboard shortcut.

LightBulbTest.zip

Although unrelated to this particular issue, you guys might want to include a comment somewhere that, when using nested actions in the 'Quick Actions' menu (i.e., effectively, submenus), the return collection in GetActionSetsAsync must apparently be 'Immutable'. Otherwise, undecipherable crashes take place.

LaraSQP avatar Dec 19 '19 06:12 LaraSQP

thanks for reporting this, @LaraSQP, investigating.

olegtk avatar Dec 19 '19 16:12 olegtk

@gundermanc

olegtk avatar Dec 19 '19 16:12 olegtk