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

Throw errors happening in UpdateModsList() #2745

Merged
merged 1 commit into from
Apr 28, 2019

Conversation

DasSkelett
Copy link
Member

@DasSkelett DasSkelett commented Apr 28, 2019

Problem

Since #2617 errors which are thrown during startup, that means in UpdateModLists(), are 'swallowed', and the GUI just stopps working and is stuck in a infinite loop-like state.
#2617 changed the call of _UpdateModsList() to a Task.
Because the main thread waits for the Task to finish, but the Task in fact stopped executing if an error happened, CKAN is stuck.

Solution

Only if you add an await operator in front of Tasks (and thus an async in the method declaration) the errors are finally thrown in the main thread. This way CKAN crashes properly on fatal/not catched errors, and the stack trace and error message are shown to the user.

@DasSkelett DasSkelett added Pull request Easy This is easy to fix GUI Issues affecting the interactive GUI and removed Pull request labels Apr 28, 2019
@HebaruSan
Copy link
Member

Looks good.

image

@HebaruSan HebaruSan merged commit e6da835 into KSP-CKAN:master Apr 28, 2019
@DasSkelett DasSkelett deleted the fix/startup-errors branch April 28, 2019 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants