Convert noisy assertions to warnings - #16040
Closed
ywwg wants to merge 1 commit into
Closed
Conversation
We know this can happen, and that it's not fatal to performance, so this can just be a warning. Part of mixxxdj#13262. Signed-off-by: Owen Williams <owilliams@mixxx.org>
Member
Author
|
I don't know if this is a good message, or approach |
acolombier
reviewed
Feb 25, 2026
| it = std::lower_bound(cfirstmarker(), clastmarker() + 1, position); | ||
| } | ||
| DEBUG_ASSERT(it == cbegin() || it == cend() || *it >= position); | ||
| DEBUG_ASSERT(it == cbegin() || it == cend() || *it > *std::prev(it)); |
Member
There was a problem hiding this comment.
I think we should keep this assert. If this one was to fail, this would be concerning and a debug assert is probably wise!
Member
Author
There was a problem hiding this comment.
sorry, it's hard to tell which one you mean -- the second assert on 471?
| DEBUG_ASSERT(it == cbegin() || it == cend() || *it >= position); | ||
| DEBUG_ASSERT(it == cbegin() || it == cend() || *it > *std::prev(it)); | ||
| if (!(it == cbegin() || it == cend() || *it >= position)) { | ||
| qWarning() << "Beats::iteratorFrom: unexpected iterator result, possibly invalid beats"; |
Member
There was a problem hiding this comment.
Should we put this into a qDebug since we know it has a low impact? Also, in lines with the finding, probably worth to highlight this is likely related to a rounding issue
Member
Author
There was a problem hiding this comment.
actually I am thinking since we have a good investigation going on the rounding problem, it's not worth changing these asserts at all.
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.
We know this can happen, and that it's not fatal to performance, so this can just be a warning.
Part of #13262.