Text layout: Fix crash due to use of invalid FrameIterator
ClosedPublic

Authored by danders on Nov 23 2016, 8:32 AM.

Details

Summary

To keep app responsive layouting is chopped up in parts and
an iterator is used to remember where to continue.
In some (unknown) situations the QTextFrame the iterator refers to is deleted.
This patch implements an isValid() method that is checked before the iterator is used.

The crash is easily triggered by adding a chart to words or sheets and
eg show grid or hide axis label.

Test Plan

Tested by creating complex document in words, checking that layout is sane and complete.

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
danders updated this revision to Diff 8434.Nov 23 2016, 8:32 AM
danders retitled this revision from to Text layout: Fix crash due to use of invalid FrameIterator.
danders updated this object.
danders edited the test plan for this revision. (Show Details)
danders added a reviewer: boemann.
Restricted Application added projects: KEXI, Calligra: 3.0. · View Herald TranscriptNov 23 2016, 8:32 AM
boemann accepted this revision.Nov 23 2016, 10:08 PM
boemann edited edge metadata.

ok let us try it out

This revision is now accepted and ready to land.Nov 23 2016, 10:08 PM
This revision was automatically updated to reflect the committed changes.