-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix drives loading #701
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 drives loading #701
Conversation
I think that change was done to fix an issue where the app was crashing for many users. Are you sure this won't bring back that issue? |
@yaichenbaum May be there was another crash reason? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this may fix the issue, we should instead focus on deferring the loading of drives until the UI thread is created instead of always/never loading them.
@tsvietOK Thanks for narrowing down the issue, though-this information can be used to provide a solution for the drives not loading. |
@duke7553 What do you mean under "instead of always/never loading them"? And why do you want to load drives after UI thread started? |
The current implementation will never load the drives list if the UI thread isn't available. We know if an exception is thrown, then the UI thread doesn't exist. iirc the reason we have to populate the drives collection on the UI thread is to prevent occasional crashes on startup. Therefore, I think the best approach here would be to handle the [catch] by deferring the drives from loading until the page is loaded. Right now, we simply never load the drives if the UI thread doesn't exist yet. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@duke7553 I don't agree with current implementation. We can load drives in any time, so when binded collection "sideBarItems" will be changed, ModernSidebar will display drives automatically Try-catch block is unneeded. |
@tsvietOK Since we have no definitive evidence that the current implementation fixed any crashes, I'll approve this change because it fixes a bug. |
For me removing changes added in 02971da by @duke7553 fixing issue #563 . Another way to fix that, just remove "await" from dispatcher. Problem somewhere in dispatcher. And when try-catch catched an error "Element not found", drives did not load.