[PyQt] "Cannot unlock an unlocked lock"

Matthieu Brucher matthieu.brucher at gmail.com
Tue Jul 1 20:25:55 BST 2008


Hello,

I'm trying to use a lock on a thread, and I use the following code :

    try:
      self.lock.lockForWrite()
      self.currentScreen = 1 if self.currentScreen == 0 else 0
    finally:
      self.lock.unlock()

The problem is that the finally close crashes with the following
assertion error:

ASSERT failure in QReadWriteLock::unlock(): "Cannot unlock an unlocked
lock", file thread/qreadwritelock.cpp, line 346

This is with Ubuntu, PyQt 4.4.3-2.
With Fedora 8, PyQt 4.3.3, the assertion does not failed.

Any idea ?

Thanks,
Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher


More information about the PyQt mailing list