VSCode Extension 4.10.1 & 4.11.0: memory access out of bounds
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript, vscode, wasm
Research direction
Start by reproducing the failure while editing a schema.prisma file, then trace the reported calls through prisma-fmt, format.js, MessageHandler.js, and server.js. Done means linting, formatting, and completion continue working after extended editing without the "memory access out of bounds" error.
Written by the indexing model from the issue text.
Description
Bug description
I'm in the process of designing a new schema/db. After editing the schema.prisma file for a couple of hours (with breaks to look up documentation/etc), the Prisma Language Server starts throwing "memory access out of bounds" errors on every attempt to format/lint/autocomplete.
Restarting VSCode so that the Prisma Language Server gets restarted will allow linting/formatting again for another couple of hours before the Prisma Language Service starts throwing the memory access errors again.
I have tested this on both version 4.10.1 and 4.11.0 - both run into the same memory access errors after a few hours.
VSCode Extension version 4.10.1 and 4.11.0
How to reproduce
Steps to reproduce the behavior:
- Install the VSCode plugin Prisma
- Open a schema.prisma file in VSCode
- Continue making changes to the schema.prisma file for a few hours
- See error log below
Expected behavior
The Prisma Language Server should not start failing on all access due to memory issues.
Prisma information
This occurs when editing the schema file itself.
Environment & setup
- OS: Debian 11
- Editor: VSCode 1.75.1
- Editor version: 1.75.1
- Extension version: 4.10.1 and 4.11.0
Prisma Language Server log from a few lines before the errors started:
running lint() from prisma-fmt
running lint() from prisma-fmt
running lint() from prisma-fmt
running lint() from prisma-fmt
Did not receive any native type suggestions from prisma-fmt call.
running lint() from prisma-fmt
running lint() from prisma-fmt
[Error - 2:23:49 PM] prisma-fmt error'd during linting.
[Error - 2:23:49 PM] [object Object]
[Error - 2:23:49 PM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: memory access out of bounds
Code: -32603
running lint() from prisma-fmt
[Error - 2:23:51 PM] prisma-fmt error'd during linting.
[Error - 2:23:51 PM] [object Object]
[Error - 2:23:52 PM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: memory access out of bounds
Code: -32603
running lint() from prisma-fmt
[Error - 2:24:47 PM] prisma-fmt error'd during linting.
[Error - 2:24:47 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:47 PM] prisma-fmt error'd during linting.
[Error - 2:24:47 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:47 PM] prisma-fmt error'd during linting.
[Error - 2:24:47 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:48 PM] prisma-fmt error'd during linting.
[Error - 2:24:48 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:49 PM] prisma-fmt error'd during linting.
[Error - 2:24:49 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:50 PM] prisma-fmt error'd during linting.
[Error - 2:24:50 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:50 PM] prisma-fmt error'd during linting.
[Error - 2:24:50 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:50 PM] prisma-fmt error'd during linting.
[Error - 2:24:50 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:51 PM] prisma-fmt error'd during linting.
[Error - 2:24:51 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:51 PM] prisma-fmt error'd during linting.
[Error - 2:24:51 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:52 PM] prisma-fmt error'd during linting.
[Error - 2:24:52 PM] [object Object]
running lint() from prisma-fmt
[Error - 2:24:59 PM] prisma-fmt error'd during linting.
[Error - 2:24:59 PM] [object Object]
running format() from prisma-fmt
prisma-fmt error'd during formatting. Please report this issue on [Prisma Language Tools](https://github.com/prisma/language-tools/issues).
Linter output:
RuntimeError: memory access out of bounds
at format (wasm://wasm/00a1175e:wasm-function[35]:0x7c13d)
at module.exports.format (/home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/@prisma/prisma-fmt-wasm/src/prisma_fmt_build.js:113:14)
at format (/home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/@prisma/language-server/dist/src/prisma-fmt/format.js:10:42)
at Object.handleDocumentFormatting (/home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/@prisma/language-server/dist/src/MessageHandler.js:118:44)
at /home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/@prisma/language-server/dist/src/server.js:182:35
at /home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/vscode-languageserver/lib/common/server.js:637:20
at handleRequest (/home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/vscode-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js:459:41)
at processMessageQueue (/home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/vscode-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js:321:17)
at Immediate._onImmediate (/home/user/.vscode/extensions/prisma.prisma-4.10.1/node_modules/vscode-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js:311:13)
at process.processImmediate (node:internal/timers:466:21)
- Dominant language
- TypeScript
- Stars
- 298
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from prisma/language-tools
-
bug/1-unconfirmed domain/schema kind/bug topic: internal
Difficulty 1/5 Under an hour Newbie friendliness 62/100
prisma/language-tools#1182 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
prisma/language-tools#2012 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
prisma/language-tools#2006 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
prisma/language-tools#1988 ·
-
prismaSchemaFolder glob pattern uses wrong path separator on Windows, breaking multi-file schema discoveryMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 62/100
prisma/language-tools#1985 ·
All issues in prisma/language-tools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zabuton-app/meguri#875 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
iruzen-dono/workless#117 ·
Maintainers usually reply within 1 day
-
area:api area:web wave wave:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vetro-protocol/vetro-monorepo#1321 ·
Maintainers usually reply within 1 day