Summary: | Amarok crashes when saving lyrics [QMapNode<AmarokSharedPointer<Meta::Track>] | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Jürgen Thomann <juergen_thomann> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | juergen_thomann |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | kf5 | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/multimedia/amarok/commit/7f800a80dac088461d102580984b6b95cbe468c0 | Version Fixed In: | 2.9.72 |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
New crash information added by DrKonqi |
Description
Jürgen Thomann
2020-11-06 21:07:14 UTC
looks like a typo in the code... I compiled Amarok from sources to see when the problem was introduced but even with a commit from 2018 (f296b39c89ed78fa58409862517f625d7f782bcc) it crashes... I tried it with Qt 5.15.2 and the crash is not always at the same place but still crashes always when changing lyrics. With valgrind Amarok does not even load a GUI before it gets killed. If you have some ideas that I could try to help, let me know. Created attachment 135796 [details]
New crash information added by DrKonqi
amarok (2.9.71) using Qt 5.15.2
This crash looks interesting, as the destructor is called which destroys ui and later it checks for changes in the tags. Could be interesting, but maybe it is OK because I don't know how destructors are processed in C++
Amarok is compiled from current git master
-- Backtrace (Reduced):
#6 QFragmentMapData<QTextFragmentData>::length(unsigned int) const (this=<optimized out>, this=<optimized out>, field=0) at ../../include/QtGui/5.15.2/QtGui/private/../../../../../src/gui/text/qfragmentmap_p.h:147
#7 QFragmentMap<QTextFragmentData>::length(unsigned int) const (field=0, this=<optimized out>) at ../../include/QtGui/5.15.2/QtGui/private/../../../../../src/gui/text/qfragmentmap_p.h:822
#8 QTextDocumentPrivate::length() const (this=<optimized out>) at text/qtextdocument_p.h:220
#9 QTextDocumentPrivate::plainText() const (this=0x2dec050) at text/qtextdocument_p.cpp:1339
#10 0x00007fdc840f5002 in QTextDocument::toPlainText() const (this=<optimized out>) at text/qtextdocument.cpp:1207
Created attachment 138075 [details]
New crash information added by DrKonqi
amarok (2.9.71) using Qt 5.15.2
Current Backtrace
Seems like the Syntaxhiglighter sets the document during deletion that triggers a signal which causes access to already deleted objects when checking for changes in the objects of the UI
-- Backtrace (Reduced):
#6 QFragmentMapData<QTextFragmentData>::length(unsigned int) const (this=<optimized out>, this=<optimized out>, field=0) at ../../include/QtGui/5.15.2/QtGui/private/../../../../../src/gui/text/qfragmentmap_p.h:147
#7 QFragmentMap<QTextFragmentData>::length(unsigned int) const (field=0, this=<optimized out>) at ../../include/QtGui/5.15.2/QtGui/private/../../../../../src/gui/text/qfragmentmap_p.h:822
#8 QTextDocumentPrivate::length() const (this=<optimized out>) at text/qtextdocument_p.h:220
#9 QTextDocumentPrivate::plainText() const (this=0x558b83e85dc0) at text/qtextdocument_p.cpp:1339
#10 0x00007f1ef8e887b2 in QTextDocument::toPlainText() const (this=<optimized out>) at text/qtextdocument.cpp:1207
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/27 Git commit 7f800a80dac088461d102580984b6b95cbe468c0 by Pedro Gomes, on behalf of Jürgen Thomann. Committed on 25/06/2021 at 21:20. Pushed by pgomes into branch 'master'. Prevent Signal from kRichTextEdit during deletion When the ui is deleted, the deletion of KRichTextEdit will cause a new signal that will trigger textChanged. As we are already deleting all objects in the ui, the check for changes in textChanged will access already deleted objects which crashes Amarok. FIXED-IN: 2.9.72 M +3 -0 src/dialogs/TagDialog.cpp https://invent.kde.org/multimedia/amarok/commit/7f800a80dac088461d102580984b6b95cbe468c0 |