Latest iOS release

Marco Martin notmart at gmail.com
Mon May 2 05:33:02 PDT 2016


On Mon, May 2, 2016 at 5:14 AM, Thiago Macieira <thiago at macieira.org> wrote:
> That means the layout is unstable. When asked for what its preferred size is
> on qquicklinearlayout.cpp:414
>     const QSizeF pref = sizeHint(Qt::PreferredSize);
> the answer does not stabilise.
>
> I have absolutely no idea how the layout engine works. The only hint I have is
> to check whether the constraints (the anchors) in whatever page is causing
> this issue make sense.

I have a patch that even if is a bit a work around, I think it makes
things more reliable anyways (so would be good even if the bug wasn't
there).

Can somebody hitting the crash on iOS or on the devel machine try to
rebuild with attached patch?

putting some debug around, I seen that the things that were actually
returning a non stable size hint were some Label elements (so in the
end the primitive Text element)
those with "Buddy:" "Cylinder:" and so on.

One thing I seen is that every single text element in that grid layout
had wrap anywhere set. Regardless of the upstream bug that probably is
indeed there, this can cause problems, as we have a grid of two
columns, with each column having its width that depends from the width
of the other. Since the implicit width depends from text layouting, if
the text can wrap anywhere, if i resize the label, making it wrapping
to two lines, its implicit width will change as well, so it seems this
infinite recursion was due to the label answering once that it wanted
its size as one line, the time after as wrapped in two lines, then as
one line again etc.

I think disabling wrapping for those small labels helps. it solves the
crash for me.
if as the attached patch disabling the wrapping altogether is deemed
too much, using WordWrap as wrapmode would be already better (trying
hard to wrap at word boundaries before splitting words).

--
Marco Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-wrap-labels.patch
Type: text/x-patch
Size: 1856 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160502/87059121/attachment.bin>


More information about the subsurface mailing list