Re: [RFH] #486212 reportbug-ng segfaults
Adeodato Simó wrote:
* Bastian Venthur [Thu, 10 Jul 2008 11:39:16 +0200]:
There is also no bugreport in python-qt3 indicating that someone else
has this problem.
FWIW several users have reported crashes in minirok, so it may as well
be the same issue.
Good to know that rng is not the only one with this problem. I've
written a bugreport against python-qt3 (#490340). There is also a small
python script which helps to reproduce this bug. I think it has
something to do with changing the text of the textbrowser when html is
python crash.py "foo"
will lead very seldom to segfaults, while
python crash.py "<b>foo</b>"
will almost every second time lead to a segfault.
from qt import *
def __init__(self,parent = None,name = None,fl = 0):
self.browser = QTextBrowser(self, "browser")
if __name__ == '__main__':
if len(sys.argv) < 2:
print 'Usage: %s "some text"' % sys.argv
s = str(sys.argv)
# setup qt stuff with a browser
app = QApplication(sys.argv)
app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
form = Form()
# start a different thread and try to set the text in the browser
# we wait 1.0 second -- just to make sure the change happens after the
# start of app.exec_loop() below
t = threading.Timer(1.0, form.browser.setText, (s, ))