Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

2.11.0 Keeps crashing from vscode #83

Closed
testing-in-chrome opened this issue Jul 26, 2017 · 18 comments
Closed

2.11.0 Keeps crashing from vscode #83

testing-in-chrome opened this issue Jul 26, 2017 · 18 comments

Comments

@testing-in-chrome
Copy link

testing-in-chrome commented Jul 26, 2017

I compiled it with the new version of the compiler 2.075.0, and it doesn't work anymore! vscode keeps showing the following notifications:

Workspace-D crashed, please kill dcd-server if necessary.

screenshot

@WebFreak001
Copy link
Member

by the font I assume you are on ubuntu, can you open the developer tools (Ctrl-Shift-P -> Toggle Developer Tools) and send a screenshot from there?

@testing-in-chrome
Copy link
Author

Yes, Ubuntu 16.04.

There you go

screenshot

@testing-in-chrome
Copy link
Author

By the way, in case you are wondering, I'm not going out of memory! I have PLENTY of free memory.

@testing-in-chrome
Copy link
Author

Any updates here? This made me switch to dlang-vscode for now!

@testing-in-chrome
Copy link
Author

This is still not fixed. Please reopen.

screenshot

@WebFreak001 WebFreak001 reopened this Aug 2, 2017
@WebFreak001
Copy link
Member

did you recompile it yet? I didn't push it to auto update in code-d yet

@testing-in-chrome
Copy link
Author

Yes, I did recompile it.

@testing-in-chrome
Copy link
Author

Still happening even with the new beta extension:

2017-08-11T17:04:21.304:extension.d:initialize:150 Starting dub...
2017-08-11T17:04:21.950:app.d:__lambda10:236 Failed processing request: core.exception.OutOfMemoryError@src/core/exception.d(696): Memory allocation failed

{"code":-32603,"data":"core.exception.OutOfMemoryError@src/core/exception.d(696): Memory allocation failed\n----------------","message":"Memory allocation failed"}
2017-08-11T17:04:21.950:jsonrpc.d:send:66 {"error":{"code":-32603,"data":"core.exception.OutOfMemoryError@src/core/exception.d(696): Memory allocation failed\n----------------","message":"Memory allocation failed"},"jsonrpc":"2.0"}

@WebFreak001
Copy link
Member

can you post your uname -a && free -h output?

@testing-in-chrome
Copy link
Author

4.10.0-32-generic Pure-D/serve-d#201~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
total used free shared buff/cache available
Mem: 31G 1.2G 27G 1.2G 2.2G 28G
Swap: 0B 0B 0B

@testing-in-chrome
Copy link
Author

So I reverted back to the previous dmd compiler (DMD 2.074.1) and recompiled both workspace-d and serve-d and everything is now working as expected. It no longer crashes.

So to be clear, this crash only happens when you compile with DMD 2.075.0

I'm surprised that no one else reported this crash. I assume it's because they already have workspace-d compiled from before using the previous dmd version and there's no need to recompile it. But this will certainly be an issue for your new users.

It could be a compiler bug, but you'd probably need to confirm this and why and then file a bug against dmd. If you mainly develop on Windows, please consider reproducing this crash on an Ubuntu virtual machine or something. It happens all the time.

@WebFreak001
Copy link
Member

I only develop on archlinux with dmd v2.075.0 and that bug never happens to me. Does it happen with every project (even a hello world project) or just with a few projects? Well it can't only be DMDs fault because I suppose your projects you compile with DMD work. Can you try disabling the memory error handler (remove source/app.d:359-361), recompile and send me the new stacktrace?

@testing-in-chrome
Copy link
Author

It doesn't crash on a hello world project (though it doesn't work at all -- no autocomplete, no jump to definition, ... nothing), but it crashes on these projects I tried: tilix, dlangui, dlangide, tkd, ... etc.

Removed the lines you suggested, but it doesn't produce any stack traces when it crashes.

@WebFreak001
Copy link
Member

oh right now you need to run it using gdb... uh which isn't possible with code-d/workspace-d but only with serve-d, can you first try if serve-d: install code-d-beta in vscode) crashes and if it does try running it as extension host (install gdbserver, clone code-d, git checkout serve-d, npm install, tsc -p ., open in vscode, go to debug tab, click start && clone serve-d, open in vscode, go to debug tab, select attach to running serve-d instance in the drop down and hit start, click continue a few times if it pauses and wait until the stacktrace.

@testing-in-chrome
Copy link
Author

I haven't had a chance to do what you suggested, and likely I won't have time to do it soon. Please try to repro in a VM. It can easily be repro'd on Ubuntu and OpenSuse Tubmleweed. Just build with the most recent compiler by running ./install.sh, add the resulting bin dir to your $PATH and open vscode on one of the D projects I mentioned before. It crashes right away on initialization.

@WebFreak001
Copy link
Member

no problem in a Ubuntu VM with 2GB memory + 2GB swap, memory usage is constantly around 800mb too

@vladimmi
Copy link

vladimmi commented Nov 25, 2017

Returned to VS Code and D after some time. This still happens under Windows.
Workspace-D crashed. Please kill dcd-server if necessary!
...as notify and...
[Extension Host] WorkspaceD ended with code 3221225477
...only in developer console.
There was (or still is) copy of workspace-d 2.10 - it wasnt crashing, but workspace-d 2.11 and serve-d crash all the time for unknown reason.

@WebFreak001
Copy link
Member

probably fixed with latest versions

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

No branches or pull requests

3 participants