Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

TypeScript service often gets stuck when the plugin is enabled #32

Closed
Jessidhia opened this issue Nov 21, 2018 · 15 comments
Closed

TypeScript service often gets stuck when the plugin is enabled #32

Jessidhia opened this issue Nov 21, 2018 · 15 comments

Comments

@Jessidhia
Copy link

Jessidhia commented Nov 21, 2018

I don't yet know the cause or how to reproduce it; but when using the plugin in my work project, the typescript service may get stuck while typing after showing some lint errors and then never update again until it is restarted. It's not just the lint messages that get stuck, but the actual ts compiler service; unused variable hints, autocomplete, etc stop working, or rather, get stuck in a state where it's as if they're seeing an old snapshot of the file being edited.

{
  "name": "typescript-tslint-plugin",
  "jsEnable": true,
  "ignoreDefinitionFiles": false,
  "suppressWhileTypeErrorsPresent": true
}
@HolgerJeromin
Copy link

Same here with vs2017 and typescript only.

I am planing to move to tslint-plugin, so it could be the case, that the issue you are reporting is unrelated to the plugin.

@mjbvz
Copy link
Contributor

mjbvz commented Nov 28, 2018

Please provide info like:

  • Plugin version
  • Typescript version
  • Editor

@dgreene1
Copy link

I'm also experiencing this issue. My information is:

  • Plugin version: 0.1.1
  • Typescript version: workspace version of 3.2.2
  • Editor: 1.29.1 on Windows

@mjbvz
Copy link
Contributor

mjbvz commented Jan 21, 2019

Can someone please share an example workspace where this happens so I can investigate

@vladimir-djokic
Copy link

The issue with this issue (pun!) is that it doesn't happen every time in the exactly the same parts of the project. It is present from 0.1.x to 0.3.x. What I did notice is that it happens (for myself) during editing of somewhat complex code: generics, functions that call other functions, union types, ... But it is annoying to restart VSCode every 20-30 minutes or so (at least, for myself on a large project).

@VishalMadhvani
Copy link

I also saw this issue multiple times and eventually switched back to the old extension.
Since it has not been deprecated, switch back to using this but it seems the issues have not been resolved.

So far it seems quite random in nature and so trying to provide repro steps is difficult.
Can anyone advise (@mjbvz ) maybe provide details on how to collect information when the crash occurs? i.e stack traces, or additional logging modes?

@neyromant
Copy link

I'm also experiencing this issue. My information is:

Plugin version: 1.0.0
Typescript version: workspace version of 2.6.2
Editor: VSCode 1.32.3 on Windows 10

@vladimir-djokic
Copy link

Can someone please share an example workspace where this happens so I can investigate

I believe that the chance of happening is increased when there are multiple files displayed side-by-side (2, 3, 4) in VSCode.

@vladimir-djokic
Copy link

Still an issue with typescript 3.5.1 and typescript-tslint-plugin 0.4.0. Additional info: happens a lot when editing .tsx (React) files.

@InDIOS
Copy link

InDIOS commented Jul 17, 2019

In my case, when i disable network adapter or work offline everything works just fine, the problem is when i have internet, type checking and linting break out and no longer work, i need go offline if i want do anything.
My solution was uninstall the plugin and all work fine again.

@KostyaTretyak
Copy link

KostyaTretyak commented Dec 7, 2019

I think this issue is related to memory leak, because stuck not only VS Code - stuck completely computer.

plugin v1.2.3
typescript v3.6.3
VS Code 1.40.2 on Ubuntu 18.04

I have 16 GB of memory on my notebook, in normal cases it uses about 3GB of memory with empty swap file, and when this issue happens swap file more then 50% full.

P.S. This issue never happens with disabled the plugin.

@KostyaTretyak
Copy link

I watched this issue again. The memory sharply fills from 3 GB to 16 GB and begins to be written to the swap file. It all happens in about 2 seconds.

@mjbvz, I can run some records of typescript server work, if you need this info.

@mjbvz
Copy link
Contributor

mjbvz commented Dec 18, 2019

@KostyaTretyak Yes I can't repo this. What would be most helpful is if you could try collecting a heap snapshot of the process when this happens:

  1. Set a TSS_DEBUG environment variable that tells the typescript server to allow debugging on a specific port. For example, TSS_DEBUG=7000
  2. Start VS Code in an environment where this variable is set (for example, run TSS_DEBUG=7000 code)
  3. Using the chrome dev tools, connect to the node process
  4. From there, capture a heap snapshot that hopefully will tells us why the memory usage is so high

@KostyaTretyak
Copy link

@mjbvz, I've seen this issue twice more, but I can't catch the moment when it can be logged. And, frankly, I doubt it can be recorded with Chrome DevTools, since dumping a memory dump takes longer than running out of memory and a laptop stuck. Moreover, right after the stuck laptop and reboot it, I do the same work, but I can't repo this.

@mjbvz
Copy link
Contributor

mjbvz commented May 1, 2023

Closing as TSLint has been deprecated in favor of ESLint. We are archiving this repo as this project is no longer maintained

@mjbvz mjbvz closed this as completed May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants