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

Code completion stops working #7

Closed
gnunn1 opened this issue Dec 16, 2015 · 28 comments
Closed

Code completion stops working #7

gnunn1 opened this issue Dec 16, 2015 · 28 comments

Comments

@gnunn1
Copy link

gnunn1 commented Dec 16, 2015

I'm noticing that from time to time code completion stops working and I have to restart vscode to get it working again. Not sure if this is related to issue #5 or not, but I also see this exception in the developer tools.

TypeError: Cannot read property 'length' of undefined: TypeError: Cannot read property 'length' of undefined
at t.e.validatePosition (/opt/visual-studio-code/resources/app/out/vs/workbench/node/pluginHostProcess.js:17:915)
at t.e.getWordRangeAtPosition (/opt/visual-studio-code/resources/app/out/vs/workbench/node/pluginHostProcess.js:17:1029)
at /home/gnunn/.vscode/extensions/code-d/out/src/workspace-d.js:214:42
at Array.forEach (native)
at /home/gnunn/.vscode/extensions/code-d/out/src/workspace-d.js:213:24
at process._tickCallback (node.js:368:9)

@WebFreak001
Copy link
Member

Thanks, that's the stack trace I've never got to occur in developer mode

@WebFreak001
Copy link
Member

after half an hour of coding it did not crash, so probably this is fixed now

@gnunn1
Copy link
Author

gnunn1 commented Dec 17, 2015

Not working for me, started coding and it promptly failed within a few minutes. Too update do I just need to do a git pull, npm install and the .node compile thing?

The developer tools doesn't look super useful, I just see this:

Plugin Host] Initialized code-d
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1626 Cannot convert undefined or null to object: TypeError: Cannot convert undefined or null to object
    at Function.keys (native)
    at Function.e.adapt (file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1587:29656)
    at file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1587:29463
    at Object.h [as _notify] (file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1544:2124)
    at Object.__dirname.undefined.P.enter (file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1544:5286)
    at __dirname.undefined.t.Class.define._run (file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1544:7112)
    at __dirname.undefined.t.Class.define._completed (file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1544:6553)
    at file:////opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1553:22479
    at /opt/visual-studio-code/resources/app/node_modules/graceful-fs/graceful-fs.js:76:16
    at /opt/visual-studio-code/resources/app/node_modules/graceful-fs/graceful-fs.js:76:16e.onUnexpectedError @ //opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1626
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:3
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Object
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 TypeError: Cannot convert undefined or null to object
    at Function.keys (native)
    at Function.e.adapt (out/vs/workbench/workbench.main.js:1587:29656)
    at out/vs/workbench/workbench.main.js:1587:29463
    at Object.h [as _notify] (out/vs/workbench/workbench.main.js:1544:2124)
    at Object.__dirname.undefined.P.enter (out/vs/workbench/workbench.main.js:1544:5286)
    at __dirname.undefined.t.Class.define._run (out/vs/workbench/workbench.main.js:1544:7112)
    at __dirname.undefined.t.Class.define._completed (out/vs/workbench/workbench.main.js:1544:6553)
    at out/vs/workbench/workbench.main.js:1553:22479
    at /opt/visual-studio-code/resources/app/node_modules/graceful-fs/graceful-fs.js:76:16
    at /opt/visual-studio-code/resources/app/node_modules/graceful-fs/graceful-fs.js:76:16
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] dub is ready
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] DScanner is ready
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] Dfmt is ready
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] DCD is ready
6//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host](anonymous function) @ //opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host](anonymous function) @ workbench.main.js:1602emitTwo @ events.js:87emit @ events.js:172handleMessage @ internal/child_process.js:685channel.onread @ internal/child_process.js:440

Anything I can do to troubleshoot let me know.

@gnunn1
Copy link
Author

gnunn1 commented Dec 17, 2015

