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

Fix a UI freeze caused by navbar #10014

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Fix a UI freeze caused by navbar #10014

merged 1 commit into from
Jan 20, 2023

Conversation

vlad20012
Copy link
Member

@vlad20012 vlad20012 commented Jan 20, 2023

Fixes #10011

The bug was initially introduced by #6581. It seems like a default navbar implementation retrieves an icon for a PSI element from EDT without a cancellable progress indicator. At the same time, getIcon() implementations of PSI element that can be trait/impl members (function, constant, type alias) access a DefMap of their crate in order to handle a specific case where an item is inside a file included to a trait/impl body via include macro (and hence such item should have icon marks about being trait/impl members). Accessing DefMap without a cancellable progress may lead to a UI freeze for the duration of DefMap building.

I decided to ignore this specific case and don't use such icons marker in the navbar in the case of a included file. This fixes the freeze.

changelog: Fix a UI freeze caused by navbar

@vlad20012 vlad20012 added the fix Pull requests that fix some bug(s) label Jan 20, 2023
@vlad20012 vlad20012 assigned vlad20012 and dima74 and unassigned vlad20012 Jan 20, 2023
@dima74
Copy link
Member

dima74 commented Jan 20, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 20, 2023

Build succeeded:

  • check

@bors bors bot merged commit e130093 into master Jan 20, 2023
@bors bors bot deleted the fix-navbar-ui-freeze branch January 20, 2023 16:54
@github-actions github-actions bot added this to the v187 milestone Jan 20, 2023
@mili-l mili-l self-assigned this Jan 24, 2023
bors bot added a commit that referenced this pull request Feb 17, 2023
10136: Fix IndexNotReadyException in NavBar r=vlad20012 a=dima74

Fixes #10109
Related: #10014

no changelog since the exception should not be visible to users

Co-authored-by: Dmitry Murzin <diralik@yandex.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI Freeze caused by navbar
3 participants