-
-
Notifications
You must be signed in to change notification settings - Fork 418
fix: add periodic yield to save_new_files #1040
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
base: main
Are you sure you want to change the base?
Conversation
I was able to get a segfault 70% of the time on startup with these steps.
|
This is essentially what I've tried, but I've only ever been able to get to it segfault maybe 5% of the time in comparison |
Replacing the call to add_entries with a time.sleep(2.0) might be more reliable. Also removes the need to revert to backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index = 0 | ||
while index < len(self.files_not_in_library): | ||
yield index | ||
end = min(len(self.files_not_in_library), index + 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the yield interval should probably be moved to a constant
Summary
Fixes #986
Replacing the
add_entries
call with asleep(2.0)
was still causing segfaults so this seems to be a Qt issue.Adding a yield before every call to
add_entries
keeps Qt happy.Tasks Completed