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 returning lists or dicts from Python in QQmlEngine #69

Closed
YtvwlD opened this issue Jun 14, 2016 · 1 comment
Closed

segfault when returning lists or dicts from Python in QQmlEngine #69

YtvwlD opened this issue Jun 14, 2016 · 1 comment

Comments

@YtvwlD
Copy link

YtvwlD commented Jun 14, 2016

I know this bug sounds a bit complicated.

I have prepared a test case here.

I call a function in Python from QML asynchronously and return a list (or a dict).

When running this thing with qmlscene, it works:

$ qmlscene main.qml
qml: Result: Hello World!,123

Running this thing with a QQmlEngine doesn't work:

$ qmake
$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o main.o main.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/rcc -name qml qml.qrc -o qrc_qml.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o qrc_qml.o qrc_qml.cpp
g++ -m64 -Wl,-O1 -o test main.o qrc_qml.o   -L/usr/X11R6/lib64 -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 
$ ./test
Segmentation fault (core dumped)
$ 

I think this shouldn't happen.

(This bug may be a combination of #67 and #63.)

Edit: This may just be a duplicate of #46. Is there a chance that you'll release a new version which contains all the fixes that came after 1.4.0?

@YtvwlD
Copy link
Author

YtvwlD commented Jun 14, 2016

Yep, this is fixed in master.

@YtvwlD YtvwlD closed this as completed Jun 14, 2016
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