Bug 431422 - Elisa intermittently crashed in KFileMetaData::Property::Property() when fetching lyrics tag
Summary: Elisa intermittently crashed in KFileMetaData::Property::Property() when fetc...
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-11 05:33 UTC by Be
Modified: 2023-11-16 04:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.12.2


Attachments
backtrace of the crash (5.72 KB, text/plain)
2021-01-11 05:33 UTC, Be
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Be 2021-01-11 05:33:50 UTC
Created attachment 134728 [details]
backtrace of the crash

SUMMARY
This crash occurs sometimes at the end of a track before starting to play the next one. See attached backtrace.


SOFTWARE/OS VERSIONS
Elisa: master branch, commit 422afda69bad7160f86c3d0607ab4487ccd94ce6
Linux: Fedora 33 
KDE Frameworks Version: 5.78
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-01-11 22:51:35 UTC
Crash is somewhere in KFileMetadata while trying to fetch lyrics; moving.

Do you have Baloo indexing turned off?

Is there any pattern? Does it always crash on one file or a set of files? Do all of the files that is crashes while trying to load have lyrics tags? Or do none of them? Or is it random?
Comment 2 Be 2021-01-12 04:27:23 UTC
In Elisa's preferences "Music indexing" defaulted to "Scan the filesystem directly". I tried switching that to "Use fast native indexer" but the crash still occurs.

There is no pattern other than it happens at the end of tracks. It does not happen consistently with any particular files.

AFAIK none of my files have lyrics tags. I just checked some files in Picard and did not see any lyrics tags.
Comment 3 Nate Graham 2021-01-12 19:51:41 UTC
Thanks.
Comment 4 Stefan Brüns 2021-01-22 16:25:55 UTC
@ngraham: The crash is in elisa, when iterating a QMap coming from KFM. Please provide any proof the QMap is incorrect. This has to be investigated in elisa first.
Comment 5 Matthieu Gallien 2021-01-22 18:41:03 UTC
(In reply to Stefan Brüns from comment #4)
> @ngraham: The crash is in elisa, when iterating a QMap coming from KFM.
> Please provide any proof the QMap is incorrect. This has to be investigated
> in elisa first.

I wanted to have a look as soon as I can to the different crashes including this one.

I have just noticed that the flatpak build seems mostly unaffected while a local build is crashing on me at each track changes.
Comment 6 Matthieu Gallien 2021-01-22 22:12:46 UTC
So this is a stupid concurrent access on one attributes of an object all within elisa's code.
Comment 7 Bug Janitor Service 2021-01-22 22:58:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/215
Comment 8 Matthieu Gallien 2021-01-23 22:47:29 UTC
Git commit e2845b589170de36851ff37d36d76697adde7440 by Matthieu Gallien.
Committed on 22/01/2021 at 22:51.
Pushed by mgallien into branch 'release/20.12'.

avoid concurrent access when fetching lyrics

M  +4    -2    src/models/trackmetadatamodel.cpp
M  +3    -0    src/models/trackmetadatamodel.h

https://invent.kde.org/multimedia/elisa/commit/e2845b589170de36851ff37d36d76697adde7440