[PyQt] Qwebview crashes almost always when entering Facebook apps
Gelonida
gelonida at gmail.com
Thu Mar 24 22:52:53 GMT 2011
Hi I have a rather small (mostly crashing) script with a QWebViewwidget.
# beginning of script
import sys
import platform
import PyQt4.QtGui as QtGui
import PyQt4.QtCore as QtCore
from PyQt4.QtWebKit import QWebView
class MyMainWindow(QtGui.QMainWindow):
def __init__(self, parent=None):
super(MyMainWindow, self).__init__(parent)
self.setWindowTitle("Simple Crasher")
self.webview = QWebView()
self.setCentralWidget(self.webview)
# I tried with two face book apps so you can probably
# reproduce with another facebook app
urlstr ="http://apps.facebook.com/be-heroic"
self.webview.setUrl(QtCore.QUrl(urlstr))
print sys.platform, platform.release()
print QtCore.PYQT_VERSION_STR,QtCore.PYQT_VERSION
app = QtGui.QApplication(sys.argv)
window = MyMainWindow()
window.show()
sys.exit(app.exec_())
# end of script
The url points to a facebook application.
I tried with the url in the sample script, but failed also with other
facebook applications.
What happens:
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.
In 90 % of the cases the script crashes without any python back trace or
error message.
Example output:
linux2 2.6.32-29-generic
4.7.2 263938
Segmentation fault (core dumped)
The application crashes also under windows where the output would be
win32 post2008Server
4,7 263936
Can anybody else reproduce this?
looking at the backtrace with
gdb python core
and the command 'bt' gives:
#0 JSC::Interpreter::prepareForRepeatCall (this=0x7f8bab407b00,
FunctionExecutable=0x7f8ba05424d0, callFrame=0x7f8baa712768, function=
0x7f8ba2db05c0, argCount=<value optimized out>,
scopeChain=0x7f8ba80d1bd0, exception=0x7f8bab3c45c0)
at ../JavaScriptCore/interpreter/Interpreter.cpp:715
#1 0x00007f8bb796c7e7 in CachedCall (this=0x7f8ba2db2d40, exec=<value
optimized out>, compareFunction=...,
callType=<value optimized out>, callData=<value optimized out>) at
../JavaScriptCore/interpreter/CachedCall.h:44
#2 JSC::JSArray::sort (this=0x7f8ba2db2d40, exec=<value optimized out>,
compareFunction=..., callType=<value optimized out>,
callData=<value optimized out>) at
../JavaScriptCore/runtime/JSArray.cpp:830
#3 0x00007f8bb7942d46 in arrayProtoFuncSort (exec=0x7f8baa712768,
thisValue=..., args=...)
at ../JavaScriptCore/runtime/ArrayPrototype.cpp:482
#4 0x00007f8bb792e2d4 in JSC::Interpreter::privateExecute (this=<value
optimized out>, flag=<value optimized out>,
registerFile=<value optimized out>, callFrame=0x7f8baa7126f0,
exception=<value optimized out>)
at ../JavaScriptCore/interpreter/Interpreter.cpp:3200
#5 0x00007f8bb7935ebf in JSC::Interpreter::execute
(this=0x7f8bab407b00, program=0x7f8ba2f3da80, callFrame=0x19502c8,
scopeChain=<value optimized out>, thisObj=<value optimized out>,
exception=<value optimized out>)
at ../JavaScriptCore/interpreter/Interpreter.cpp:615
#6 0x00007f8bb7966df4 in JSC::evaluate (exec=0x19502c8, scopeChain=...,
source=<value optimized out>, thisValue=...)
at ../JavaScriptCore/runtime/Completion.cpp:60
#7 0x00007f8bb7a24705 in WebCore::evaluateInWorld (exec=0x19502c8,
scopeChain=..., sourceCode=..., thisValue=...,
isolatedWorld=<value optimized out>) at bindings/js/JSDOMBinding.cpp:834
#8 0x00007f8bb7a325a0 in WebCore::ScriptController::evaluateInWorld
(this=0x7f8bab3b5390, sourceCode=<value optimized out>, world=
0x1792510) at bindings/js/ScriptController.cpp:121
#9 0x00007f8bb7a327c2 in WebCore::ScriptController::evaluate
(this=0x7f8bab3b5390, sourceCode=...) at
bindings/js/ScriptController.cpp:142
#10 0x00007f8bb7b24b1e in WebCore::ScriptElementData::evaluateScript
(this=0x7f8ba2c8f2f8, sourceCode=...) at dom/ScriptElement.cpp:185
#11 0x00007f8bb7b24cc1 in WebCore::ScriptElementData::execute
(this=0x7f8ba2c8f2f8, cachedScript=0x1d80970) at dom/ScriptElement.cpp:204
#12 0x00007f8bb7ae2314 in WebCore::Document::executeScriptSoonTimerFired
(this=<value optimized out>, timer=<value optimized out>)
at dom/Document.cpp:4341
#13 0x00007f8bb7d4ea76 in
WebCore::ThreadTimers::sharedTimerFiredInternal (this=0x7f8bab3b2900) at
platform/ThreadTimers.cpp:112
#14 0x00007f8bbc5f0a63 in QObject::event (this=0x15b75d0,
e=0x7fff5441cce0) at kernel/qobject.cpp:1212
#15 0x00007f8bbcab422c in QApplicationPrivate::notify_helper
(this=0x15a6cc0, receiver=0x15b75d0, e=0x7fff5441cce0)
at kernel/qapplication.cpp:4300
#16 0x00007f8bbcaba6fb in QApplication::notify (this=0x15a66c0,
receiver=0x15b75d0, e=0x7fff5441cce0) at kernel/qapplication.cpp:4183
#17 0x00007f8bbda20443 in ?? () from
/usr/lib/pymodules/python2.6/PyQt4/QtGui.so
#18 0x00007f8bbc5e106c in QCoreApplication::notifyInternal
(this=0x15a66c0, receiver=0x15b75d0, event=0x7fff5441cce0)
at kernel/qcoreapplication.cpp:704
#19 0x00007f8bbc60dd42 in QCoreApplication::sendEvent (this=0x15b7130)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#20 QTimerInfoList::activateTimers (this=0x15b7130) at
kernel/qeventdispatcher_unix.cpp:603
#21 0x00007f8bbc60a848 in timerSourceDispatch (source=<value optimized
out>) at kernel/qeventdispatcher_glib.cpp:184
#22 idleTimerSourceDispatch (source=<value optimized out>) at
kernel/qeventdispatcher_glib.cpp:231
#23 0x00007f8bbb85a8c2 in g_main_context_dispatch () from
/lib/libglib-2.0.so.0
#24 0x00007f8bbb85e748 in ?? () from /lib/libglib-2.0.so.0
#25 0x00007f8bbb85e8fc in g_main_context_iteration () from
/lib/libglib-2.0.so.0
#26 0x00007f8bbc60a513 in QEventDispatcherGlib::processEvents
(this=0x15b35e0, flags=<value optimized out>)
at kernel/qeventdispatcher_glib.cpp:412
#27 0x00007f8bbcb6446e in QGuiEventDispatcherGlib::processEvents
(this=0x7f8baab12000, flags=<value optimized out>)
at kernel/qguieventdispatcher_glib.cpp:204
#28 0x00007f8bbc5df992 in QEventLoop::processEvents (this=<value
optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations
must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:149
#29 0x00007f8bbc5dfd6c in QEventLoop::exec (this=0x7fff5441cf80,
flags=DWARF-2 expression error: DW_OP_reg operations must be used either
alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:201
#30 0x00007f8bbc5e3aab in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:981
#31 0x00007f8bbda20fb0 in ?? () from
/usr/lib/pymodules/python2.6/PyQt4/QtGui.so
#32 0x00000000004a7c5e in call_function (f=Frame 0x139f4b0, for file
./webviewcrash.py, line 24, in<module> (),
throwflag=<value optimized out>) at ../Python/ceval.c:3750
#33 PyEval_EvalFrameEx (f=Frame 0x139f4b0, for file ./webviewcrash.py,
line 24, in<module> (), throwflag=<value optimized out>)
at ../Python/ceval.c:2412
#34 0x00000000004a9671 in PyEval_EvalCodeEx (co=0x7f8bbf37c648,
globals=<value optimized out>, locals=<value optimized out>, args=0x0,
argcount=<value optimized out>, kws=<value optimized out>,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3000
#35 0x00000000004a9742 in PyEval_EvalCode (co=0x7f8baab12000,
globals=<unknown at remote 0x3>, locals=<unknown at remote 0x3>)
at ../Python/ceval.c:541
#36 0x00000000004c9a0e in run_mod (fp=<value optimized out>,
filename=0x7fff5441f556 "./webviewcrash.py", start=<value optimized out>,
globals=<value optimized out>, locals=<value optimized out>,
closeit=1, flags=0x7fff5441d410) at ../Python/pythonrun.c:1339
#37 PyRun_FileExFlags (fp=<value optimized out>, filename=0x7fff5441f556
"./webviewcrash.py", start=<value optimized out>,
globals=<value optimized out>, locals=<value optimized out>,
closeit=1, flags=0x7fff5441d410) at ../Python/pythonrun.c:1325
#38 0x00000000004c9c24 in PyRun_SimpleFileExFlags (fp=<value optimized
out>, filename=0x7fff5441f556 "./webviewcrash.py", closeit=1, flags=
0x7fff5441d410) at ../Python/pythonrun.c:935
#39 0x000000000041a7ff in Py_Main (argc=-1086926720, argv=<value
optimized out>) at ../Modules/main.c:572
#40 0x00007f8bbde5fc4d in __libc_start_main () from /lib/libc.so.6
#41 0x00000000004199f9 in _start ()
More information about the PyQt
mailing list