vscode-markdown-notes icon indicating copy to clipboard operation
vscode-markdown-notes copied to clipboard

Extension host terminated unexpectedly.

Open RustyWraith opened this issue 4 years ago • 14 comments

Enabling the extension causes the "Extension host terminated unexpectedly" error. image

Versions Version: 1.55.0-insider Commit: a6f6b4aa8e3a688d9a5cbcd5df14af511ce2bd8e Date: 2021-03-23T05:28:25.637Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT ia32 10.0.18363

RustyWraith avatar Mar 23 '21 13:03 RustyWraith

Hmm, I am running with no errors on Insiders:

Version: 1.55.0-insider
Commit: 469e4f6e2755b220dae3eccb04d1ddc587b84a5a
Date: 2021-03-22T05:14:29.671Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 20.3.0

Are you able to get any more detailed logs?

kortina avatar Mar 23 '21 14:03 kortina

Anyone else having this issue?

kortina avatar Mar 23 '21 14:03 kortina

image image log.log

RustyWraith avatar Mar 23 '21 15:03 RustyWraith

From a quick look, it appears maybe you do not have git installed and this is a dependency? Can you confirm?

  1. quickfix: install git
  2. mid term: we can try to have a fallback, but this may really impact performance, so you prolly want to do (1) anyway

Surprised this has never come up before if this is the root cause...

Confirmed git is a dep: https://github.com/kortina/vscode-markdown-notes/blob/master/src/findNonIgnoredFiles.ts#L26

kortina avatar Mar 23 '21 16:03 kortina

I've installed git system-wide and added path to git_path: image The error changed:

findNonIgnoredFiles-git-exec-error Error: Command failed: git check-ignore fatal: not a git repository (or any of the parent directories): .git

The Extension crushes only if specific folder is being opened:

D:\backup\Gdrive\LOGBOOK\Обработка_результатов

Could it be almighty Russian "I'll slip into you path and break everything" Cyrillic?

UPD: Still a crash after a directory renamed.

RustyWraith avatar Mar 23 '21 16:03 RustyWraith

Maybe. Do you still get a crash if you checkout the source for this repo and open the test dir: https://github.com/kortina/vscode-markdown-notes/tree/master/test

kortina avatar Mar 23 '21 17:03 kortina

Works fine. image Some folders cause crashes: image I have no idea, what crashing folders have in common.

RustyWraith avatar Mar 23 '21 17:03 RustyWraith

Maybe find 1 crashing folder, and then go through and remove all files except 1 for each file and see if you can isolate the crash to a specific file causing it?

kortina avatar Mar 23 '21 17:03 kortina

It's somehow connected with total size of .txt files. If any (I didn't test all of them, only tested a few) .txt of size 20+MB is deleted, the error is gone. image

RustyWraith avatar Mar 23 '21 18:03 RustyWraith

First of all, thanks for this great extension! It makes note-keeping in VSCode with Foam much more slick and fun.

I'm experiencing similar behavior, in that Markdown Notes seems to be crashing the extension host, but a different error message in the VSCode console.

Screen Shot 2021-06-12 at 23 07 18

I don't understand why it fails to find /bin/sh which is assuredly present.

When I disable Markdown Notes and reload the VSCode window, the extension host no longer crashes.

I'm installing Insiders now to test there as well.

krry avatar Jun 13 '21 06:06 krry

Similar issue: Screenshot from 2022-09-21 17-42-01

crashing the extensions and VS code itself.

jeffmcneill avatar Sep 21 '22 10:09 jeffmcneill

I'm unable to replicate this issue.

@jeffmcneill what OS are you on? How many files and folders are in the project folder you're trying to use the extension with? (Maybe a project size issue similar to @RustyWraith's?)

kortina avatar Sep 21 '22 11:09 kortina

@kortina

  • Debian Testing
  • VS Code 1.71.2
  • Project folder has a large number of files and folders, as I use this as a general text editor. Hundreds of folders, thousands of files. Does the extension try and read those files/folders in some way?

jeffmcneill avatar Sep 21 '22 12:09 jeffmcneill

Yes, it parses the contents of every file to find backlinks and tags. It probably won't work for such a large project folder. Long term it probably makes more sense to move all of this to a language server / background process, but that's not the way it works today. Sorry!

kortina avatar Sep 21 '22 14:09 kortina