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

Error: Extension host terminated unexpectedly #36843

Closed
jdhines opened this issue Oct 24, 2017 · 22 comments
Closed

Error: Extension host terminated unexpectedly #36843

jdhines opened this issue Oct 24, 2017 · 22 comments
Assignees
Labels
extension-host Extension host issues info-needed Issue requires more information from poster

Comments

@jdhines
Copy link

jdhines commented Oct 24, 2017

  • VSCode Version: 1.17.2 (normal), Code - Insiders 1.18.0-insider (aaec298, 2017-10-24T04:19:43.883Z)
  • OS Version: Windows_NT x64 6.1.7601
  • Extensions: none

Steps to Reproduce:

  1. Updated to version 1.17.2 (also tried installing Insiders just now)
  2. Start up VS Code, get the error
    extension_host_error
  3. Restart extension host a bunch of times, no change.

Reproduces without extensions: No, because it seems to be some problem with the extension system

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Oct 24, 2017
@dbaeumer dbaeumer added extension-host Extension host issues and removed extensions Issues concerning extensions labels Oct 25, 2017
@dbaeumer
Copy link
Member

/cc @jrieken

@alexdima
Copy link
Member

@jdhines Do you have git installed on your machine ?

@alexdima alexdima added the info-needed Issue requires more information from poster label Oct 25, 2017
@jdhines
Copy link
Author

jdhines commented Oct 25, 2017

Yes, I do.

@alexdima
Copy link
Member

Ok, let's try to see if this is a problem with any of the built-in extensions.

Assuming you have installed VS Code Insiders at C:\VSCode\. Could you please rename the folder C:\VSCode\resources\app\extensions to extensions.old and create a new empty folder called extensions.

This will make it so we start an extension host process without any extensions.

@Dante-101
Copy link

Is it possible to print out the name of the extension which crashed? Elimination by trial leads to a lot of wasted time.

@joaomoreno
Copy link
Member

ping @jdhines

@jdhines
Copy link
Author

jdhines commented Nov 1, 2017

@alexandrudima @joaomoreno So sorry for the absence, haven't needed to use VS Code on my PC for several days. I renamed the extensions folder and created a new one, and then Insiders opened without error. I then installed VSCode Icons and enabled it, which is working fine.
I don't understand why the new extensions folder is completely empty though, but I'm not sure enough about the inner workings to know if I should expect to see anything in there anyway.

@alexdima
Copy link
Member

alexdima commented Nov 1, 2017

@jdhines Thank you. This implies that one of the built-in extensions is causing the crash. The following built-in extensions are activated on startup:

  • emmet
  • git
  • merge-conflict

Can you please add these folders back in to the extensions folder one-by-one until we establish which one of the built-in extensions causes the crash ?

@alexdima alexdima assigned ramya-rao-a and chrmarti and unassigned alexdima Nov 1, 2017
@jdhines
Copy link
Author

jdhines commented Nov 1, 2017

I added each one in turn, restarting VS Code Insiders each time, and the error did not pop up again. But there were a ton more extensions in the extensions.old folder, as you can see. Besides the VS Code Icons extension I just mentioned, I didn't install anything else, so this was all from a fresh install of Insiders. Just for kicks, I went back and re-renamed extensions.old => extensions and restarted, and no error!

Given that, I fired up regular VS Code, and no error there either! So it doesn't make sense, but it seems like renaming and then switching back the extensions folder in Insiders fixed both versions, at least for the time being.

vscode_extensions

@alexdima
Copy link
Member

alexdima commented Nov 1, 2017

@jdhines Most likely something else changed in the past week on your environment... now that the crash is not reproducible ...

@jdhines
Copy link
Author

jdhines commented Nov 1, 2017

I don't think so, because I fired up Insiders today before renaming the extensions folder as you suggested, and was still getting the error. Seems like renaming it "shook" things somehow to get it back in order.

@alexdima
Copy link
Member

alexdima commented Nov 1, 2017

I don't think so, because I fired up Insiders today before renaming the extensions folder as you suggested, and was still getting the error. Seems like renaming it "shook" things somehow to get it back in order.

This is super-confusing for me. On each startup we do a readdir in the extensions folder to discover extensions. There is no state saved in between launches that would get changed, we don't cache anything and always read the extensions from this folder again, on each start-up.

Also, VS Code and VS Code Insiders have different installation paths and different extensions folder, so changing something for the VS Code Insiders (renaming extensions to extensions.old and back) should have no effect on VS Code.

I am really puzzled as to what causes the crash now...

@joaomoreno
Copy link
Member

Wow. So you can't reproduce the issue in any way any more, @jdhines?

@jdhines
Copy link
Author

jdhines commented Nov 1, 2017

I just uninstalled Insiders and reinstalled the same version (since it was still in my Downloads folder): 1.18.0-insider, commit aaec298...

And the error is back. So I guess you could say it's reproducible.

@jdhines
Copy link
Author

jdhines commented Nov 1, 2017

Interestingly, even with a fresh install (and having removed the VS Code Insiders folder from Program Files), the VS Code Icons extensions is still active and working. According to the message in the dev tools, it's pulling from C:\users\jdhines\.vscode-insiders\extensions\robertohuertoasm.vscode-icons-7.17.0... which is the only thing in that folder, and the extensions folder is the only thing in .vscode-extensions
Probably not pertinent, except to say that even though the Extension host is terminating, extensions still work.

I haven't tried renaming the other extensions folder yet.

@joaomoreno
Copy link
Member

@jdhines Can you try something out for me? Edit app/extensions/git/out/git.js (within VS Code's installation folder) and comment out the following line. It should be around line 82.

        .then(void 0, () => findSpecificGit('git'));

Does the issue still reproduce with that commented out?

@jdhines
Copy link
Author

jdhines commented Nov 1, 2017

Commented out that line then started up Insiders; no error.
Un-commented the line and restarted Insiders; still no error.

Makes it seem like making any changes to or within extensions is analogous to smacking the computer to get it to work, except that in this case it keeps working.

@joaomoreno
Copy link
Member

OK. How about this build? Can you reproduce it at all with it? Work for a while, make some changes, wait a few minutes before giving up.

@vscodebot vscodebot bot closed this as completed Nov 9, 2017
@vscodebot
Copy link

vscodebot bot commented Nov 9, 2017

This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our guidelines for filing issues. Thank you for your contributions.

@joaomoreno joaomoreno reopened this Nov 9, 2017
@joaomoreno
Copy link
Member

@jdhines

@joaomoreno
Copy link
Member

Closing as duplicate of #32739

@jdhines
Copy link
Author

jdhines commented Nov 17, 2017

Sorry, just been working hard on something else, haven't had time to get back to playing with this on my other computer, but I will update here if I found out anything.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extension-host Extension host issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants