Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 512136

Summary: Orion frozen after a "special" COPY or TYPE operation(happens every time)
Product: [ECD] Orion Reporter: XinYi Jiang <xinyij>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: curtis.windatt.public, steve_northover
Version: 13.0   
Target Milestone: 14.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description XinYi Jiang CLA 2017-02-13 12:46:53 EST
The exact steps I did: 
1:Use Orion to open the workspace where org.eclipse.orion.client project exists.
2: go to /modules/orionode/lib/cf/target.js line 167
3: copy the parsebody function name
4: go to /modules/orionode/lib/cf/orgs_spaces.js line 30, 
   originally the line was "getOrgsRequest(req.user.username, targetRequest)"
5: now before targetRequest type: "target.", then press "CTRL+V" to copy
6: Orion frozen.
Comment 1 XinYi Jiang CLA 2017-02-13 13:51:02 EST
Doesn't have to copy, just type "target.p", Orion will frozen.
Comment 2 Curtis Windatt CLA 2017-02-13 15:03:39 EST
Excellent find!  The JavaScript content assist signature parsing function is stuck in an infinite loop.
Comment 3 Curtis Windatt CLA 2017-02-13 15:33:09 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0546b34d1dbebfdb0c7fe325c44d4d54763ffc12
Fixed in master with test case

If there is a - in the parameter of a function, the signature will contain a -.  When parsing the signature, if a dash is found we look ahead to see if it is an arrow ->.  Problem was there is no else case for the lookahead check resulting in the while loop repeating infinitely.

Great catch XinYi.
Comment 4 Curtis Windatt CLA 2017-02-13 15:33:31 EST
Fixed