Segfault when constructing QImage in PyQt6

Baz Walter bazwal at gmail.com
Fri Oct 15 23:08:09 BST 2021


On 15/10/2021 11:41, Phil Thompson wrote:
> I can reproduce this on Linux but it works on macOS. The core dump is within the Qt code so I suspect it's a Qt bug.

I can also reproduce this on Linux. However, if I refactor the example like this:

     data = b'\xff' * (256 * 256 * 4)

     img = QtGui.QImage(data, 256, 256, QtGui.QImage.Format.Format_ARGB32)

there's no core dump and a valid image file is written.



More information about the PyQt mailing list