Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when trying to call a function. #67

Open
MRZA-MRZA opened this issue May 17, 2016 · 0 comments
Open

Segfault when trying to call a function. #67

MRZA-MRZA opened this issue May 17, 2016 · 0 comments

Comments

@MRZA-MRZA
Copy link

I made a simple app for SailfishOS using pyotherside and it worked, but then I tried to run (after writing new qml) it on desktop (Linux) it crashed. So I wrote test code that also crashed.
My QML code:

import QtQuick 2.3
import QtQuick.Window 2.2
import io.thp.pyotherside 1.4
import QtQuick.Controls 1.4

Window{
    visible: true

    Button{
        id: button
        text: "Test"
        onClicked:{
            python.test();
        }
    }

    Python{
            id: python
            onError: console.log('Error: ' + traceback)
            onReceived: console.log('Event: ' + data)
            Component.onCompleted:{
                addImportPath(Qt.resolvedUrl("."));
                importModule("mytest", function(){});
            }

            function test(){
                call("mytest.testFunc", function(){})
            }
    }
}

Python code:

import pyotherside

def testFunc():
    pyotherside.send("testevent", "test")

When I press the button application crashes. Tested on Ubuntu 16.04 and Debian.
Here is full sources for Qt Creator https://www.dropbox.com/s/3kq5wolaqtxxb4n/TestApp.tar.xz?dl=0
Python 3.5.1+
Qt 5.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant