Comment 41 for bug 1770044

Revision history for this message
In , Mmar-m (mmar-m) wrote :

I can reliably reproduce this crash on Kubuntu 18.04. I tried to debug it using the Git version of print-manager. I’m not familiar with the code, so I don’t think I can submit a patch, but I think I can pinpoint the problem.

The crash occurs in line 328 in JobModel.cpp (in JobModel::updateJob()):
<https://github.com/KDE/print-manager/blob/9172f63f16a663b58de919e485579453e12d5560/libkcups/JobModel.cpp#L328>

The line is:

if (item(pos, ColStatus)->data(RoleJobState).toInt() != jobState) {

The expression item(pos, ColStatus) evaluates to NULL, hence the crash.

In my case, updateJob() is called from JobModel::getJobFinished() at line 202 within a branch described as "found at wrong position, take it and insert on the right position", see
<https://github.com/KDE/print-manager/blob/9172f63f16a663b58de919e485579453e12d5560/libkcups/JobModel.cpp#L202>

Perhaps this is already enough for one of the developers to come up with a solution. I’d be happy to help as much as I can.