We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

Bug: If cover element fails to load, application doesn't exit when closed

asked 2014-01-18 02:24:10 +0200

MartinK gravatar image

When you assign an element to the cover property and its creation fails, the application does not exit when its window is closed.

This can be reproduced with the following minimal example:

import QtQuick 2.0
import Sailfish.Silica 1.0

ApplicationWindow {
    cover : Qt.resolvedUrl("Foo.qml")
    initialPage: Page {
        Button {
            text: "Hello world!"
            anchors.centerIn: parent
        }
    }
}

NOTE: The must be no "Foo.qml in the same folder as this QML file.

You can either place it to /usr/share and run it with sailfish-qml or running it directly with qmlscene from somewhere else. Both exhibit the same behavior - even after the window is closed, the application is still running and needs to be killed, for example with ctrl+c, to get back to the shell.

This could be quite a serious issue - I've managed to get several invisible qmlscenes running in the background, consuming a considerable amount of resources.

A sidenote: Setting the cover to a non-existing component also makes the cover transparent. The same effect can be achieved by setting the cover to null:

cover : null

This also makes the cover transparent but is not affected by the shutdown bug.

edit retag flag offensive close delete

Comments

i did not find this "sailfish-qml" you're speaking of, but i did find "qmlscene". in what package is this file?

AL13N ( 2014-01-19 14:55:17 +0200 )edit

You mean where does the sailfish-qml program come from ? IMHO it is the recommended program for running QML applications. As for which package it is in:

[nemo@localhost ~]$ rpm -qf /usr/bin/sailfish-qml
libsailfishapp-launcher-0.0.10-10.1.1.jolla.armv7hl
[nemo@localhost ~]$ rpm -qf /usr/bin/qmlscene
qtchooser-26-1.1.1.armv7hl

Plese note that when you want to run a file with sailfish-qml, it needs to be in this format:

/usr/share/<some name>/qml/<some name>.qml

And you run it like this:

sailfish-qml <some name>

But qmlscene can run a QML file directly:

qmlscene /path/to/my/file.qml

Still regardless if you use one or the other, you should be able to reproduce the cover bug.

MartinK ( 2014-01-19 15:38:16 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2014-07-03 22:17:00 +0200

Robin Burchell _ w00t gravatar image

updated 2014-07-03 22:17:19 +0200

This is fixed with a Qt upgrade, most likely related to the JavaScript engine. We've run into this before, but didn't bother investing resources into fixing it once we verified it would go away in the future.

I don't have an exact date for when Qt will be upgraded, other than "soon, possibly update9 or later".

[edit] And I verified that it does actually quit, on my device. ;)

edit flag offensive delete publish link more

Comments

@robin-burchell-_-w00t Qt upgrade has fixed this already?

simo ( 2014-12-20 12:42:16 +0200 )edit

Can someone from Jolla confirm that this has been fixed so that I can close the question ?

MartinK ( 2015-04-12 21:57:01 +0200 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2014-01-18 02:24:10 +0200

Seen: 396 times

Last updated: Jul 03 '14