LoginSignup
63
14

More than 3 years have passed since last update.

VSCode、突然消える

Last updated at Posted at 2019-10-18

現象

Visual Studio CodeそのものがPCから消失。
error.png

特に何か作業をしていたわけではなく、起動した状態で放置していました。
ちなみにこの現象が起こる直前では、起動中のVSCodeを[×]ボタンから終了したとき、何やらエラーダイアログが表示されていましたが、気にせずそっ閉じ:stuck_out_tongue_closed_eyes:
再度、起動しようとしたとき上記のショートカットエラーが発生し、問題が発覚しました。

VSCode更新中にシャットダウンしたことが原因?

この問題について少し調べてみたところ、2018年にGitHubのissueでも取り上げられています。
それによると、どうやらアップデート中にシャットダウンされるとこの現象が発生するようです。
私の場合、ここ最近シャットダウンした覚えはないのですが...。

私の環境にインストールしていた2019年10月版のアップデートでも同様に発生していることから、この問題の解消は行われていないということでしょうか。

再インストールする

この問題が発生したら、再インストールしましょう。それが手っ取り早い。
ちなみに、拡張機能は残っております。

【参考】VSCodeアップデーターのログ

以下のところにVSCodeのアップデーターのログが出力されています(Xは数字が当てはまります)。
C:\Users\(USER)\AppData\Local\Temp\vscode-inno-updater-XXXXXXXXXX.log
以下は、そのログファイルの末尾数行分を載せています。

vscode-inno-updater-XXXXXXXXXX.log

Oct 18 20:10:03.103 INFO All files deleted
Oct 18 20:10:03.103 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 1)
Oct 18 20:10:03.154 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 2)
Oct 18 20:10:03.356 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 3)
Oct 18 20:10:03.807 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 4)
Oct 18 20:10:04.609 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 5)
Oct 18 20:10:05.861 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 6)
Oct 18 20:10:07.662 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 7)
Oct 18 20:10:10.114 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 8)
Oct 18 20:10:13.314 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 9)
Oct 18 20:10:17.366 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 10)
Oct 18 20:10:22.367 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 11)
Oct 18 20:10:31.521 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 1)
Oct 18 20:10:31.573 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 2)
Oct 18 20:10:31.773 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 3)
Oct 18 20:10:32.224 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 4)
Oct 18 20:10:33.025 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 5)
Oct 18 20:10:34.276 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 6)
Oct 18 20:10:36.077 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 7)
Oct 18 20:10:38.528 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 8)
Oct 18 20:10:41.728 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 9)
Oct 18 20:10:45.779 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 10)
Oct 18 20:10:50.780 INFO Delete directory recursively: "C:\\Users\\(USER)\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 11)
Oct 18 20:10:54.864 ERRO プロセスはファイルにアクセスできません。別のプロセスが使用中です。 (os error 32)

そういえば、VSCodeを終了した時に表示されたエラーダイアログに「プロセスはファイルにアクセスできません。別のプロセスが使用中です。 (os error 32)」と書かれていたような...:thinking:

63
14
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
63
14