PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 927 - Segfault on QThread code.
: Segfault on QThread code.
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtCore
: 1.0.4
: All All
: P2 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-07-11 20:54 EEST by Hugo Parente Lima
Modified: 2011-07-22 22:12 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Parente Lima 2011-07-11 20:54:38 EEST
This code causes a segfault:

import time
from PySide.QtCore import QTime, QRunnable, QThreadPool

class Task(QRunnable):
   def run(self):
       t = QTime()
       t.start()
       time.sleep(2) # Sleep 2 seconds
       print 'Slow thread has wasted', t.elapsed(), 'ms'

if __name__ == '__main__':
   while True:
       task = Task()
       QThreadPool.globalInstance().start(task)
       time.sleep(1) # Sleep 1 second
Comment 1 renato filho 2011-07-13 15:33:11 EEST
fixed on pyside commit:

commit eaae6e4dcfae061972a62dc58e4dcfc1df46aba0
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Tue Jul 12 18:36:06 2011 -0300
Comment 2 renato filho 2011-07-22 22:12:56 EEST
release 1.0.5