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

Bug: The extension errors when working with dotfiles #854

Open
ppseprus opened this issue Jun 21, 2024 · 1 comment
Open

Bug: The extension errors when working with dotfiles #854

ppseprus opened this issue Jun 21, 2024 · 1 comment

Comments

@ppseprus
Copy link

ppseprus commented Jun 21, 2024

Steps to Reproduce

  1. Open the Command Palette (Cmd + Shift + P) and hit "Profiles: Create Profile..." to create an empty VSCode profile with no extensions and no configurations
  2. Install the ToDo Tree extension
  3. Open the User settings.json, copy and paste the below settings and hit save
  4. Open a terminal and create a shell script (eg. .test), copy and paste the below code
  5. Open the shell script in VSCode

User settings.json

{
    "todo-tree.tree.scanMode": "open files",
    "todo-tree.general.tags": [ "TODO" ],
    "todo-tree.regex.regex": "((//|#|<!--|;|/\\*|^|^[ \\t]*(-|\\d+.))\\s*($TAGS))",
}

.test shell script

#!/usr/bin/bash

# TODO: something

exit 0

Expected Behaviour

The ToDo Tree extension highlights the comment with the tag.

Actual Behaviour

The ToDo Tree extension throws the below error and exits.

2024-06-21 11:33:00.402 [error] An error occurred when deactivating the subscriptions for extension 'Gruntfuggly.todo-tree':
2024-06-21 11:33:00.402 [error] AggregateError: Encountered errors while disposing of store
	at f (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:820)
	at u.eb (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:9991)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:7867
	at Array.map (<anonymous>)
	at u.$ (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:7854)
	at u.terminate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:8127)
	at f.terminate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:163:1513)
	at t (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:10459)
	at MessagePortMain.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:6675)
	at MessagePortMain.emit (node:events:514:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
2024-06-21 11:33:00.403 [info] Extension host with pid 15239 exiting with code 0
2024-06-21 11:33:01.162 [info] Extension host with pid 15975 started

Additional Information

The extension works on test.sh and test alike. Seems like it only errors when the filename starts with a dot.

@TonyGravagno
Copy link

Actually, if you open the Extension Host Output window you'll see that the subscription dispose error occurs whenever the extension goes through wrapup. It's completely independent of language, files, or any other detail in your thorough description.

Except for that error though, the extension looks like it works in JavaScript/TypeScript projects, and I did enjoy using this extension for a couple years. However, these days I'm concerned that if it error while doing its job that it might prevent something else from working. I think I saw that recently so I had to disable this otherwise great extension.

So if anyone takes this on as a project - I'm guessing this extension destroys its subscriptions before wrapup has a chance to do it cleanly, or maybe the wrapup process is broken. This doesn't seem like a tough one.

Full stack trace from Window Reload, happens every time:

2024-12-02 08:17:20.119 [error] An error occurred when disposing the subscriptions for extension 'Gruntfuggly.todo-tree':
2024-12-02 08:17:20.119 [error] AggregateError: Encountered errors while disposing of store
	at ci (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:24:775)
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:14992
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:24:1009
	at Object.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:7:2146)
	at z_.eb (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:11919)
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:9874
	at Array.map (<anonymous>)
	at z_.$ (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:9862)
	at z_.terminate (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:10105)
	at EC.terminate (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:1424)
	at Zi (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:15084)
	at MessagePortMain.<anonymous> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:11632)
	at MessagePortMain.emit (node:events:519:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949)
2024-12-02 08:17:20.125 [error] Canceled: Canceled
	at new tT (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:31:108738)
	at py.U (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:31:113348)
	at s.<computed>.n.charCodeAt.s.<computed> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:31:110842)
	at Y0.g (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32313)
	at Y0.executeCommand (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31817)
	at r.registerCommand.description (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31147)
	at Y0.h (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32833)
	at Y0.g (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31910)
	at Y0.executeCommand (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31817)
	at Object.executeCommand (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:156:37246)
	at mh.O [as value] (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:961845)
	at D.B (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:746)
	at D.C (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:816)
	at D.fire (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1033)
	at Object.p [as dispose] (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:983333)
	at c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:989455
	at Array.forEach (<anonymous>)
	at b.dispose (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:989441)
	at V1.<anonymous> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:19994)
	at V1.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:20090)
	at V1.<anonymous> (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:964255)
	at V1.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:20090)
	at ci (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:24:699)
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:14992
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:24:1009
	at Object.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:7:2146)
	at z_.eb (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:11919)
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:9874
	at Array.map (<anonymous>)
	at z_.$ (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:9862)
	at z_.terminate (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:10105)
	at EC.terminate (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:1424)
	at Zi (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:15084)
	at MessagePortMain.<anonymous> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:11632)
	at MessagePortMain.emit (node:events:519:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949) setContext undefined
2024-12-02 08:17:20.126 [error] Canceled: Canceled
	at new tT (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:31:108738)
	at py.U (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:31:113348)
	at s.<computed>.n.charCodeAt.s.<computed> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:31:110842)
	at Y0.g (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32313)
	at Y0.executeCommand (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31817)
	at r.registerCommand.description (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31147)
	at Y0.h (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32833)
	at Y0.g (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31910)
	at Y0.executeCommand (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:31817)
	at Object.executeCommand (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:156:37246)
	at set hasGitHubRepositories (c:\Program Files\Microsoft VS Code\resources\app\extensions\github\dist\extension.js:2:328633)
	at c:\Program Files\Microsoft VS Code\resources\app\extensions\github\dist\extension.js:2:329592
	at mh.value (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:1073936)
	at D.B (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:746)
	at D.C (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:816)
	at D.fire (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1033)
	at Object.p [as dispose] (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:983333)
	at c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:989455
	at Array.forEach (<anonymous>)
	at b.dispose (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:989441)
	at V1.<anonymous> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:19994)
	at V1.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:20090)
	at V1.<anonymous> (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:2:964255)
	at V1.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:20090)
	at ci (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:24:699)
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:14992
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:24:1009
	at Object.dispose (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:7:2146)
	at z_.eb (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:11919)
	at file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:9874
	at Array.map (<anonymous>)
	at z_.$ (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:9862)
	at z_.terminate (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:10105)
	at EC.terminate (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:1424)
	at Zi (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:15084)
	at MessagePortMain.<anonymous> (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:11632)
	at MessagePortMain.emit (node:events:519:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949) setContext undefined

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

No branches or pull requests

2 participants