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

[UpdateDownloadAll] Race Condition #13

Open
gmastergreatee opened this issue Oct 22, 2022 · 3 comments
Open

[UpdateDownloadAll] Race Condition #13

gmastergreatee opened this issue Oct 22, 2022 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed priority:high This wiil be fixed ASAP

Comments

@gmastergreatee
Copy link
Owner

gmastergreatee commented Oct 22, 2022

Describe the bug
After clicking on UpdateDownloadAll, in case of novel-entry in the middle of the library, if currently selected novel has some updates, then the code-execution splits into 2 -

  1. First goes into the next novel-entry and starts loading that
  2. Second keeps downloading the chapters of the currently selected novel-entry

This bug happens mostly when the computer isn't switched off for a long time, for example my system hasn't been turned off for 3 weeks. Bug still appears very randomly. In some PCs, it can't be reproduced at all.

To Reproduce
Do as mentioned above

Expected behavior
Point 2 should be the one happening and not point 1.

@AurelionSoldMe
Copy link

From my issue earlier with updatedownloadall:

Added a check to update novel to make sure before it runs it had all known chapters and currently its working, if it keeps working for a few days I will give a update on it, also could not reproduce the one you posted but my client at least has been restarted a lot of times (Computer only restarts on major win updates or my ram gets screwed over by mem leaks)

@AurelionSoldMe
Copy link

The following half works (Will break it partially, but semi works out if you keep running it but working on fixing that)

updateNovel(t_novel) {

   if (
      t_novel.ChapterCount != t_novel.DownloadedCount
    ) {
      this.downloadNovel(t_novel);
    } 

In short it checks for a chapter imbalance before hand, but if you have multiple novel imbalances it will cause issues currently.

@AurelionSoldMe
Copy link

Just giving a heads up updatedownloadall has not broken on me for a long while and only change I am really seeing between new version and mine for the update function is:

if (this.iframe_working) {
return;
}

if (
t_novel.ChapterCount != t_novel.DownloadedCount
) {
this.downloadNovel(t_novel);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed priority:high This wiil be fixed ASAP
Projects
None yet
Development

No branches or pull requests

2 participants