<div dir="ltr">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.<div><br></div><div>Is there a way to figure out exactly what differs between the C++ and PyQT versions using GDB?</div><div><br></div><div>Thanks,</div><div>Louis<br><br><div class="gmail_quote"><div dir="ltr">On Sat, Sep 17, 2016 at 5:04 PM Louis Simons <<a href="mailto:lousimons@gmail.com">lousimons@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 17 Sep 2016, at 2:39 am, Louis Simons <<a href="mailto:lousimons@gmail.com" target="_blank">lousimons@gmail.com</a>> wrote:<br>
><br>
><br>
> 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?<br>
><br>
> I added the backtrace to <a href="http://stackoverflow.com/questions/39381009/simple-pyqt5-qml-application-causes-segmentation-fault" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/39381009/simple-pyqt5-qml-application-causes-segmentation-fault</a>. 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 (<a href="https://bugs.kde.org/show_bug.cgi?id=348812" rel="noreferrer" target="_blank">https://bugs.kde.org/show_bug.cgi?id=348812</a>), it works in the C++ version, so is it possible there's a problem in a PyQT binding?<br>
<br>
Unlikely.<br></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>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:</div><div><br></div><div><div> <span> </span>#include <QGuiApplication></div><div> <span> </span>#include <QQmlApplicationEngine></div><div> <span> </span><br></div><div> <span> </span>int main(int argc, char *argv[]) {</div><div> <span> </span> QGuiApplication app(argc, argv);</div><div> <span> </span> QQmlApplicationEngine engine;</div><div> <span> </span>engine.load(QUrl(QStringLiteral("simple.qml")));</div><div> <span> </span> return app.exec();</div><div> }</div></div><div><br></div><div>The Python is the following:</div><div><br></div><div><div> from sys import argv, exit</div><div> <span> </span>from PyQt5.QtGui import QGuiApplication</div><div> <span> </span>from PyQt5.QtQml import QQmlApplicationEngine</div><div> <span> </span><br></div><div> <span> </span>def main():</div><div> <span> </span> app = QGuiApplication(argv)</div><div> <span> </span> engine = QQmlApplicationEngine()</div><div> <span> </span> engine.load('simple.qml')</div><div> <span> </span> exit(app.exec_())</div><div> <span> </span><br></div><div> <span> </span>if __name__ == '__main__':</div><div> <span> </span>main()</div></div><div><br></div><div>Thanks,<br></div><div>Louis</div></div></div></blockquote></div></div></div>