Have a look at this link (microsoft/vscode#160) and search for oncancel, there is a post by DerTolleEmil that describes exactly what I am experiencing, maybe the issue is with vscode rather then code-d?

@WebFreak001
Copy link
Member

Hmm actually I dont know if thats really the issue. Im gonna add some debug logs to the console so its easier to find the problem

@WebFreak001
Copy link
Member

OK I've added some debug logs now. I also fixed some rejects which might actually fix the issue. Can you try them?

@WebFreak001
Copy link
Member

assuming fixed

@gnunn1
Copy link
Author

gnunn1 commented Dec 17, 2015

Sorry for the delay, I'm in a different timezone and only code in D as a hobby so evening is when I typically can test things. I'm still having issues, the code completion stops working at some point. Here is what I see in the log:

[Plugin Host] Array[5]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[5]
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[1]
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[5]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[3]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideHover
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideHover
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideHover
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] provideSignatureHelp
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideHover
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideHover
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideHover
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] Array[0]
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] Array[0]length: 0__proto__: Array[0]
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideCompletionItems
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] resolve null
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideSignatureHelp
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideCompletionItems
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideCompletionItems
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] resolve
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] Array[0]
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideCompletionItems
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideCompletionItems
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] provideHover
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 WARNING: Promise with no error callback:undefined
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1550 Error: Promise did not implement oncancel(…)
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] resolve
//opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:1602 [Plugin Host] Array[0]length: 0__proto__: Array[0]
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
2workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
2workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] provideCompletionItems
workbench.main.js:1550 WARNING: Promise with no error callback:undefined
workbench.main.js:1550 Error: Promise did not implement oncancel(…)
workbench.main.js:1602 [Plugin Host] resolve null
workbench.main.js:1602 [Plugin Host] resolve
workbench.main.js:1602 [Plugin Host] []

@WebFreak001
Copy link
Member

So is just completion using DCD broken or does it hang up at "Loading..." in the auto complete? If its the former check if dcd-server is running (the process). If its the latter check if workspace-d and dcd-server are running. If both are running correctly there should actually be no problem. So that would be very weird

@WebFreak001 WebFreak001 reopened this Dec 18, 2015
@gnunn1
Copy link
Author

gnunn1 commented Dec 18, 2015

Both workspace-d and dcd-server are running, however I wonder if dcd-server is hanging. When I try to run dcd-client manually I get the following:

dcd-client -c 5 ~/Development/dlang/terminix/source/app.d 
object.Exception@src/client/client.d(302): Incorrect number of bytes received
----------------
??:? common.messages.AutocompleteResponse client.client.getResponse(std.socket.TcpSocket) [0x4aef29]
??:? _Dmain [0x4ae43d]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x4de106]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x4de05c]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x4de0c2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x4de05c]
??:? _d_run_main [0x4ddfb9]
??:? main [0x4d2335]
??:? __libc_start_main [0x5936660f]

@WebFreak001
Copy link
Member

oh thats weird. Maybe its DCD's fault then? Try dcd-client -c 5 < ~/Development/dlang/terminix/source/app.d - If it doesn't work its most likely DCD's fault

@gnunn1
Copy link
Author

gnunn1 commented Dec 18, 2015

Same exception when I try your line, looks to be an issue with dcd-server. I'll try doing a pull from dcd-server and rebuilding it to see if anything changes with the latest.

@WebFreak001
Copy link
Member

We should also put an issue on their github page if its still there. However we need to find out a way to reproduce it

@gnunn1
Copy link
Author

gnunn1 commented Dec 18, 2015

If I kill dcd-server manually and restart it, will workspace-d still work with the version I started? This way I can at least see what it is outputting. Or alternatively, is there a way to have workspace-d capture it's output?

@WebFreak001
Copy link
Member

workspace-d uses stdout to pass around information. However it logs the stderr. So I can add debug messages there

@WebFreak001
Copy link
Member

ok it's not DCD's fault. That error message happens when the server is not running. So the process was running but the server on it was dead. I have no idea why that happens

@gnunn1
Copy link
Author

gnunn1 commented Dec 19, 2015

I'm confused, isn't it DCD's responsibility to manage the server unless workspace-d is doing something weird with dcd-server as a child process? Anything I can do to help debug this feel free to let me know.

@WebFreak001
Copy link
Member

Im gonna add redirecting stderr output from dcd to workspace-d, so the console shows what the server complains about

@WebFreak001
Copy link
Member

Somehow I can't build workspace-d with dmd 2.069.2 anymore

/usr/bin/ld: skipping incompatible //usr/lib/libcurl.a when searching for -lcurl

@gnunn1
Copy link
Author

gnunn1 commented Dec 21, 2015

I did a pull on workspace-d and it is compiling fine for me using the dmd 2.069.2-2 Arch linux package. Is there anything I can test for you?

@gnunn1
Copy link
Author

gnunn1 commented Jan 6, 2016

So when I started vscode, I noticed that code completion wasn't working. I see the following in the Developer Tools output:

