-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Crash with Qt 5.4.2 when .py files are loaded from Qt Resources #46
Comments
I'm assuming you run from Git master or do you run a release? |
Ah yes, sorry for forgetting that key piece of information! I'm running version 1.4.0. Although I just tried running from master and got the same result. |
Have you tried installing Qt 5 from homebrew as well and see if that makes any difference? |
I have tried a homebrewed Qt5 and got the same result. I've been playing with this a bit more and have found that if I run the example using qmlscene it works just fine. However, if I try to recreate the example in a Qt Quick Application (by adding the qml and python files as resources), that's when I experience the issue above. If I comment out the Perhaps I'm creating the application incorrectly? It's just odd to me that it still runs when I return a string. |
I get a crash by creating a Qt Quick application in Qt Creator and using the following qml:
And this editor.py:
Similarly, I don't get a crash if I instantiate an object in the module and call a method on the object that returns a string. Also, I do not get a crash when using qmlscene. The backtrace for the crashing thread:
System Info: I don't know how much any of this information helps, but at least it's another data point. I can collect more information if needed. |
Also, a debug build (made using qmake CONFIG+=debug) does not seem to cause a crash. |
I can confirm @Moguri's findings. However, both debug and release builds crash for me. I am also happy to collect more information. |
Thanks for all the detailed info, I should be able to reproduce it with this info. I haven't gotten around to do it, but it's on my TODO list. If anybody is faster and has the time to analyze and debug this, feel free to submit a pull request, otherwise I'll hopefully get around to it in a few days. |
I am also experiencing this issue under Windows using Qt Creator with Visual Studio 2013 (with the current master branch of pyotherside). It appears that the combination of returning a list from a python file that is located in a resource file is what triggers the crash. I am able to successfully run the listmodel example as a compiled Qt Quick application if I place the listmodel.py file in the final build directory so it is imported as a regular file. If the .py file is located in the .qrc resource file I am only able to return strings, ints, and floats. Any other return type (including None) triggers the crash. I can provide more information or a stack trace if it will help. Also thanks for your work on pyotherside - it's a very powerful tool that is enabling us to do some really cool work. |
I could reproduce this issue here. It only happens when putting the files into Qt Resources. As a workaround, don't use the Qt resources feature, but just put the files into the working directory. |
I could not reproduce this with the test case now in Git and Qt 5.2.1 / Python 3.4.0, will try with a newer Qt version. |
This should be fixed with the latest commit in the Git master branch. See 6d7f526 for details. |
I'm attempting to run the listmodel example on OS X Yosemite to no avail. Below is the head of the problem report and the stack trace of the crashed thread. It looks like something is going awry when converting the python list to a javascript array? Out of curiosity, I modified the example a bit so that the python function simply returned a string and everything worked just fine.
I've installed a packaged version of Qt 5.4.2, am using python 3.4.3 installed via homebrew, and pyotherside 1.4.0 has been installed as described in the project README.
I've searched for a solution, but didn't have much luck. Any help/suggestions are greatly appreciated! Also, let me know if you need additional details to help diagnose the problem.
Head of the problem report
Stack trace of the crashed thread
The text was updated successfully, but these errors were encountered: