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

Svelte Extension crashing on startup of VSCode (insiders / macOS 11.2 / M1) #794

Closed
neiled opened this issue Feb 2, 2021 · 10 comments
Closed
Labels

Comments

@neiled
Copy link

neiled commented Feb 2, 2021

Describe the bug
Upon starting vscode the error 'The svelte server crashed 5 times in the last 3 minutes..."
Stack trace at bottom.

To Reproduce
Steps to reproduce the behavior:

Unknown I only have one system to try it on, but version numbers:
Svelte for VS Code 104.2.1
Visual Studio Code - Insiders: Version: 1.53.0-insider

Expected behavior
Extension to start without erroring

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: MacOS 11.2
  • IDE: Visual Studio Code - Insiders: Version: 1.53.0-insider
  • Plugin/Package: Svelte for VS Code 104.2.1

Additional context
Add any other context about the problem here.


Initialize language server at  file:///Users/neiled/dev/sapper-1
Trying to load config for /Users/neiled/dev/sapper-1/src/components/Nav.svelte
No svelte.config.js found. Using https://github.com/sveltejs/svelte-preprocess as fallback
Using svelte-preprocess v4.6.3 from /Users/neiled/dev/sapper-1/node_modules/svelte-preprocess
Initialize new ts service at  /Users/neiled/dev/sapper-1/tsconfig.json
SnapshotManager File Statistics:
Project files: 9
Svelte files: 0
From node_modules: 2
Total: 9


#
# Fatal error in , line 0
# ignored
#
#
#
#FailureMessage Object: 0x16d481b38
 1: 0x1052dc8f8 node::MultiIsolatePlatform::CancelPendingDelayedTasks(v8::Isolate*) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x10765a174 v8::internal::compiler::ZoneStats::GetCurrentAllocatedBytes() const [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x1062810fc v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&, v8::internal::VirtualMemory, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, std::__1::shared_ptr<v8::internal::Counters>, std::__1::shared_ptr<v8::internal::wasm::NativeModule>*) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x103744368 v8::internal::wasm::NativeModule::AddCodeSpace(v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 5: 0x1062823f0 v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 6: 0x10628fc0c v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> >, std::__1::hash<v8::internal::wasm::NativeModule*>, std::__1::equal_to<v8::internal::wasm::NativeModule*>, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> > > > > const&) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x10628e524 v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x10628f38c v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vector<v8::internal::wasm::WasmCode*>) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x10628f458 v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x1052db3ac node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x1052da340 node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x102b6a32c uv_async_send [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x102b7a6c8 uv_free_interface_addresses [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x102b6a768 uv_run [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
15: 0x102cedea0 ElectronInitializeICUandStartNode [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
16: 0x102b7ad4c ElectronInitializeICUandStartNode [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
17: 0x1029769f8  [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Renderer).app/Contents/MacOS/Code - Insiders Helper (Renderer)]
18: 0x197c09f34 start [/usr/lib/system/libdyld.dylib]
[Error - 8:11:17 PM] Connection to server got closed. Server will not be restarted.
[Error - 8:11:17 PM] Request textDocument/semanticTokens/range failed.
Error: Connection got disposed.
	at Object.dispose (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
	at Object.dispose (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-languageclient/lib/common/client.js:73:35)
	at LanguageClient.handleConnectionClosed (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-languageclient/lib/common/client.js:2424:42)
	at LanguageClient.handleConnectionClosed (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-languageclient/lib/node/main.js:155:15)
	at closeHandler (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-languageclient/lib/common/client.js:2411:18)
	at CallbackList.invoke (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at closeHandler (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/connection.js:256:26)
	at CallbackList.invoke (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at IPCMessageReader.fireClose (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:40:27)
	at ChildProcess.<anonymous> (/Users/neiled/.vscode-insiders/extensions/svelte.svelte-vscode-104.2.1/node_modules/vscode-jsonrpc/lib/node/main.js:33:45)
	at ChildProcess.emit (events.js:327:22)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:443:11)
	at Socket.emit (events.js:315:20)
	at Pipe.<anonymous> (net.js:674:12
@neiled neiled added the bug Something isn't working label Feb 2, 2021
@jasonlyu123
Copy link
Member

Can you try setting the svelte.language-server.runtime? This would use your own version of node instead of the bundled version of vscode. If that doesn't work maybe you can try to install the latest version of the node. I suspect it's sourcemap or some other native library not compatible with the combination of node and macOS.

@neiled
Copy link
Author

neiled commented Feb 2, 2021

Hi, that worked, setting it to current node lts version I have installed stopped the issue from happening.

@jasonlyu123 jasonlyu123 added upstream and removed bug Something isn't working labels Feb 2, 2021
@dummdidumm
Copy link
Member

Possible causes: nodejs/node#37061 , microsoft/vscode#115646

@dummdidumm dummdidumm changed the title Svelte Extension failing on startup of VSCode (maybe since macOS 11.2 upgrade?) Svelte Extension crashing on startup of VSCode (insiders / macOS 11.2 / M1) Feb 3, 2021
@neiled
Copy link
Author

neiled commented Feb 4, 2021 via email

@callahad
Copy link

callahad commented Feb 4, 2021

Wading through the issues above: This seems to be an upstream bug with V8 on ARM under macOS.

Rosetta2 is a viable workaround, either by running an Intel build of VSCode and using its built-in runtime, or using an ARM version of VSCode and pointing svelte.language-server.runtime at an Intel version of the Node executable.

@dummdidumm
Copy link
Member

dummdidumm commented Feb 5, 2021

This may have been fixed, the vs code issue was closed. Could someone try again with the latest insiders release?

@Valexr
Copy link

Valexr commented Feb 6, 2021

Yep - i'm trying but still error... on Vscode-Insiders & VScode tooo... now testing VScodium

@callahad
Copy link

callahad commented Feb 6, 2021

This is successfully working for me on the latest VSCode Insiders build, specifically:

Version: 1.54.0-insider
Commit: 52838cf6799cc448e738677ec37e86cf62a5bd89
Date: 2021-02-05T05:17:08.594Z
Electron: 11.2.2
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin arm64 20.3.0

@Valexr
Copy link

Valexr commented Feb 6, 2021

Yep! Working now )))

@dummdidumm
Copy link
Member

Closing as I think the upstream issues are resolved. If there are still problems feel free to comment.

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

No branches or pull requests

5 participants