-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix debug assert in CachingReader #2309
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ca6c414
move freeAllChunks() to the engine thread and use a std::atomic enum …
daschuer bbf2d17
Revert renaming of member
uklotzde 5cbab1e
Rename factory function
uklotzde 0e7cbf9
Add lost line
uklotzde f2802da
Use a QAtomicInt for storing the CachingReader state
uklotzde ff61eeb
Remove obsolete virtual functions
uklotzde d02ae6f
move workReady call to CachingReaderWorker::newTrack()
daschuer 26dd7ce
Reorder calls for a better documentation. Don't clean up chunks befor…
daschuer b893fe6
Fix critical() in case of two consecutive track loads
daschuer c1bab77
invert warning condition and remove debug leftover.
daschuer d7737df
Remove commented debugging code
daschuer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
You don't need to move the debug assertion. The condition must be valid while looping, independent of the update message.Ignore my comment. But I still don't understand when and why this might happen.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.
At the original position it happen when you have ejected the track.
In this case the "idle" state has overwritten the "loading" state because a null track was loaded. After loading a new non null track we receive the "loaded" signal while in idle state.
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.
We should receive TRACK_LOADED/UNLOADED messages only while the state is Loading. The Idle state is set after we have received TRACK_UNLOADED. We should not receive any messages from the worker until the state has been changed from Idle to Loading again.
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.
The issue is that the cue is not processed after ejecting the track. That is why the idle message is still in the queue and overwrite the loading message.
This is not much of an issue, but I see how it is surprising.
I will look how to solve this.
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.
It is not an issue to overwrite the loading message because the very next message is the loaded message and the cue was purged until the loading state was there. Purging is stopped by the idle message.
Can we solve this by renaming?