Crash when using loadTheme in conjunction with widgets that have an Animation defined in default.qmltheme (Popover, Switch, etc.)

Bug #1175394 reported by Alan Pope 🍺🐧🐱 🦄
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Zsombor Egri
mediaplayer-app
Fix Released
Critical
Renato Araujo Oliveira Filho
platform-api
Invalid
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned

Bug Description

Installed latest image (109) on my Nexus 7 and the media player fails to launch. I get a blank black screen..

Here's my logcat..

http://paste.ubuntu.com/5624427/

Related branches

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

alan@deep-thought:~$ adb shell grep JENKINS /system/ubuntu_stamp
JENKINS_BUILD=116

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Same here, and dropping-letters was crashing on startup on my n7 as well when it tried to load Audio.

Changed in platform-api:
status: New → Confirmed
Changed in ubuntu-ui-toolkit:
importance: Undecided → Critical
Revision history for this message
Bill Filler (bfiller) wrote :

the app crashes when loading the qml theme. I believe the problem is in the sdk.

To reproduce:
1) launch media player
it crashes

To workaround:
- comment out this line in qml/player/TimeLine.qml
var result = Theme.loadTheme(Qt.resolvedUrl("../theme/theme.qmltheme"))

and the crash will go away

Changed in ubuntu-ui-toolkit:
assignee: nobody → Florian Boucault (fboucault)
Revision history for this message
Bill Filler (bfiller) wrote :

qtdeclarative5-ubuntu-ui-toolkit-plugin 0.1.46daily13.05.08ubuntu.unity.next-0ubuntu1

Revision history for this message
Florian Boucault (fboucault) wrote :

Stack trace of the crash (from renato):

Program received signal SIGSEGV, Segmentation fault.
0x478959dc in QHash<QString, QQmlProperty>::findNode(QString const&, unsigned int*) const ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
(gdb) bt
#0 0x478959dc in QHash<QString, QQmlProperty>::findNode(QString const&, unsigned int*) const ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
#1 0x47894ffa in UCStyle::unbindProperty(QString const&) ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
#2 0x4788271e in ItemStyleAttachedPrivate::_q_attacheePropertyChanged() ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
#3 0x47882f8a in ItemStyleAttached::qt_metacall(QMetaObject::Call, int, void**) ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
#4 0x403d0be0 in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#5 0x403e4dda in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#6 0x405a0226 in QQmlData::destroyed(QObject*) ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5
#7 0x403e9722 in QObject::~QObject() ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#8 0x407039fc in QQuickAbstractAnimation::~QQuickAbstractAnimation() ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#9 0x40703a5c in QQuickPropertyAnimation::~QQuickPropertyAnimation() ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#10 0x406fa916 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#11 0x406fa916 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Revision history for this message
Florian Boucault (fboucault) wrote :

With more symbols:

Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) bt
#0 QHash<QString, QQmlProperty>::findNode (this=this@entry=0x27b150,
    akey=..., ahp=ahp@entry=0x0) at /usr/include/qt5/QtCore/qhash.h:885
#1 0x47994ffa in contains (akey=..., this=0x27b150)
    at /usr/include/qt5/QtCore/qhash.h:867
#2 UCStyle::unbindProperty (this=0x27b148, property=...) at ucstyle.cpp:155
#3 0x4798271e in ItemStyleAttachedPrivate::_q_attacheePropertyChanged (
    this=0x1925b0) at itemstyleattached.cpp:221
#4 0x47982f8a in ItemStyleAttached::qt_metacall (this=0x197fe8,
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbeffed4c)
    at moc_itemstyleattached.cpp:148
#5 0x403d0be0 in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#6 0x403e4dda in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#7 0x405a0226 in QQmlData::destroyed(QObject*) ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5
#8 0x403e9722 in QObject::~QObject() ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#9 0x407039fc in QQuickAbstractAnimation::~QQuickAbstractAnimation() ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#10 0x40703a5c in QQuickPropertyAnimation::~QQuickPropertyAnimation() ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#11 0x406fa916 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#12 0x406fa916 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Revision history for this message
Florian Boucault (fboucault) wrote :

Workaround for the media player that does not cause regressions:

=== modified file src/qml/player/TimeLine.qml
--- src/qml/player/TimeLine.qml 2013-04-15 12:58:52 +0000
+++ src/qml/player/TimeLine.qml 2013-05-08 18:54:03 +0000
@@ -20,6 +20,7 @@
 import QtQuick 2.0
 import Ubuntu.Components 0.1
 import "../sdk"
+import "../theme"

 Item {
     id: _timeLine
@@ -40,13 +41,10 @@
     // "property alias value: _slider.value" does not work
     Binding { target: _slider; property: "value"; value: _timeLine.value }

- Component.onCompleted: {
- var result = Theme.loadTheme(Qt.resolvedUrl("../theme/theme.qmltheme"))
- }
-
     Slider {
         id: _slider

+ ItemStyle.delegate: VideoSlider {property Item item: _slider}
         objectName: "TimeLine.Slider"
         anchors {
             top: parent.top

Revision history for this message
Florian Boucault (fboucault) wrote :

More complete stacktrace: http://pastebin.ubuntu.com/5645689/

Revision history for this message
Florian Boucault (fboucault) wrote :

Attaching minimal test program that reproduces the crash on the Galaxy Nexus phone:

$ /usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene --desktop_file_hint=/usr/share/applications/media-player.desktop crasher.qml

Revision history for this message
Florian Boucault (fboucault) wrote :

Necessary for the crasher.qml test program.

Revision history for this message
Florian Boucault (fboucault) wrote :

Actually, the test program still crashes _without_ instantiating the Slider. New version:

import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1

Item {
    Popover {
    }
    Component.onCompleted: Theme.loadTheme(Qt.resolvedUrl("theme.qmltheme"))
}

Revision history for this message
Florian Boucault (fboucault) wrote :

I believe the QQuickPropertyAnimation mentionned in the stack trace to be the Popover fading animation from the default theme:

.popover {
    [...]
    fadingAnimation: PropertyAnimation{duration: 125; easing.type: Easing.OutQuint};
}

Removing it prevents the crash from happening.

Changed in ubuntu-ui-toolkit:
status: New → Confirmed
assignee: Florian Boucault (fboucault) → Zsombor Egri (zsombi)
Revision history for this message
Florian Boucault (fboucault) wrote :

@Ken: the dropping letters crash when loading Audio is unrelated.

Changed in platform-api:
status: Confirmed → Invalid
Changed in mediaplayer-app:
status: New → In Progress
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
importance: Undecided → Critical
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mediaplayer-app at revision 79, scheduled for release in mediaplayer-app, milestone Unknown

Changed in mediaplayer-app:
status: In Progress → Fix Committed
summary: - Media player won't launch
+ Crash when using loadTheme in conjunction with widgets that have an
+ Animation defined in default.qmltheme (Popover, Switch, etc.)
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
Zsombor Egri (zsombi) wrote :

The crash happens when the .popover style is deleted. During deletion the styled item's fadingAnimation property gets changed, and the logic tries to ban the property from being themed by removing the style object's bindings to the property. However the style is invalid at that time, therefore the crash.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision 493, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Changed in mediaplayer-app:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (23.9 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46daily13.06.05.1-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46daily13.06.05.1-0ubuntu1) saucy; urgency=low

  [ Zoltán Balogh ]
  * update the example app for the latest UI Toolkit.
  * A simple app to check few locales.
  * Add qttools5-dev-tools to build dependencies to provide
    qhelpgenerator for creating QtC help files from documentation.
  * Build documentation and publish the qch file.
  * Offer symlinks for qmlscene via 'qmlrunner' package. See package
    description for usage instructions. (LP: #1155634). (LP: #1155634)

  [ Loïc Molinari ]
  * [UbuntuShape] Correctly stored the current material. (LP: #1132771)
  * [UbuntuShape] Ensured the texture is available in updatePaintNode().
    (LP: #1171437)

  [ Kaleo ]
  * QML_IMPORT_PATH is deprecated for QtQuick 2.0. Switch to
    QML2_IMPORT_PATH.
  * Added syntax description for CHANGES file in CHANGES.syntax.
  * UCScalingImageProvider: respect 'requestedSize' parameter. That
    ensures that the 'sourceSize' property of Image is respected even
    when the toolkit automatically scales the asset for the device. (LP:
    #1130120)
  * Added documentation for bitmap suffixes in the resolution
    independence page. (LP: #1092051)
  * Revamped component showcase now called 'Ubuntu UI Toolkit Gallery'.
    Works on Ubuntu Touch. (LP: #1130603)
  * Benchmarks for time critical components.
  * Added ListItem.ValueSelector example. Fixed incorrect 'Multi value'
    label. (LP: #1172663)
  * Toolkit Gallery: added examples for Sheets.
  * Automatic rotation of applications depending on the device
    orientation. For applications that are using MainView, they opt-in
    by setting 'automaticOrientation' to true. New component
    OrientationHelper for applications that do not use MainView but
    still need an easy way to automatically rotate.
  * UbuntuShape: fix slight distortion of image when set. This
    distortion was quite disturbing when the content has text in it, as
    it is often the case in Popups and Popovers. (LP: #1170878)
  * Use standard animation ubuntu snap beat for popups fade in.
  * Removed unnecessary clipping from Tabs, Popover, Dialog and
    MainView.
  * All ListItems: set default contents right and left margins to 2 gu.
    ListItems Base, Standard and ValueSelector: deprecated private
    properties __leftIconMargin and __rightIconMargin IconVisual
    (private): removed properties leftIconMargin and rightIconMargin
    Standard: removed ugly progression highlight background when there
    is no split.
  * ListItems: constrain size of the icon by default. Deprecated private
    properties __iconWidth and __iconHeight.
  * Ubuntu UI Toolkit Gallery tweaks: - Made window wider and left
    column the width of the phone: 40gu. - Removed 'slider.' from Slider
    example's labels. - Renamed 'Switches' into 'Toggles'. Renamed
    'Progress Bars' into 'Progress and activity'. - Use resolution
    independence for navigation example screenshots.
  * Support source with quotes in .sci files. (LP: #1080719)
  * Reverted unjustified changes to ubuntu-ui-toolkit-gallery.desktop.
  * Popover: simplified com...

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

raring has seen the end of its life and is no longer receiving any updates. Marking the raring task for this ticket as "Won't Fix".

Changed in ubuntu-ui-toolkit (Ubuntu Raring):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.