https://bugs.kde.org/show_bug.cgi?id=508783

--- Comment #5 from mydarkstar <[email protected]> ---
The only thing I find in the logs is:

Sep 07 14:57:42 plasmashell[1423]: kf.quickcharts.datasource: ModelSource:
Invalid role  -1 "data"
Sep 07 14:57:42 plasmashell[1423]: KCrash: Application 'plasmashell'
crashing... crashRecursionCounter = 2
Sep 07 14:57:42 systemd-coredump[14589]: Process 1423 (plasmashell) of user
1000 terminated abnormally with signal 11/SEGV, processing...

But `kf.quickcharts.datasource: ModelSource: Invalid role  -1 "data"` already
appears multiple times before that without a crash.

I can reliably reproduce this warning by opening a file from the remote server
in Okular or Gwenview.
The "Copying (to /tmp/XXXX)" notification appears and the warning gets printed
to the logs.

However, I'm unable to reproduce the crash just by doing this.

I think the following information from the coredump might help (in addition to
what Eduard sent):
(gdb) f 9
#9  0x000079aca5785e1d in ModelSource::item (this=0x5724026eecd0, index=0)
    at
/usr/src/debug/kquickcharts/kquickcharts-6.17.0/src/datasource/ModelSource.cpp:93
93              return m_model->data(modelIndex, m_role);

(gdb) l -
71          // For certain model (QML ListModel for example), the roleNames()
are more
72          // dynamic and may only be valid when this method gets called. So
try and
73          // lookup the role first before anything else.
74          if (m_role < 0) {
75              if (m_roleName.isEmpty()) {
76                  return QVariant{};
77              }
78
79              m_role = m_model->roleNames().key(m_roleName.toLatin1(), -1);
80              if (m_role < 0) {
81                  qCWarning(DATASOURCE) << "ModelSource: Invalid role " <<
m_role << m_roleName;
82                  return QVariant{};
83              }
84          }
85
86          if (!m_indexColumns && (m_column < 0 || m_column >
m_model->columnCount())) {
87              qCDebug(DATASOURCE) << "ModelSource: Invalid column" <<
m_column;
88              return QVariant{};
89          }
90
91          auto modelIndex = m_indexColumns ? m_model->index(0, index) :
m_model->index(index, m_column);
92          if (modelIndex.isValid()) {
93              return m_model->data(modelIndex, m_role);
94          }
95
96          return QVariant{};
97      }

m_role == 0
m_roleName == "data"
m_indexColumns == false
m_column == 0
index == 0
modelIndex: row 0, column 0, internal pointer = 0x57240723c140
m_model == (QAbstractItemModel*)0x57240723c140

The model object at 0x57240723c140 resolves to a QQmlListModel-type object
(vtable = QQmlPrivate::QQmlElement).

I assume ModelSource called m_model->data(modelIndex, 0) while m_roleName ==
"data", but the model did not report a matching role, causing a segfault inside
QQmlListModel::data() in some cases.

Not sure how to investigate this further. Hopefully Arjen can take it from
here.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to