[PyQt] Possible bug in handling '-visual TrueColor' option

Neal Holtz nholtz at cee.carleton.ca
Tue Jun 10 21:52:18 BST 2008


Hi,

IN the following program, if I run it with a '-visual TrueColor' option,
I get the following behaviour:

When I move the mouse pointer into the window for the first
time, I get:

X Error: BadMatch (invalid parameter attributes) 8
  Extension:    157 (RENDER)
  Minor opcode: 4 (RenderCreatePicture)
  Resource id:  0x188

When I close the window, I get:

X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  157 (RENDER)
  Minor opcode of failed request:  7 (RenderFreePicture)
  Picture id in failed request: 0x400000f
  Serial number of failed request:  285
  Current serial number in output stream:  289

If I run it without options, I get no diagnostics.

Qt 4.3.4, PyQt 4.3.3 on Ubuntu Hardy.

cheers
neal

################################### tc_bug.py:
"""Illustrate bug resulting from -visual TrueColor option.

  1.  do "python tc_bug.py"
      move mouse pointer into window, then close window.
      no diagnostics are produced.
  2.  do "python tc_bug.py -visual TrueColor"
      move mouse pointer into window, then close window.
      X Errors are produced for each.
"""

import sys
from PyQt4 import QtGui, QtCore

print QtCore.QT_VERSION_STR, QtCore.PYQT_VERSION_STR

app = QtGui.QApplication( sys.argv )
w = QtGui.QWidget()
w.resize(200,200)
w.show()
app.exec_()
####################################

-- 
Neal Holtz                             http://cee.carleton.ca/~nholtz
Dept. of Civil and Environmental Engineering,   Carleton University,   
Ottawa, Ontario, Canada K1S 5B6.               nholtz at cee.carleton.ca
Key:  http://cee.carleton.ca/~nholtz/pubkey.asc


More information about the PyQt mailing list