lp1879160: Log warning about cover load failure only once#2815
lp1879160: Log warning about cover load failure only once#2815daschuer merged 10 commits intomixxxdj:2.3from uklotzde:coverartcache
Conversation
|
I'll test this with the tracks I tested earlier when I'm back next days. |
| }; | ||
|
|
||
| LoadedImage() | ||
| : result(Result::ErrorUnknown) { |
There was a problem hiding this comment.
Is this correct that the initial state is considered as errror?
How about "NoResult" or "NotLoaded" or something.
There was a problem hiding this comment.
This is correct, because it will never happen. See the DEBUG_ASSERT in the loadImage() function.
I will hide the default constructor, because LoadedImage should only be created by the loadImage() function.
|
Sorry, seems CPU issue is not solved at all. I tested like this:
|
|
@ronso0 I can confirm the high CPU load. But I guess it is still present in the current version after we have removed just the log message. Is this correct? |
|
Yes, it's back in 2.3 eventhough I was testing for exactly that when disabling the log message in #2805 For now, to avoid CPU issues until there's an ultimate solution I use https://github.com/ronso0/mixxx/tree/cover-highCPU-hack which inserts a pink checkered dummy image EDIt and prints the track location to the log. |
|
I'll test this the next days. |
|
Yup, can confirm the high CPU issue is solved, and it shows the average color from the previous cover image. |
|
OK, Thank you. So we can finally merge. |

Fixes https://bugs.launchpad.net/mixxx/+bug/1879160 without suppressing warnings. The actual issues are already fixed, but currently we don't notice when loading a cover image fails.
Solution: Forward the results of loading cover images to CoverArtCache instead of logging failures directly. In CoverArtCache we are able to detect failed attempts and log the warning for each file path only once per session.
@Holzhaus This PR causes merge conflicts with #2524 which needs to be rebased afterwards. I have already resolved most of them by cherry-picking the initial commit from this PR.