[Plugin Host] Initialized code-d
workbench.main.js:67 [Plugin Host] provideHover
workbench.main.js:67 [Plugin Host] dub is ready
workbench.main.js:67 [Plugin Host] DScanner is ready
workbench.main.js:67 [Plugin Host] Dfmt is ready
workbench.main.js:67 [Plugin Host] Array[6]0: "/home/gnunn/Development/dlang/terminix/source/"1: "/home/gnunn/.dub/packages/gtk-d-3.2.1/srcgstreamer/"2: "/home/gnunn/.dub/packages/gtk-d-3.2.1/src/"3: "/home/gnunn/.dub/packages/gtk-d-3.2.1/srcgl/"4: "/home/gnunn/.dub/packages/gtk-d-3.2.1/srcsv/"5: "/home/gnunn/.dub/packages/gtk-d-3.2.1/srcvte/"length: 6__proto__: Array[0]
workbench.main.js:67 [Plugin Host] DCD is ready
workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:30:05.500:server.d:main:78 Starting up...

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:30:05.500:server.d:loadConfiguredImportDirs:312 Loading configuration from /home/gnunn/.config/dcd/dcd.conf

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:30:05.716:first.d:visit:379 Could not resolve location of module 'ldc/intrinsics'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:30:05.780:first.d:visit:379 Could not resolve location of module 'gcc/builtins'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:30:06.345:server.d:main:114 Import directories:
    /usr/include/dlang/dmd
2016-01-06T17:30:06.345:server.d:main:120 41611 symbols cached.

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:30:06.345:server.d:main:121 Startup completed in 845.554 milliseconds.

workbench.main.js:67 [Plugin Host] provideHover
workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.609:server.d:main:214 Getting doc comment

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'cairo/Context'
2016-01-06T17:
workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 31:05.611:first.d:visit:379 Could not resolve location of module 'gdk/Atom'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gdk/DragContext'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gdk/Event'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gdk/RGBA'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gdkpixbuf/Pixbuf'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gio/ActionMapIF'
2016-01-06T17:31:05.611:first.d:visit:458 Could not reslove location of module 'gio/Menu'
2016-01-06T17:31:05.611:first.d:visit:458 Could not reslove location of module 'gio/MenuItem'
2016-01-06T17:31:
workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 05.611:first.d:visit:458 Could not reslove location of module 'gio/Settings'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gio/SimpleAction'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gio/SimpleActionGroup'
2016-
workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gio/ThemedIcon'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'glib/Regex'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'glib/ShellUtils'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'glib/Str'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'glib/URI'
2016-01-06T17:31:05.611:first.d:visit:458 Could not reslove location of module 'glib/Variant'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.611:first.d:visit:458 Could not reslove location of module 'glib/VariantType'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gtk/Box'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gtk/Button'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gtk/Clipboard'
2016-01-06T17:31:05.611:first.d:visit:379 Could not resolve location of module 'gtk/DragAndDrop'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:31:05.612:first.d:visit:379 Could not resolve location of module 'gtk/EventBox'
2016-01-06T17:31:05.612:first.d:visit:379 Could not resolve location of module 'gtk/Frame'
2016-01-06T17:31:05.612:first.d:visit:379 Could not resolve location of module 'gtk/Image'

@WebFreak001
Copy link
Member

looks like it loaded properly. Can you confirm that /home/gnunn/.dub/packages/gtk-d-3.2.1/src/ exists? Also try some simple tests and not directly gtk. Try completing this:

int foo;

void bar()
{
  fo|

@gnunn1
Copy link
Author

gnunn1 commented Jan 6, 2016

The directory /home/gnunn/.dub/packages/gtk-d-3.2.1/src/ exists, everything except gtk stuff works fine, I see completion on my project classes and structs.

@WebFreak001
Copy link
Member

did you use renamed selective imports? Thats only fixed in the very most recent commit of DCD

@gnunn1
Copy link
Author

gnunn1 commented Jan 6, 2016

Correction, only the classes and structs in the current file resolve, classes in other files do not resolve. Anything gx. is my stuff. I do use selective imports but it doesn't cause everything to fail, just the items that are selectively imported.

06T17:42:15.679:first.d:visit:379 Could not resolve location of module 'gx/i18n/l10n'
2016-01-06T17:42:15.679:first.d:visit:379 Could not resolve location of module 'gx/util/array'

workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 2016-01-06T17:42:15.679:first.d:visit:379 Could not resolve location of module 'gx/terminix/constants'
2016-01-06T17:42:15.679:first.d:visit:379 Could not resolve location of module 'gx/terminix/preferences'
2016-01-06T17:42:15.
workbench.main.js:67 [Plugin Host] WorkspaceD Debug: 679:first.d:visit:379 Could not resolve location of module 'gx/terminix/terminal/actions'
2016-01-06T17:42:15.680:first.d:visit:379 Could not resolve location of module 'gx/terminix/terminal/search'

@WebFreak001
Copy link
Member

What does your folder structure in your project look like?

@gnunn1
Copy link
Author

gnunn1 commented Jan 6, 2016

I follow Java conventions, so each module is in the path of the module name, i.e.

gx.gtk.utils is in the folder gx/gtk/utils

@WebFreak001
Copy link
Member

Discussed and fixed in IRC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants