Skip to content

Quick fix triggers debug assert #25560

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

Closed
DanielRosenwasser opened this issue Jul 10, 2018 · 3 comments · Fixed by #25623
Closed

Quick fix triggers debug assert #25560

DanielRosenwasser opened this issue Jul 10, 2018 · 3 comments · Fixed by #25623
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@DanielRosenwasser
Copy link
Member

Create an anonymous buffer

let foo = 1;
fooo/**/

Get quick fixes at fooo:

[Error  - 12:55:44 PM] 'getCodeFixes' request failed with error.
Error processing request. Debug Failure. False expression.
Error: Debug Failure. False expression.
    at mapTextChangesToCodeEdits (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119251:22)
    at IOSession.Session.mapTextChangeToCodeEdit (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119077:24)
    at C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119074:73
    at Array.map (native)
    at IOSession.Session.mapTextChangesToCodeEdits (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119074:36)
    at IOSession.Session.mapCodeFixAction (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119070:84)
    at C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119023:96
    at Array.map (native)
    at IOSession.Session.getCodeFixes (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119023:55)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:117896:61)
    at C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119186:88
    at IOSession.Session.executeWithRequestId (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119177:28)
    at IOSession.Session.executeCommand (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119186:33)
    at IOSession.Session.onMessage (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:119206:35)
    at Interface.<anonymous> (C:\Users\Daniel\AppData\Local\nvs\node\10.4.1\x64\node_modules\typescript\lib\tsserver.js:120473:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:191:7)
    at Interface._onLine (readline.js:241:10)
    at Interface._normalWrite (readline.js:384:12)
    at Socket.ondata (readline.js:101:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:560:20)
@mhegazy mhegazy added the Bug A bug in TypeScript label Jul 10, 2018
@DanielRosenwasser DanielRosenwasser changed the title Spelling correction quick fix triggers debug assert Quick fix triggers debug assert Jul 10, 2018
@mhegazy mhegazy added this to the TypeScript 3.0.1 milestone Jul 10, 2018
@mhegazy mhegazy assigned ghost Jul 10, 2018
@DanielRosenwasser
Copy link
Member Author

DanielRosenwasser commented Jul 10, 2018

I suspect this is triggered by the spelling quick fix, but not necessarily caused by logic in it.

@ghost
Copy link

ghost commented Jul 10, 2018

@DanielRosenwasser What editor are you using? What typescript version? I can't seem to reproduce this with [email protected], and get a correct quick fix.

@DanielRosenwasser
Copy link
Member Author

Same TS version - are you using an unsaved buffer?

[Window Title]
Visual Studio Code

[Main Instruction]
Visual Studio Code

[Content]

Version: 1.25.0
Commit: 0f080e5267e829de46638128001aeb7ca2d6d50e
Date: 2018-07-05T13:11:58.697Z
Electron: 1.7.12
Chrome: 58.0.3029.110
Node.js: 7.9.0
V8: 5.8.283.38
Architecture: x64

@ghost ghost added the Fixed A PR has been merged for this issue label Jul 17, 2018
@ghost ghost closed this as completed in #25623 Jul 18, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants