Segfault when constructing QImage in PyQt6

Phil Thompson phil at riverbankcomputing.com
Sat Oct 16 11:23:36 BST 2021


On 15/10/2021 23:08, Baz Walter wrote:
> 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.

Thanks for the clue. Should be fixed in the next snapshot.

Phil


More information about the PyQt mailing list