Valgrind warning when theme is changed from MainViewStyle.qml

Bug #1330510 reported by Albert Astals Cid on 2014-06-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Zsombor Egri
ubuntu-ui-toolkit (Ubuntu RTM)

Bug Description

We are getting this warning in valgrind (with Qt 5.3)

==20334== Invalid read of size 8
==20334== at 0x581568A: QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) (qrecursionwatcher_p.h:94)
==20334== by 0x57A5A82: QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt&) (qqmlincubator.cpp:357)
==20334== by 0x57A6215: QQmlEnginePrivate::incubate(QQmlIncubator&, QQmlContextData*) (qqmlincubator.cpp:95)
==20334== by 0x57A169C: QQmlComponent::create(QQmlIncubator&, QQmlContext*, QQmlContext*) (qqmlcomponent.cpp:1072)
==20334== by 0x5DCE449: QQuickLoaderPrivate::_q_sourceLoaded() (qquickloader.cpp:721)
==20334== by 0x5DCE5E7: QQuickLoaderPrivate::load() (qquickloader.cpp:604)
==20334== by 0x581564D: QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) (qqmlobjectcreator.cpp:1202)
==20334== by 0x57A1076: QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) (qqmlcomponent.cpp:932)
==20334== by 0x57A1108: QQmlComponentPrivate::completeCreate() (qqmlcomponent.cpp:968)
==20334== by 0x57A0FCF: QQmlComponent::create(QQmlContext*) (qqmlcomponent.cpp:795)
==20334== by 0x5DD538E: QQuickView::continueExecute() (qquickview.cpp:489)
==20334== by 0x5DD5AB3: QQuickViewPrivate::execute() (qquickview.cpp:133)
==20334== by 0x407045: startShell(int, char const**, void*) (main.cpp:162)
==20334== by 0x407A74: main (main.cpp:227)
==20334== Address 0x20df8968 is 104 bytes inside a block of size 112 free'd
==20334== at 0x4C2C2BC: operator delete(void*) (vg_replace_malloc.c:503)
==20334== by 0x5815FB0: QQmlObjectCreator::~QQmlObjectCreator() (qqmlobjectcreator.cpp:156)
==20334== by 0x57A52AA: QQmlIncubatorPrivate::clear() (qscopedpointer.h:62)
==20334== by 0x57A53C6: QQmlIncubator::clear() (qqmlincubator.cpp:577)
==20334== by 0x5DCD7CF: QQuickLoaderPrivate::clear() (qquickloader.cpp:95)
==20334== by 0x5DCEB02: QQuickLoader::setSourceComponent(QQmlComponent*) (qquickloader.cpp:472)

Because MainViewStyle.qml is replacing the theme once it gets loaded (if it needs to go Dark) and we're basically changing the component in MainView.qml while the component is being loaded and it seems Qt doesn't like that.

Not sure if it could be argued this is a Qt 5.3 bug, haven't tried if the warning is there in Qt 5.2

Related branches

Albert Astals Cid (aacid) wrote :

Just in case upstream actually may think it's an upstream bug i've reported

Albert Astals Cid (aacid) wrote :

There's an upstream fix i have not had time to check if it fixes it.

Tim Peeters (tpeeters) on 2014-10-01
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Zsombor Egri (zsombi)
importance: Medium → Undecided
Zoltan Balogh (bzoltan) on 2014-11-24
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
status: New → Confirmed
Zoltan Balogh (bzoltan) on 2014-11-24
no longer affects: ubuntu-ui-toolkit
Zsombor Egri (zsombi) wrote :

Not checked with Valgrind, however the binding loops on properties were still there with the fix. The auto-theming got moved into MainView and is only applied for system themes.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.1.1364+15.04.20141209-0ubuntu1

ubuntu-ui-toolkit (1.1.1364+15.04.20141209-0ubuntu1) vivid; urgency=medium

  [ Zsombor Egri ]
  * Theming fixes: application theming, binding loop fix, auto-theming
    moved into MainView and it is applicable only on Ambiance and
    SuruDark, SuruGradient is no longer auto-themed.
    Fixes: LP: #1213043, LP: #1277647, LP: #1330510, LP: #1356779,
           LP: #1389792.
  * ServiceProperties component to Ubuntu.Components 1.1.
    Fixes: LP: #1391877.
  * New ListItem component base. Support for leading/trailing actions.
    Exported in Ubuntu.Components 1.2 UNSTABLE release.
    Fixes: LP: #1097728, LP: #1372592, LP: #1383870.
  * removing failing ServiceProperties and app-theming branches
  * Application theming ant other theming related binding loop fixes
  * ServiceProperties DBus property watcher

  [ Christian Dywan ]
  * Do the default theme check properly: for non-debug and without
    build errors.
  * Don't activate the control in ListItem.Standard implicitly.
    Fixes: LP: #1372563.
  * Improve AutoPilot caret dragging test cases.
  * Use new qt_gl_set_global_share_context setter with Qt 5.4.
    Fixes: LP: #1397979.
  * Add sortCaseSensitivity to the SortFilterModel example.
    Fixes: LP: #1391034.
  * Change offending links into bold font. Fixes: LP: #1395011.

  [ Daniel d'Andrada ]
  * This is needed by unity8 for the "shell rotation" feature (ie
    shell does all the rotation work instead of apps rotating
    themselves). unity8's dialogs (like the power dialog when you
    long press the power button) should follow its parent item
    rotation and size, as one would expect, and not be sneakily
    reparented to the scene root item, in which case the shell
    UI would be rotated but its dialog would not.
    Related bug LP: #1394511. Fixes: LP: #1394511.

  [ Tim Peeters ]
  * Remove the old header separator style. Fixes: LP: #1372590.

  [ Loïc Molinari ]
  * Made the UCAlarmPrivate destructor private.

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Tue, 09 Dec 2014 11:47:33 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers