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

Right Click on Extension Search > Peek causes freeze #104727

Closed
topherhoffman opened this issue Aug 15, 2020 · 13 comments
Closed

Right Click on Extension Search > Peek causes freeze #104727

topherhoffman opened this issue Aug 15, 2020 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues menus Menu items and widget issues verified Verification succeeded

Comments

@topherhoffman
Copy link

topherhoffman commented Aug 15, 2020

  • VSCode Version: 1.48.0
  • OS Version: Windows_NT x64 10.0.19041
    image

Steps to Reproduce:
VSCODE Freeze 2020

  1. Right Click 'Search Extension in Marketplace'
  2. Goto Peek, click on peek (Before the Peak menu shows) [Edit 2020/08/18: added context]
  3. Repeat 2&3 Until freeze (Might Take a couple of times.)
  4. Wait for the Freeze Notice

image

Does this issue occur when all extensions are disabled?: Yes/No

Yes, Still happens
image

@heartacker
Copy link
Contributor

I have the same problem

@sandy081
Copy link
Member

This is also there in settings editor

image

Assigning to @roblourens since this is a bug in Suggest enabled input.

@roblourens
Copy link
Member

I'm not sure about the freeze, I don't repro that. But @jrieken can you just make sure that peek command won't show up in the simple editor input? I changed the Command Palette one to have when: EditorContextKeys.editorSimpleInput.toNegated(). You can add that or it looks like other peek menu registrations have some conditions on when they are valid.

@roblourens roblourens assigned jrieken and unassigned roblourens Aug 18, 2020
@jrieken
Copy link
Member

jrieken commented Aug 18, 2020

Hm, this must be a regression from @joaomoreno's submenu changes as the Peek-menu is quite old already. Will look into a fix, also marking as candidate

@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release labels Aug 18, 2020
@jrieken jrieken added this to the July 2020 Recovery milestone Aug 18, 2020
@jrieken
Copy link
Member

jrieken commented Aug 18, 2020

I have pushed a change so that the sub menu doesn't show anymore. Tho, I cannot reproduce the freeze. Not on mac nor on windows. I wonder if that's related to the welcome page not showing recent entries... Can you try without the welcome page or with a different workspace?

@jrieken jrieken added the menus Menu items and widget issues label Aug 18, 2020
@jrieken
Copy link
Member

jrieken commented Aug 18, 2020

Adding @sbatten for more insights and FYI. You might know more about the crash potential - it seems that sometimes the Peek menu doesn't expand and than the crash happens. In my testing (win/mac) I wasn't able to repro and got the menu with a single, disabled entry

@topherhoffman
Copy link
Author

topherhoffman commented Aug 19, 2020

@jrieken That is the cause, You need to right click then quickly left click as if you're trying to get the peek to show with a left click; don't wait for the peak to show. I just realized that was the exact step to reproduce the error.

By clicking before the menu shows I can repo it 100% of the time, unless I am slow clicking.

@topherhoffman
Copy link
Author

Yep, It doesn't have to be from the search bar, it can be anywhere.
VSCODE 3

Not sure if this is it, but seems to be it.

from https://github.com/microsoft/vscode/blob/master/src/vs/editor/contrib/peekView/peekView.ts

protected _onTitleClick(event: IMouseEvent): void {
		// implement me
	}

@jrieken
Copy link
Member

jrieken commented Aug 19, 2020

Thanks @topherhoffman 👏 Once I am fast enough I can reproduce. There is an endless loop creating the submenu and trying to focus an item. Not quite sure why this only happens when being fast...

@jrieken jrieken added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Aug 19, 2020
@jrieken
Copy link
Member

jrieken commented Aug 19, 2020

I believe this was introduced via 182db07 because it adds the preventLoopNavigation which weakens the only loop abort condition. That you have to be fast is because 250ms after hovering an element is focused (via a different code path) and you need to click fast than that.

@jrieken
Copy link
Member

jrieken commented Aug 19, 2020

I have cherry-picked my commit fa4ee50 onto the release branch which should make this not happen anymore - tho the underlying issue and the potential for this endless loop remains

@isidorn
Copy link
Contributor

isidorn commented Aug 19, 2020

Thanks for cherry picking. Due to that closing this issue so we get it verified for the release.
As for the underlying issue and endless loop potential I suggest that either you or @sbatten create a new issue.

@jrieken
Copy link
Member

jrieken commented Aug 20, 2020

To verify:

  • open extensions viewlet (alternatively SCM or settings editor)
  • right click into the editor/input
  • make sure that there is no peek menu

@alexr00 alexr00 added the verified Verification succeeded label Aug 20, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues menus Menu items and widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants