query = QtSql.QSqlQuery()
        if not query.prepare('select %s from %s where %s' % 
(','.join(field_names), table, self.key_expr(table))):

I get 'RuntimeError: underlying C/C++ object has been deleted' on the
second line, with low probability. Sometimes it just segfaults instead
while inside the C++ function QSqlQuery::prepare. Either way, it
happens about one time in 100,000, and when it segfaults, a different
thread is in the garbage collector.

So, we've got one thread deciding that the local python variables of
another are garbage and freeing them, while the victim thread is still
in a function call. That implies the local variables are somehow not
getting registered properly as being referenced.

I'll keep digging, but some ideas or pointers to relevant code would
be handy - it's not immediately clear how sip interacts with GC.
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to