[PyQt] Qwebview crashes almost always when entering Facebook apps
Gelonida Gmail
gelonida at gmail.com
Sat Mar 26 22:45:04 GMT 2011
I have now an even simper version of my program, which still crashes.
However today it crashes less often than before. There is some random
factor involved.
# Error description:
#
# After starting the script a login screen shows up
# (email address and password field in the top right corner of the
# dispay) after a few seconds the layout changes and the emailaddress
# and password field are in the middle of the screen
#
# I enter email address and password of my facebook account and click
# on connect.
#
# rather often (but not always) the application segfaults
#
import sys
import platform
import PyQt4.QtGui as QtGui
import PyQt4.QtCore as QtCore
from PyQt4.QtWebKit import QWebView
print sys.platform, platform.release()
print QtCore.PYQT_VERSION_STR,QtCore.PYQT_VERSION
app = QtGui.QApplication(sys.argv)
webview = QWebView()
urlstr = "http://apps.facebook.com/be-heroic"
webview.setUrl(QtCore.QUrl(urlstr))
webview.show()
sys.exit(app.exec_())
I wrote also an equivalent C++ version, and managed to crash it
(though I had to try over 10 times before I got a segfault)
The C++ version is
#include <QtGui>
#include <QtWebKit/QWebView>
#define urlstr "http://apps.facebook.com/be-heroic"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QWebView *webview = new QWebView();
webview->load( QUrl(urlstr));
webview->show();
return app.exec();
}
The related project file for qmake is
CONFIG += qt
SOURCES += webview.cc
TARGET = webview
QT += webkit
> On 3/25/2011 12:21 AM, Hans-Peter Jansen wrote:
>> On Thursday 24 March 2011, 23:52:53 Gelonida wrote:
>>> Hi I have a rather small (mostly crashing) script with a
>>> Can anybody else reproduce this?
>>
>> Confirmed:
>> python: 2.6
>> sip: 4.12.1
>> qt4: 4.6.3
>> pyqt4: snapshot-4.8.4-278054fd857c
>>
>>
>> Given the simpleness of your script, and since this happens deep
>> under the covers in the javascript core, a *Qt* bugreport would be
>> in order. That requires a C++ version, though. If that version works,
>> then Phil is to blame, but I doubt that.
>>
>> Leaving a pointer to the report here would be nice.
>>
>> Pete
>
Will now look, where I can post the Qt bug
More information about the PyQt
mailing list