Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kryksyh
Copy link
Member

@kryksyh kryksyh commented Jan 20, 2025

When the download thread was scheduled before shared_ptr to RemoteProjectSnapshot was created, lambda failed to acquire a weak_ptr to self, resulting in the request not being processed.

Now dispatch threads after the shared_ptr is initialized.

  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

@kryksyh kryksyh added the AU3-bug Bugs from Audacity 3 label Jan 20, 2025
@kryksyh kryksyh added this to the Audacity 3.7.2 milestone Jan 20, 2025
@kryksyh kryksyh requested a review from saintmatthieu January 20, 2025 09:49
@kryksyh kryksyh self-assigned this Jan 20, 2025
@embarc-gabriel embarc-gabriel self-requested a review January 20, 2025 10:17
@dozzzzer dozzzzer self-assigned this Jan 20, 2025
ProjectInfo projectInfo, SnapshotInfo snapshotInfo, std::string path,
RemoteProjectSnapshotStateCallback callback, bool downloadDetached);

void StartSync();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extra method for documentation purpose or is there another reason?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it to make the code more understandable to indicate that the actual sync starts within mRequestsThread.

I should made StartSync private, though; fixed that.

When the download thread was scheduled before shared_ptr to RemoteProjectSnapshot was created, then lambda was failing to acquire a weak_ptr to self, resulting in the request not being processed.

Now dispatch threads after the shared_ptr is initialized
@kryksyh kryksyh force-pushed the fix_freeze_during_download branch from 4c464e8 to 075185b Compare January 20, 2025 15:45
@dozzzzer
Copy link
Contributor

Tested. No freezes are observed when syncing is being resumed.

@kryksyh kryksyh merged commit a296274 into audacity:release-3.7.2 Jan 21, 2025
10 checks passed
@kryksyh kryksyh deleted the fix_freeze_during_download branch January 21, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AU3-bug Bugs from Audacity 3

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants