Pure-D / workspace-d

CLI deprecated, API + functionality moved into https://github.com/Pure-D/serve-d
MIT License
75 stars 15 forks source link

2.11.0 Keeps crashing from vscode #83

Closed testing-in-chrome closed 4 years ago

testing-in-chrome commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Yes, Ubuntu 16.04.

There you go

screenshot

testing-in-chrome commented 7 years ago

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

testing-in-chrome commented 7 years ago

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

testing-in-chrome commented 7 years ago

This is still not fixed. Please reopen.

screenshot

WebFreak001 commented 7 years ago

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

testing-in-chrome commented 7 years ago

Yes, I did recompile it.

testing-in-chrome commented 7 years ago

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 commented 7 years ago

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

testing-in-chrome commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

vladimmi commented 6 years ago

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 commented 4 years ago

probably fixed with latest versions