-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
code --wait
no longer exits when the file is closed in VSCode Insiders
#211866
Comments
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
I am seeing the same issue since upgrading to the latest stable 1.89.1 on Linux. To reproduce: It appears to only occur when Open Files in New Window is off and a window is reused. This breaks many built in git workflows like Commit (Amend) and popular git extensions like Gitlens rebase, even when the git editor is not explicitly set to code --wait. The operations never complete when closing the editor and git features become unusable until restarting Code. I have also been seeing hangs when switching branches sometimes which may or may not be related. Please reopen this issue and consider it for a recovery build if there is another scheduled. I've been forced to do manual rebasing in an external terminal with another editor the last few days and frequently restart Code from hanging git workflows. |
What are your exact settings to reproduce this, what window(s) are open and how do you trigger |
I am using this combination of settings: window.openFilesInNewWindow: off Intersingly I just tried toggling window.openFoldersInNewWindow: off (the default) and the problem went away. Then I toggled it back to on and it didn't come back. Will try relaunching Code shortly to see if it comes back. I could reproduce just by using literally |
Please ping when you have a consistent repro, it seems undeterministic. |
And now I'm having trouble reproducing it again, it was reproducing reliably before. I had restarted Code and the machine several times over the last few days to try to work around the issue. |
This is still happening all the time to me, on Mac, with no special window settings that I recall. I do have a few workspace windows open. |
👍 |
I noticed that when I run |
Yes, that is expected behaviour, do not close that second dock or expect that to return the process. Ideally we could avoid showing a second dock entry, but we failed at it, you can ignore it. |
I am not sure that is related. |
I managed to reproduce the problem slightly more reliably. Sometimes changing another setting unsticks Off, then it works for a while. I am also seeing the REFUSES to accept new listeners because it exceed its threshold by far. I also have quite a few open files, Code is showing around 300 open file handles for some processes (ulimit is 1024). |
I think it is something to do with the number/set of open editors in an editor group. If I focus the top editor group in my workspace I reliably get the issue. I think that also lines up with my previous experiments (focusing other groups without noticing) |
I can also not reproduce when I have 2 groups open, even when the file in question is already opened. |
I can confirm that if the file opens in a window with fewer tabs (I reproduced this by focusing a different workspace window and opening a file that's not in any workspace, so it just opens in the frontmost one), then If you want to reproduce this, you need to open a bunch of files. |
It turns out I have several hundred tabs open in the first editor group (not sure of the exact count, I though it was visible in one of the quick pick lists but can't find it). I tried opening ~550 new files in the other group and that didn't introduce the problem, but I guess those are lighter weight than source files. Also tried diff editors and files open in other locations and that didn't change anything either (there aren't very many of those). It's possible we're hitting some kind of reasonable limit somewhere. I don't see the problem with projects with more sane numbers of tabs. |
So to clarify: you see the issue when you have e.g. 200 tabs open, but not with less? Its true that we have some listener leak protection in place, but that is only number based and having 200 tabs open is not necessarily a leak, but could hit that hardcoded limit, I will check. |
Even with 200 untitled files open (which is easy to do quickly via If so, you would see a message like this one in the devtools console: Can you check? |
In my case I think that is what happened. That is the same message as the screenshot above. When I was counting it was around 520 tabs. I couldn't reproduce with untitled files but perhaps they need to be saved or have some content. I'll try cleaning up that editor group tomorrow, in batches and see if that resolves the issue. The solution might be to not open that many tabs... They tend to disappear off the scroll bar never to be noticed again as I mostly use Ctrl-P except for a few recent tabs. I should probably make use of the recently introduced option to limit the number of open tabs. |
Thanks for being patient with me, I was able to reproduce the issue when you have more than 500 tabs open. We have a way to increase the limit for event listeners to support this scenario. I know made the threshold be Anyway, this is not a full solution for all features in VS Code. I can only say that it is not recommended to have so many tabs open if you can avoid it, certain features may break. |
Thanks, I was a bit shocked that many tabs were open but it probably explains some of the transient quirks I have seen occasionally. Thanks for looking in to this so promptly and interactively. Now that we understand the cause I feel a bit silly sounding urgent, I can just clean up some tabs for now. I'll also try out some of the features that help with tab management like autoclosing and per-branch state. If it isn't already it might make sense for the resource usage warning at 1/3 the limit propagated to the GUI like the too many git files warning. With the increase its unlikely I'll hit it again though. |
Type: Bug
The symptoms are identical to #205416. That one was fixed in code-insiders, but in the latest version of code-insiders it's back again.
VS Code version: Code - Insiders 1.89.0-insider (Universal) (b58957e, 2024-05-01T02:05:29.995Z)
OS version: Darwin arm64 23.4.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Extensions (22)
A/B Experiments
The text was updated successfully, but these errors were encountered: