Closed
Description
Describe the bug
Hi!
At my work in our monolithic project the svelte extension started to crash on startup. This doesn't happen on version 108.5.2, so we locked it. In fact, VS Code turns into a primitive text editor.
I just checked, the problem is reproduced on version 109.5.4.
The project uses Svelte 4.2.18
Debugger listening on ws://127.0.0.1:9229/cb55dc39-8085-4658-803d-d836a3c4b77a
For help, see: https://nodejs.org/en/docs/inspector
Initialize language server at file:///Users/mrwaip/code/project
Initialize new ts service at /Users/mrwaip/code/project/tsconfig.json
Trying to load configs for /Users/mrwaip/code/project
Loaded config at /Users/mrwaip/code/project/svelte.config.js
SnapshotManager File Statistics:
Project files: 13363
Svelte files: 3729
From node_modules: 0
Total: 13363
SnapshotManager File Statistics:
Project files: 13363
Svelte files: 3729
From node_modules: 2938
Total: 16608
<--- Last few GCs --->
[64316:0x108002e0000] 91020 ms: Mark-Compact 4065.1 (4074.8) -> 4063.5 (4074.8) MB, pooled: 2 MB, 617.17 / 0.00 ms (average mu = 0.129, current mu = 0.051) allocation failure; scavenge might not succeed
[64316:0x108002e0000] 91884 ms: Mark-Compact 4065.5 (4074.8) -> 4063.7 (4075.1) MB, pooled: 2 MB, 857.50 / 0.00 ms (average mu = 0.061, current mu = 0.007) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0x11503c0bc node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
2: 0x10f496af4 node::GetEnvironmentIsolateData(node::Environment*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
3: 0x10f496a88 node::GetEnvironmentIsolateData(node::Environment*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
4: 0x10f66f9b0 fontations_ffi$cxxbridge1$has_any_color_table [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
5: 0x10f685534 v8::internal::StrongRootAllocatorBase::deallocate_impl(unsigned long*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
6: 0x10f684fac v8::internal::StrongRootAllocatorBase::deallocate_impl(unsigned long*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
7: 0x10febc018 cppgc::internal::AgeTable::ResetForTesting() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
8: 0x10f66d2e4 fontations_ffi$cxxbridge1$has_any_color_table [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
9: 0x10f663260 fontations_ffi$cxxbridge1$has_any_color_table [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x10f6420e8 fontations_ffi$cxxbridge1$has_any_color_table [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x10e230c30 uv_get_osfhandle [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x10fb48050 v8::internal::TickSample::print() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x10fb00d30 v8::internal::TickSample::print() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x177eafa74
15: 0x177f37c1c
16: 0x177e9bc84
17: 0x170f3392c
18: 0x170cce70c
19: 0x170deb4d8
20: 0x170da5a40
21: 0x170de18dc
22: 0x170e34108
23: 0x170eace68
24: 0x170d40fa8
25: 0x1709032d0
26: 0x170d9dc18
27: 0x177e0d624
28: 0x177e0d624
29: 0x177e0d624
30: 0x177e0d624
31: 0x177e0d624
32: 0x177e0d624
33: 0x177e0d624
34: 0x177e4de28
35: 0x177f26a18
36: 0x177e3ca9c
37: 0x177e0b0f4
38: 0x10f5c65a0 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
39: 0x10f5c7334 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
40: 0x10f5c7488 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
41: 0x10f5f4ff0 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
42: 0x114f70a04 node::CallbackScope::~CallbackScope() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
43: 0x114f706cc node::CallbackScope::~CallbackScope() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
44: 0x115043f60 node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
45: 0x1150573b8 fontations_ffi$cxxbridge1$BridgeOutlineCollection$operator$sizeof [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
46: 0x1150358fc node::Buffer::New(v8::Isolate*, char*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
47: 0x10e27c83c uv_barrier_destroy [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
48: 0x10e27febc uv_async_send [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
49: 0x10e29098c uv_free_interface_addresses [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
50: 0x10e280388 uv_run [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
51: 0x114f716b8 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
52: 0x114f72558 node::SpinEventLoop(node::Environment*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
53: 0x10e295084 v8::ValueSerializer::Delegate::HasCustomHostObject(v8::Isolate*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
54: 0x10e2911c8 ElectronInitializeICUandStartNode [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
55: 0x180274274 start [/usr/lib/dyld]
[Error - 09:14:45] Server process exited with signal SIGABRT.
[Info - 09:14:45] Connection to server got closed. Server will restart.
true
Debugger listening on ws://127.0.0.1:9229/85e9ed6a-25c6-4232-85e5-2aa6dbca56ff
For help, see: https://nodejs.org/en/docs/inspector
Initialize language server at file:///Users/mrwaip/code/project
Initialize new ts service at /Users/mrwaip/code/project/tsconfig.json
Trying to load configs for /Users/mrwaip/code/project
Loaded config at /Users/mrwaip/code/project/svelte.config.js
SnapshotManager File Statistics:
Project files: 13363
Svelte files: 3729
From node_modules: 0
Total: 13363
Reproduction
IDK. Big codebase.
Expected behaviour
LSP doesn't crash
System Info
- OS: Mac OS
- IDE: VS Code
- Extension version: 109.5.4
- RAM: 16GB
- Svelte package version: 4.2.18
- Svelte kit: 2.9.0
Which package is the issue about?
svelte-language-server
Additional Information, eg. Screenshots
Vs Code config:
{
"typescript.tsserver.maxTsServerMemory": 8192,
"svelte.language-server.runtime-args": ["--max-old-space-size=8192"]
}