Skip to content
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 for randomly not loaded CoverArt in Spinnies #11827

Conversation

JoergAtGithub
Copy link
Member

Im not sure if this fix is the appropriated solution, but it fixes the issue #11131 for me.
The problem is, that the requestor of cached CoverArt is not always WSpinnyBase - it can also be WCoverArt.

@github-actions github-actions bot added the ui label Aug 13, 2023
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

Every widget is running it's own request, because of size constrains.
There must be a race-codition that the cover is not requested of the responds is lost.
Is WSpinnyBase::slotTrackCoverArtUpdated always called?

@JoergAtGithub
Copy link
Member Author

I set a breakpoint in WSpinnyBase::slotTrackCoverArtUpdated() and it's was never called.

@ronso0
Copy link
Member

ronso0 commented Aug 13, 2023

I agree with daschuer, now the spinny will receive signals meant for other widgets, so it will receive more unneeded updates.

@JoergAtGithub You found out #11131 (comment)

The following function is executed three times, when a track is loaded into a deck. The first two times pixmap is alway NULL and it returns early. The third call differs in failure case, when the Coverart is not loaded, pixmap is NULL as well.

QPixmap WSpinnyBase::scaleToSize(const QPixmap& pixmap) const {
if (pixmap.isNull()) {
return QPixmap();
}
QPixmap scaled = pixmap.scaled(size() * devicePixelRatioF(),
Qt::KeepAspectRatio,
Qt::SmoothTransformation);
scaled.setDevicePixelRatio(devicePixelRatioF());
return scaled;
}

I wonder why it's called 3 times in the first place.

@ronso0
Copy link
Member

ronso0 commented Aug 24, 2023

Closing this one since the bug seems to by fixed en passant by #11840

@ronso0 ronso0 closed this Aug 24, 2023
@JoergAtGithub
Copy link
Member Author

Unfortunately this bug is not fixed by #11840

@JoergAtGithub JoergAtGithub reopened this Aug 24, 2023
@ronso0
Copy link
Member

ronso0 commented Aug 24, 2023

Sorry, I confused it with the slip indicator bug.

@JoergAtGithub
Copy link
Member Author

Closing this PR - I agree, that this is not the correct fix for this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants