[PyQt] Basic QML test seg faults in PyQT but not QT on Linux
Louis Simons
lousimons at gmail.com
Wed Sep 21 00:17:56 BST 2016
Additionally, my seg. fault seems to be tied both to PyQT (as opposed to
the C++ API) and the graphics drivers (for an NVIDIA GeForce GTS 250). I
tried switching to Linux Mint's xserver-xorg-video-nouveau driver, and
while that didn't work and fell back to software rendering, the application
worked in both PyQT and C++. When I switched back to the recommended
driver, nvidia-340 (340.96-0ubuntu3), the seg. fault in the PyQT version
came back.
Is there a way to figure out exactly what differs between the C++ and PyQT
versions using GDB?
Thanks,
Louis
On Sat, Sep 17, 2016 at 5:04 PM Louis Simons <lousimons at gmail.com> wrote:
> On 17 Sep 2016, at 2:39 am, Louis Simons <lousimons at gmail.com> wrote:
>> >
>> >
>> > Ok. I'm hoping someone on Linux will chime in for confirmation. This
>> seg. fault doesn't make sense as there's definitely people using QML in
>> PyQT in recent versions. Is there anyway to identify the source of the
>> seg. fault?
>> >
>> > I added the backtrace to
>> http://stackoverflow.com/questions/39381009/simple-pyqt5-qml-application-causes-segmentation-fault.
>> It all seems to be a result of __strstr_sse2 receiveing a null pointer from
>> haystack_start. While this seems like a graphics driver bug (
>> https://bugs.kde.org/show_bug.cgi?id=348812), it works in the C++
>> version, so is it possible there's a problem in a PyQT binding?
>>
>> Unlikely.
>>
>
> I agree it's unlikely, but if the exact same C++ program works without a
> seg. fault, and the PyQT version crashes, what else could it be? The C++
> is the following:
>
> #include <QGuiApplication>
> #include <QQmlApplicationEngine>
>
> int main(int argc, char *argv[]) {
> QGuiApplication app(argc, argv);
> QQmlApplicationEngine engine;
> engine.load(QUrl(QStringLiteral("simple.qml")));
> return app.exec();
> }
>
> The Python is the following:
>
> from sys import argv, exit
> from PyQt5.QtGui import QGuiApplication
> from PyQt5.QtQml import QQmlApplicationEngine
>
> def main():
> app = QGuiApplication(argv)
> engine = QQmlApplicationEngine()
> engine.load('simple.qml')
> exit(app.exec_())
>
> if __name__ == '__main__':
> main()
>
> Thanks,
> Louis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160920/69da9cf1/attachment.html>
More information about the PyQt
mailing list