Fix download manager crash and dropped downloads#2406
Open
TwistedModding wants to merge 3 commits into
Open
Conversation
DownloadList::data() called the throwing getPendingDownload() for a pending row that could have transitioned to an active download between the model reporting its row count and the view querying the row, aborting with "get pending: invalid download index". Add a non-throwing tryGetPendingDownload() and use it so a stale row returns an empty value. nxm links forwarded by short-lived secondary processes were dropped when the UI thread was busy (resolving a Nexus URL, or rescanning a large downloads folder), producing "failed to receive data from secondary process" for downloads started in quick succession. Move the local socket server onto a dedicated thread so connections are read the instant they arrive regardless of UI-thread load, keep the sender connected until the primary has read the message, and debounce the downloads-folder rescan so a burst of file changes no longer freezes the event loop.
Contributor
|
Looks good to my eyes. I'll take it for a test ride if I can get my setup running again, as I have had this issue from IO stalls regularly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DownloadList::data() called the throwing getPendingDownload() for a pending row that could have transitioned to an active download between the model reporting its row count and the view querying the row, aborting with "get pending: invalid download index". Add a non-throwing tryGetPendingDownload() and use it so a stale row returns an empty value.
nxm links forwarded by short-lived secondary processes were dropped when the UI thread was busy (resolving a Nexus URL, or rescanning a large downloads folder), producing "failed to receive data from secondary process" for downloads started in quick succession. Move the local socket server onto a dedicated thread so connections are read the instant they arrive regardless of UI-thread load, keep the sender connected until the primary has read the message, and debounce the downloads-folder rescan so a burst of file changes no longer freezes the event loop.