1

Closed

type(lambda: _) crashes Visual Studio if encountered in a file

description

Reproduction steps:
  1. Create a file test.py with content: type(lambda: _) or type(lambda_: _)
  2. Open this file in Visual Studio with PTVS
  3. Watch it crash

I am using Visual Studio 2013 with PTVS 2.0 in Windows 8.1.

I've attached the steps recorded with Steps Recorder.

file attachments

Closed May 2 at 4:44 PM by Zooba

comments

Zooba wrote May 1 at 8:53 PM

If you open Event Viewer and look in the Application log, you should find some recent entries called Application Error and/or .NET Runtime. The detailed information in there (especially the stack trace, if there is one) will be very helpful to us.

moigagoo wrote May 2 at 7:50 AM

Sure, will do as soon as I can.

Have you tried reproducing the issue so far?

moigagoo wrote May 2 at 8:01 AM

Here you go.

I've reproduced the issue this time by just typing type(lambda: _) in a function annotation in an existing Python file. VS crashed immediately as I finished typing, no file saving required.

Attached are the two events you mentioned earlier.

Zooba wrote May 2 at 4:44 PM

This is the same error as https://pytools.codeplex.com/workitem/1977 (it's the annotation part that's the problem, not the lambda itself), and we've already fixed it for 2.1. You can grab the 2.1 Beta if you need the fix and are willing to risk some other instability (though it's been out for almost a month and nothing too bad has come up, so it's probably okay :) ).