SV: stack trace for the crash

Saether Jan-Arve Jan-Arve.Saether at theqtcompany.com
Mon Jan 25 01:33:58 PST 2016


Hi Thiago. 

The m_invalidateAfterRearrange contains a list of items that was attempted to get invalidated during a rearrange. However, since its a very bad idea to invalidate an item during an invalidate, we store those items that were attempted to get invalidated in a list, and then they are invalidated later (after the whole rearrange). (This is not ideal but it usually stems from a non-ideal configured layout in the application)

"non-ideal configured layout" usually happens due to bindings in the application such as 

 implicitWidth: width

(often they can be more disguised than the above though)
Such bindings should be avoided at all costs.

Therefore, I think it should be possible to fix this by making adjustments in the application (its a fix ought to be done anyway) by removing such bindings that I described above. (It would be great to get that confirmed).

Of course, this should not stack overflow, so its still an issue to be fixed on our side.

I will try to reproduce it here and create a issue for it.

Jan Arve

________________________________________
Fra: Thiago Macieira <thiago at macieira.org>
Sendt: 23. januar 2016 01:28
Til: subsurface at subsurface-divelog.org
Kopi: Saether Jan-Arve; Nurmi J-P
Emne: Re: stack trace for the crash

On Friday 22 January 2016 09:31:38 Dirk Hohndel wrote:
> #11 0x00007fffe40607f7 in QQuickGridLayoutBase::geometryChanged
> (this=this at entry=0x429ca50, newGeometry=..., oldGeometry=...) at
> qquicklinearlayout.cpp:500

> #12 0x00007ffff529a3a4 in QQuickItem::setImplicitSize
> (this=this at entry=0x429ca50, w=<optimized out>, h=h at entry=476) at
> items/qquickitem.cpp:6350

> #13 0x00007fffe406050d in QQuickGridLayoutBase::invalidate (this=0x429ca50,
> childItem=0x4071360) at qquicklinearlayout.cpp:431

> #14 0x00007fffe405ff7c in QQuickGridLayoutBase::rearrange (this=0x429ca50,
> size=...) at qquicklinearlayout.cpp:572

> #15 0x00007fffe40607f7 in QQuickGridLayoutBase::geometryChanged
> (this=this at entry=0x429ca50, newGeometry=..., oldGeometry=...) at
> qquicklinearlayout.cpp:500

Indeed, this looks like a qtquickcontrols bug. Whether this is caused by the
Plasma Components or not, I don't know, but given that the repeating frames
are entirely in Qt code, I don't think it is.

QQuickItem::setImplicitSize calls the geometryChanged virtual (overridden by
QQuickGridLayoutBase), which calls rearrange(), which loops over a list of
items to invalidate:

    foreach (QQuickItem *invalid, d->m_invalidateAfterRearrange)
        invalidate(invalid);

When invalidate() invalidates a child item, it may call setImplicitSize again.

The code in 5.6 has changed a little, but the principles are still the same.

Jan-Arve, JP, any hint you could offer? How is this supposed to work?

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the subsurface mailing list