Waveform mark fixes - #15968
Conversation
…ve an update via Cue::updated()
…eceive an update via Cue::updated()
acolombier
left a comment
There was a problem hiding this comment.
Thanks for looking into this.
I haven't yet completely understood how removing the connectSample*Changed impact the waveform rendering. I need to dig deeper to understand how the scene invalidation would work, especially of the context of the rendergraph with the scenegraph (though not important for 2.6, but important to know if we pull this fix forward)
|
The waveform marks have the "....position" co. If you change position let's say for '[Channel1],hotcue_1_position' form the developers window, you see the three backtracks from above. This PR remove the redundant last one, which is from the connection to This is all is unrelated to the rendering itself. It is just a question about the way position changes are causing a visual update. |
|
Code looks great and uncontroversial, I'll do some quick hand QA to make sure there aren't any immediate issues |
|
Let's just make sure Antoine is ok with the changse as well |
|
Did you merge this PR to main? |
|
No, compared with 2.6 |
|
I am seeing this too, if I open mixxx --qml and load a track with marks, the marks don't show up the first time. they do show up on subsequent track loads (including the same track). I suspect the connections are not being made in the right order |
|
Ah I see, only the very first track is affected. |
…f hot cue markers is not supported.
…f showing none or old hot cues.
|
I have found the issue. It was related to using an half baked track object in case of QML. I think we have a conceptual issue here. In case of QML rendering is done by the QSGRenderThread concurrently accessing the main thread resources without synchronisation. Not sure if this is actually an issue, but we should consider a clear separation to not suffer random crashes with the QML GUI. Currently the variable "m_updateImagesImmediately" is used to control the differenc between QML Multithreading and Widgets single thread. |
|
would it help to have a short meeting to discuss the issue? it sounds like we have uncovered a design flaw that we will need to reconcile to prevent issues like this in the future. |
|
we can still merge this cleanup once I confirm the cue issue has been fixed |
|
can confirm, marks appear on first load now |
|
Note that QML should manage this synchronisation implicitly AFAIU, the only case we need to manage it explicitelt is for multi threaded rendering engine. I will have a look at this PR, but remove the change request in case I take too long. |
Removing as Owen as confirmed the issue is fixed!
| Q_UNUSED(pOldTrack); // only used in DEBUG_ASSERT | ||
| DEBUG_ASSERT(getTrackInfo() == pOldTrack); | ||
| setCurrentTrack(pNewTrack); | ||
| setCurrentTrack({}); |
There was a problem hiding this comment.
Could you clarify why this is needed? As I understand, setCurrentTrack will still be called in QmlWaveformDisplay::slotTrackLoaded, which was previously discarded as the current track would already be set. Was that causing trouble? Might be good to capture the explanation in a comment so we don't accidentally add this back in the future.
There was a problem hiding this comment.
During loading a new Track all data is populated one by one. We want to remove the old track during that time and pass the new one once it is finished and ready for use in slotTrackLoaded() above.
Maybe this helps also to fix @ywwg race condition.
There was a problem hiding this comment.
Thanks for the explanation.
From my discovery, this won't help with the race condition.
|
Just to confirm my message above, I can confirm that Qt guaranties synchronisation between the GUI thread and
|
|
I can confirm the issue with marker not displaying is fixed. Thank you. |
|
Unfortunately this introduces some update regressions in the overview.
Loop cues:
Same delay after clearing hotcues: they're removed only after forced repaint (hover overview) mixxx-overview-hotcues-delayed-update.webm |



This fixed [Skin],show_intro_outro_cues for scrolling waveforms #15967
The issue was that init() was used for connecting controls before the waveform marks have been found.
This also removes a double marks updates. The "position" and "end_positions" were directly connected in case of WOverview and it is updated by Cue::updated(). In case of scrolling waveform this connection was broken anyway.
It is also involved in #15954 so the fix here might have an positive effecrt
These were the call stacks showing the redundant updates.: