Active object leave: -14



  • Hello all,
    I have a problem with "QML Video element":http://doc.qt.nokia.com/qtmobility/qml-video.html

    My application is developed for Symbian (I use Qt Quick components). I use "pageStack":http://doc.qt.nokia.com/qt-components-symbian/qml-pagestack.html system for manipulating with pages.

    MainPage.qml
    @
    import QtQuick 1.1
    import com.nokia.symbian 1.1
    import QtMultimediaKit 1.1
    import Mediakey 1.0
    import "Api.js" as Api

    Page {
    id: mainPage
    orientationLock: PageOrientation.LockPortrait

    Image {
        source: "images/background.png"
        id: content
        anchors.fill: parent
    
        Button {
            anchors.top: parent.top
            anchors.topMargin: 10
            anchors.right: parent.right
            anchors.rightMargin: 10
            iconSource: "images/exit.svg"
            onClicked: Qt.quit()
        }
    
        Flickable {
            id: flick
            width: 360
            height: parent.height - 60
            y: 60
            contentHeight: t1.y + 50
            contentWidth: 360
    
            Image {
                anchors.horizontalCenter: parent.horizontalCenter
                source: "images/logo.png"
                id: logo
            }
    
            Button {
                property string url: "http://something.mp4"
                anchors.horizontalCenter: parent.horizontalCenter
                text: "1×01 + 1×02 – Děti bohů"
                x: 20
                anchors.top: logo.bottom
                anchors.topMargin: 20
                id: t1
                onClicked: {Api.loadVideo(url)}
            }
        }
    
    }
    

    }
    @

    Api.js
    @
    function loadVideo(source) {
    var component = Qt.createComponent("VideoPage.qml");

    if (component.status == Component.Ready) {
        pageStack.push(component, {src: source});
    }
    

    }
    @

    VideoPage.qml
    @
    import QtQuick 1.1
    import com.nokia.symbian 1.1
    import QtMultimediaKit 1.1
    import Mediakey 1.0

    Page {
    property alias src: video.source
    id: videoPage
    orientationLock: PageOrientation.LockLandscape

    Rectangle {
        anchors.fill: parent
        color: "black"
    
        MouseArea {
            anchors.fill: parent
            onClicked: {menu.visible = true; slider2.visible = true}
        }
    
    Video {
        anchors.fill: parent
        id: video
        volume: slider.value
        visible: false
    
        onStatusChanged: if (status == 6) {video.visible = true; video.play(); busy.running = false; busy.visible = false}
    
        MouseArea {
            anchors.fill: parent
            onClicked: {menu.visible = true; slider2.visible = true}
        }
    
    }
    
    Item {
        id: menu
        visible: false
        width: 640
        height: 50
        anchors.bottom: parent.bottom
    
        onVisibleChanged: timer.running = true
    
        Button {
            iconSource: "images/back.svg"
            anchors.verticalCenter: parent.verticalCenter
            x: 20
            onClicked: {video.stop(); pageStack.pop(videoPage)}
        }
    
        Button {
            iconSource: "images/pause.svg"
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            onClicked: {
                if (!video.paused) {
                    video.pause();
                    iconSource = "images/play.svg"
                }
                else {
                    video.play();
                    iconSource = "images/pause.svg"
                }
            }
        }
    
        Timer {
            id: timer
            running: false
            interval: 3000
            repeat: false
            onTriggered: if (video.playing || video.status != 6) {menu.visible = false; slider2.visible = false}
        }
    }
    
    BusyIndicator {
        id: busy
        anchors.centerIn: parent
        running: true
        width: 40
        height: 40
    
    }
    
    Slider {
        id: slider
        inverted: true
        orientation: Qt.Vertical
        visible: false
        height: 240
        y: 10
        maximumValue: 1.0
        minimumValue: 0.1
        stepSize: 0.1
        value: 0.5
        anchors.right: parent.right
        anchors.rightMargin: 10
    
        Timer {
            id: timer2
            running: false
            interval: 3000
            repeat: false
            onTriggered: slider.visible = false
        }
    }
    
    Slider {
        id: slider2
        minimumValue: 0
        maximumValue: video.duration
        width: 620
        x: 10
        visible: false
        anchors.bottom: parent.bottom
        anchors.bottomMargin: 50
        stepSize: 1
        value: video.position
    }
    
    MediakeyCapture {
        onVolumeDownPressed: {slider.visible = true; timer2.running = true; slider.value -= 0.1}
        onVolumeUpPressed: {slider.visible = true; timer2.running = true; slider.value += 0.1}
    }
    }
    

    }
    @

    So, I open VideoPage (by Button t1). My video loads normally. I close the page (it stops video too). When I try to open the video again Qt Creator throws "Active object (ptr=0x08d056c0, vptr=0x7ed8966c) leave: -14" and I can see on my device "{app name}: Is already used". The page does not open.

    Thank you for any help


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.