sanmont / vscode-kickass-studio

Extension for visual studio code for developing kickass assm c64 programs
MIT License
9 stars 4 forks source link

Language server crashes #42

Open coslor opened 1 year ago

coslor commented 1 year ago

Type: Bug

Every time I bring up Visual Code, the Kick Assembler Language Server crashes. Example output: on initialize node:internal/errors:464 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Map at Object.writeFileSync (node:fs:2150:5) at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:26:8 at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 at new Promise () at __awaiter (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:4:12) at generateASMString (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:20:79) at ASMInfoAnalizer. (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:160:41) at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 { code: 'ERR_INVALID_ARG_TYPE' } [Info - 2:44:10 PM] Connection to server got closed. Server will restart. on initialize node:internal/errors:464 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Map at Object.writeFileSync (node:fs:2150:5) at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:26:8 at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 at new Promise () at __awaiter (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:4:12) at generateASMString (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:20:79) at ASMInfoAnalizer. (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:160:41) at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 { code: 'ERR_INVALID_ARG_TYPE' } [Info - 2:44:11 PM] Connection to server got closed. Server will restart. on initialize node:internal/errors:464 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Map at Object.writeFileSync (node:fs:2150:5) at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:26:8 at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 at new Promise () at __awaiter (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:4:12) at generateASMString (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:20:79) at ASMInfoAnalizer. (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:160:41) at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 { code: 'ERR_INVALID_ARG_TYPE' } [Info - 2:44:12 PM] Connection to server got closed. Server will restart. on initialize node:internal/errors:464 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Map at Object.writeFileSync (node:fs:2150:5) at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:26:8 at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 at new Promise () at __awaiter (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:4:12) at generateASMString (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:20:79) at ASMInfoAnalizer. (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:160:41) at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 { code: 'ERR_INVALID_ARG_TYPE' } [Info - 2:44:12 PM] Connection to server got closed. Server will restart. on initialize node:internal/errors:464 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Map at Object.writeFileSync (node:fs:2150:5) at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:26:8 at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 at new Promise () at __awaiter (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:4:12) at generateASMString (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:20:79) at ASMInfoAnalizer. (c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:160:41) at Generator.next () at c:\Users\chris.vscode\extensions\sanmont.kickass-studio-1.0.7\out\languageClient\kickassASMInfo.js:8:71 { code: 'ERR_INVALID_ARG_TYPE' } [Error - 2:44:13 PM] Connection to server got closed. Server will not be restarted.

Extension version: 1.0.7 VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:23:45.584Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz (8 x 2694)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.94GB (5.66GB free)| |Process Argv|--crash-reporter-id f1b8aec6-8cc2-4b1a-8ac7-b29f27cc5cce| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes516:30244333 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1:30587005 3biah626:30602489 89544117:30613380 pythonsymbol12:30657548 ```
headhunter45 commented 1 year ago

I just installed and I'm getting the same thing. I'm on an M1 mac os 13.2.1 vscode 1.76.2, and Kick Assembler Studio 1.0.7.

claudevandort commented 1 year ago

I'm getting the same error on macOS with M1

pottendo commented 1 year ago

Hi fellow-retro-hackers,

Similar here - this time on Linux:

on initialize
node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Map
    at Object.writeFileSync (node:fs:2150:5)
    at /opt/home/pottendo/.vscode/extensions/sanmont.kickass-studio-1.0.7/out/languageClient/kickassASMInfo.js:26:8
    at Generator.next (<anonymous>)
    at /opt/home/pottendo/.vscode/extensions/sanmont.kickass-studio-1.0.7/out/languageClient/kickassASMInfo.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/home/pottendo/.vscode/extensions/sanmont.kickass-studio-1.0.7/out/languageClient/kickassASMInfo.js:4:12)
    at generateASMString (/opt/home/pottendo/.vscode/extensions/sanmont.kickass-studio-1.0.7/out/languageClient/kickassASMInfo.js:20:79)
    at ASMInfoAnalizer.<anonymous> (/opt/home/pottendo/.vscode/extensions/sanmont.kickass-studio-1.0.7/out/languageClient/kickassASMInfo.js:160:41)
    at Generator.next (<anonymous>)
    at /opt/home/pottendo/.vscode/extensions/sanmont.kickass-studio-1.0.7/out/languageClient/kickassASMInfo.js:8:71 {
  code: 'ERR_INVALID_ARG_TYPE'
}
[Error - 6:22:08 PM] Connection to server got closed. Server will not be restarted.
Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:35:30.018Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Linux x64 5.19.0-35-generic
Sandboxed: No

This was a fresh install of the extension - assembling works but Vice is not started and debugging consequently isn't working. (I'm new to vscode and complex extensions, so let me know if I need to provide more information)

thanks, pottendo

sanmont commented 1 year ago

Hello! its been a while sisnce I havent done any work on the extension. I'm getting back to work, make it better and fix bugs. There was a bug related to task creation that I fixed and pushed to github but havent published to the microsoft store yet. I think this might have been. Im still testing it. In any case delete the files in the .vscode directory, open your main program file and try to debug from there.

pottendo commented 1 year ago

Hello! its been a while sisnce I havent done any work on the extension. I'm getting back to work, make it better and fix bugs. There was a bug related to task creation that I fixed and pushed to github but havent published to the microsoft store yet. I think this might have been. Im still testing it. In any case delete the files in the .vscode directory, open your main program file and try to debug from there.

hi, I'd give it a try, but pls. instruct how to install it properly from github - I've no vs-code experience on that level. thx, pottendo

johanfredin commented 10 months ago

I got this working now, the solution is probably super simple for experienced VS code users. But for the people who usually dont work in VScode like myself. Here are the steps I took to make it work:

  1. clone this repository
  2. Make sure that the plugin is removed from your extensions.
  3. install npm and run npm -i in project root
  4. install vsce package that lets you build .vsix files using npm install -g vsce
  5. Run vsce package in project root. This will generate the .vsix file
  6. Open your c64 project in a new vscode instance
  7. Go to extension -> Install from VSIX... and select your generated file.
  8. Now add the kickass and vice binary paths just like the main readme file suggests.

After this everything should run as intended, at least it did for me on windows. Haven't tested in linux but im sure it will run there as well.