<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 2 May 2016 at 13:14, Thiago Macieira <span dir="ltr"><<a href="mailto:thiago@macieira.org" target="_blank">thiago@macieira.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On domingo, 1 de maio de 2016 07:33:32 PDT Dirk Hohndel wrote:<br>
> Oh I'm so tired of this Qt bug. Thiago, we really need to get this addressed<br>
> in Qt. It's ridiculous that we keep running into this, keep trying to work<br>
> around it, and randomly trigger it again. And right now building the mobile<br>
> version on the desktop doesn't appear to trigger it, at least not for me. I<br>
> don't see it on Android, either. It's only on iOS :-(<br>
><br>
</span>[cut]<br>
<span class="">> etc until stack is overflowing. :-(<br>
><br>
> As you can see it alternates in setImpicitSize between 319x387 and 329x405 -<br>
> I can see ~1400 layers of stack with this same sequence, all for the same<br>
> object. I'm ready to just hack my own Qt that prevents such<br>
> flip-flopping...<br>
<br>
</span>That means the layout is unstable. When asked for what its preferred size is<br>
on qquicklinearlayout.cpp:414<br>
    const QSizeF pref = sizeHint(Qt::PreferredSize);<br>
the answer does not stabilise.<br>
<br></blockquote><div>Running subsurface-mobile on my laptop (under Fedora), I get an infinite loop (I think) by going through the dive list, selecting a dive, going back, selecting another.  It doesn't actually crash, but it stalls.  It looks related, and debugging under Linux is usually easier than on a mobile.<br><br>(gdb) bt<br>#0  0x00007ffff3743bc6 in __memcpy_avx_unaligned () from /lib64/libc.so.6<br>#1  0x00007fffd037c286 in QVector<QQuickItem*>::reallocData(int, int, QFlags<QArrayData::AllocationOption>) ()<br>   from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#2  0x00007fffd037c3a5 in QVector<QQuickItem*>::append(QQuickItem* const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#3  0x00007fffd037b1b1 in QQuickGridLayoutBase::invalidate(QQuickItem*) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#4  0x00007ffff442e0a0 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5<br>#5  0x00007ffff52cac63 in QQuickItem::baselineOffsetChanged(double) () from /lib64/libQt5Quick.so.5<br>#6  0x00007ffff5322122 in QQuickTextPrivate::updateSize() () from /lib64/libQt5Quick.so.5<br>#7  0x00007ffff5324d68 in QQuickText::geometryChanged(QRectF const&, QRectF const&) () from /lib64/libQt5Quick.so.5<br>#8  0x00007ffff52d0074 in QQuickItem::setSize(QSizeF const&) () from /lib64/libQt5Quick.so.5<br>#9  0x00007fffd037b603 in QQuickGridLayoutItem::setGeometry(QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#10 0x00007ffff4f94268 in QGridLayoutEngine::setGeometries(QRectF const&, QAbstractLayoutStyleInfo const*) () from /lib64/libQt5Gui.so.5<br>#11 0x00007fffd037ac9b in QQuickGridLayoutBase::rearrange(QSizeF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#12 0x00007fffd0379550 in QQuickLayout::geometryChanged(QRectF const&, QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#13 0x00007ffff52cfe34 in QQuickItem::setImplicitSize(double, double) () from /lib64/libQt5Quick.so.5<br>#14 0x00007fffd037b136 in QQuickGridLayoutBase::invalidate(QQuickItem*) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#15 0x00007fffd037acfc in QQuickGridLayoutBase::rearrange(QSizeF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#16 0x00007fffd0379550 in QQuickLayout::geometryChanged(QRectF const&, QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#17 0x00007ffff52cfe34 in QQuickItem::setImplicitSize(double, double) () from /lib64/libQt5Quick.so.5<br>#18 0x00007fffd037b136 in QQuickGridLayoutBase::invalidate(QQuickItem*) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#19 0x00007fffd037acfc in QQuickGridLayoutBase::rearrange(QSizeF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#20 0x00007fffd0379550 in QQuickLayout::geometryChanged(QRectF const&, QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#21 0x00007ffff52cfe34 in QQuickItem::setImplicitSize(double, double) () from /lib64/libQt5Quick.so.5<br>#22 0x00007fffd037b136 in QQuickGridLayoutBase::invalidate(QQuickItem*) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#23 0x00007fffd037acfc in QQuickGridLayoutBase::rearrange(QSizeF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#24 0x00007fffd0379550 in QQuickLayout::geometryChanged(QRectF const&, QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#25 0x00007ffff52cfe34 in QQuickItem::setImplicitSize(double, double) () from /lib64/libQt5Quick.so.5<br>#26 0x00007fffd037b136 in QQuickGridLayoutBase::invalidate(QQuickItem*) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#27 0x00007fffd037acfc in QQuickGridLayoutBase::rearrange(QSizeF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#28 0x00007fffd0379550 in QQuickLayout::geometryChanged(QRectF const&, QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#29 0x00007ffff52cfe34 in QQuickItem::setImplicitSize(double, double) () from /lib64/libQt5Quick.so.5<br>#30 0x00007fffd037b136 in QQuickGridLayoutBase::invalidate(QQuickItem*) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#31 0x00007fffd037acfc in QQuickGridLayoutBase::rearrange(QSizeF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#32 0x00007fffd0379550 in QQuickLayout::geometryChanged(QRectF const&, QRectF const&) () from /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so<br>#33 0x00007ffff52cfe34 in QQuickItem::setImplicitSize(double, double) () from /lib64/libQt5Quick.so.5<br>---Type <return> to continue, or q <return> to quit---q<br><br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have absolutely no idea how the layout engine works. The only hint I have is<br>
to check whether the constraints (the anchors) in whatever page is causing<br>
this issue make sense.<br>
<span class=""><br>
> Unfortunately I haven't figured out how to get to the innards of this "this"<br>
> pointer:<br>
><br>
> (QQmlPrivate::QQmlElement<QQuickGridLayout> *) $0 = 0x0000000132122370<br>
> (lldb) p *this<br>
> (QQuickItem) $1 = {<br>
>   QObject = {<br>
>     d_ptr = {<br>
>       d = 0x00000001329b8f80<br>
>     }<br>
>   }<br>
>   QQmlParserStatus = {<br>
>     d = 0x0000000000000000<br>
>   }<br>
> }<br>
<br>
</span>Try this:<br>
p *(QQuickItemPrivate *)d_ptr.d<br>
<span class="im"><br>
> Any idea how to get more information here? Or should I just hardcode a loop<br>
> detection?<br>
><br>
<br>
</span><span class=""><font color="#888888">--<br>
Thiago Macieira - thiago (AT) <a href="http://macieira.info" rel="noreferrer" target="_blank">macieira.info</a> - thiago (AT) <a href="http://kde.org" rel="noreferrer" target="_blank">kde.org</a><br>
   Software Architect - Intel Open Source Technology Center<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</div></div></blockquote></div><br></div></div>