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

GUI hangs when intellisense opens that shows specific function doc comment #46428

Closed
mgroenhoff opened this issue Mar 23, 2018 · 3 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@mgroenhoff
Copy link

mgroenhoff commented Mar 23, 2018

Issue Type: Bug

When going from this.CONSUME to this.CONSUME1 the GUI hangs when trying to show the function do comment

// index.js
const { Parser } = require('chevrotain');
new Parser().CONSUME // when typing "1" after this it hangs

I tried to find out what caused the hang and if i remove the <-- in the this.CONSUME2(Identifier); // <-- here we use CONSUME2 because the terminal part in the comment below it does not crash anymore.

// This file is a typings file from the chevrotain module (https://github.com/SAP/chevrotain)
// node_modules/chevrotain/lib/chevrotain.d.ts
    /**
     *
     * A Parsing DSL method use to consume a single terminal Token.
     * a Token will be consumed, IFF the next token in the token vector matches <tokType>.
     * otherwise the parser will attempt to perform error recovery.
     *
     * The index in the method name indicates the unique occurrence of a terminal consumption
     * inside a the top level rule. What this means is that if a terminal appears
     * more than once in a single rule, each appearance must have a difference index.
     *
     * for example:
     *
     * function parseQualifiedName() {
     *    this.CONSUME1(Identifier);
     *    this.MANY(()=> {
     *       this.CONSUME1(Dot);
     *       this.CONSUME2(Identifier); // <-- here we use CONSUME2 because the terminal
     *    });                           //     'Identifier' has already appeared previously in the
     *                                  //     the rule 'parseQualifiedName'
     * }
     *
     * @param tokType - The Type of the token to be consumed.
     * @param options - optional properties to modify the behavior of CONSUME.
     */
    protected CONSUME1(tokType: TokenType, options?: ConsumeMethodOpts): IToken;

VS Code version: Code - Insiders 1.22.0-insider (b753213, 2018-03-22T06:16:52.928Z)
OS version: Windows_NT x64 10.0.16299
This also happens using the latest stable 1.21.1

Reproduces without extensions

@vscodebot vscodebot bot added the javascript JavaScript support issues label Mar 23, 2018
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug and removed javascript JavaScript support issues labels Mar 23, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Mar 23, 2018

Caused by catastrophic regular expression backtracking bug in marked. Will update marked version

@mjbvz mjbvz added this to the March 2018 milestone Mar 23, 2018
@mjbvz mjbvz closed this as completed in c6b1114 Mar 23, 2018
@mgroenhoff
Copy link
Author

Verified using:

Version 1.22.0-insider
Commit a918e7b3ef2feaf2c9fbf003e936084eaaf53f76
Date 2018-03-26T05:16:34.852Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Thanks for the quick fix!

@dbaeumer dbaeumer added the verified Verification succeeded label Mar 29, 2018
@dbaeumer
Copy link
Member

Marking as verified based on #46428 (comment)

@vscodebot vscodebot bot locked and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants