Skip to content

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

Merged
merged 8 commits into from
May 5, 2020
Merged

Fix drives loading #701

merged 8 commits into from
May 5, 2020

Conversation

tsvietOK
Copy link
Contributor

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.

@ghost ghost added the needs - code review label Apr 26, 2020
@yaira2
Copy link
Member

yaira2 commented Apr 26, 2020

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?

@tsvietOK
Copy link
Contributor Author

@yaichenbaum May be there was another crash reason?

Copy link
Contributor

@lukeblevins lukeblevins left a 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.

@lukeblevins
Copy link
Contributor

@tsvietOK Thanks for narrowing down the issue, though-this information can be used to provide a solution for the drives not loading.

@lukeblevins lukeblevins added changes requested Changes are needed for this pull request and removed invalid labels Apr 26, 2020
@tsvietOK
Copy link
Contributor Author

@duke7553 What do you mean under "instead of always/never loading them"? And why do you want to load drives after UI thread started?

@lukeblevins
Copy link
Contributor

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.

@yaira2
Copy link
Member

yaira2 commented May 1, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tsvietOK
Copy link
Contributor Author

tsvietOK commented May 5, 2020

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

@lukeblevins
Copy link
Contributor

@tsvietOK Since we have no definitive evidence that the current implementation fixed any crashes, I'll approve this change because it fixes a bug.

@lukeblevins lukeblevins self-requested a review May 5, 2020 18:49
@lukeblevins lukeblevins added ready to merge Pull requests that are approved and ready to merge and removed changes requested Changes are needed for this pull request labels May 5, 2020
@yaira2 yaira2 merged commit 35f6f00 into files-community:develop May 5, 2020
@tsvietOK tsvietOK deleted the drives-fix branch May 5, 2020 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants