So after three days of debugging I've been able to figure out why it is
crashing, why it's random and i can provide a quick workaround in unity8
code.


## Why is it crashing? ##

The problem exists because we use the QML cache and because Qt has this
bug https://bugreports.qt.io/browse/QTBUG-47709

The bug in Qt means that if for types with extended properties (Image
and "source" in our case coming from the SDK) an Item  is created before
the type is extended, all subsquent items of the same type won't see the
extended property either.

Since we're using the QML cache this means that the code loaded from the
cache expects the extended property to be there, so when it access such
property, it will crash.


## Why is it random? ##

It's random because the QML file loading is not always done in the
*exact* same order, and thus in some cases the first Image is created in
a file that imports Ubuntu.Components and in some cases the first image
is created in a file that does not.


## How to workaround it? ##

A quick workaround is making sure  Ubuntu.Components is imported in the
first file that is imported, in unity8's case UnityInputInfo.qml that is
a singleton imported from the root file (OrientedShell.qml)

** Changed in: unity8 (Ubuntu)
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity8 in Ubuntu.
https://bugs.launchpad.net/bugs/1473471

Title:
  unity8 crashes on boot

Status in Canonical System Image:
  Confirmed
Status in unity8 package in Ubuntu:
  In Progress

Bug description:
  On rc-proposed/bq-aquaris.en/krillin #64 and rc-
  proposed/meizu.en/arale #56 unity8 often crashes on boot, introducing
  a long delay while apport is doing its work.

  The process respawns and there doesn't seem to be any impact after
  boot.

  Report on errors.u.c: https://errors.ubuntu.com/oops/34eea84c-270c-
  11e5-a0a8-fa163e5bb1a2

  Most of the time maliit-server also crashes. I reported bug 1473469

  How to reproduce the crash:
   * Make sure your /var/crash in the phone is empty
   * run in the desktop
     while [ true ]; do echo "Checking if there is crash files"; output=`adb 
shell ls /var/crash`; if [ "x$output" != "x" ]; then break; fi; echo "No crash 
files, Rebooting"; adb reboot; echo "Sleeping for 100 seconds"; echo ""; sleep 
100; done

  Will stop because crash files have been generated in about 5
  iterations

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1473471/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to