typescript-tslint-plugin icon indicating copy to clipboard operation
typescript-tslint-plugin copied to clipboard

TypeScript service often gets stuck when the plugin is enabled

Open Jessidhia opened this issue 6 years ago • 14 comments

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
}

Jessidhia avatar Nov 21 '18 01:11 Jessidhia

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.

HolgerJeromin avatar Nov 27 '18 08:11 HolgerJeromin

Please provide info like:

  • Plugin version
  • Typescript version
  • Editor

mjbvz avatar Nov 28 '18 00:11 mjbvz

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

dgreene1 avatar Dec 11 '18 17:12 dgreene1

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

mjbvz avatar Jan 21 '19 22:01 mjbvz

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).

vladimir-djokic avatar Feb 04 '19 17:02 vladimir-djokic

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?

VishalMadhvani avatar Feb 20 '19 14:02 VishalMadhvani

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

neyromant avatar Mar 21 '19 05:03 neyromant

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 avatar Apr 19 '19 20:04 vladimir-djokic

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.

vladimir-djokic avatar Jun 02 '19 23:06 vladimir-djokic

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.

InDIOS avatar Jul 17 '19 16:07 InDIOS

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 avatar Dec 07 '19 10:12 KostyaTretyak

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.

KostyaTretyak avatar Dec 16 '19 22:12 KostyaTretyak

@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

mjbvz avatar Dec 18 '19 00:12 mjbvz

@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.

KostyaTretyak avatar Dec 25 '19 06:12 KostyaTretyak

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

mjbvz avatar May 01 '23 20:05 mjbvz