Cannot read properties of undefined (reading 'lineAt')
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
VSCodeVim version: 1.21.18
Stack trace
TypeError: Cannot read properties of undefined (reading 'lineAt')
at Ao.isLineEnd (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim.vim-1.30.1/out/extension.js:2:766614)
at D.handleSelectionChange (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/src/mode/modeHandler.ts:265:55)
at job (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/extensionBase.ts:335:38)
at o.start (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/node_modules/queue/index.js:145:17)
at o.push (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/node_modules/queue/index.js:59:12)
at Object.enqueueTask (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/src/taskQueue.ts:55:20)
at listener (/home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/extensionBase.ts:335:17)
at /home/jaycee/.var/app/com.visualstudio.code/data/vscode/extensions/vscodevim-sneak-fork.vscodevim-sneak-fork-1.21.18/extensionBase.ts:633:5
at Gh.value (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:164:103706)
at $.C (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2375)
at $.D (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2445)
at $.fire (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2662)
at yq.$acceptEditorPropertiesChanged (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:164:71969)
at a4.S (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:117864)
at a4.Q (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:117644)
at a4.M (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:116733)
at a4.L (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:115838)
at Gh.value (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:114635)
at $.C (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2375)
at $.fire (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2593)
at ao.fire (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9459)
at Gh.value (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:356:8152)
at $.C (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2375)
at $.fire (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2593)
at ao.fire (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9459)
at MessagePortMain.<anonymous> (file:///app/extra/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:356:6444)
at MessagePortMain.emit (node:events:518:28)
at MessagePortMain.emit (node:domain:489:12)
at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:3073)
at Object.topLevelDomainCallback (node:domain:161:15)
at Object.callbackTrampoline (node:internal/async_hooks:128:24)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report provides placeholder reproduction steps; start at handleSelectionChange in src/mode/modeHandler.ts around line 265 and trace the selection-change listener in extensionBase.ts around line 335. Compare this path with isLineEnd in the reported extension.js stack frame. Done means reproducing the scenario without the undefined lineAt error and verifying selection changes remain functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100