Segfault when constructing QImage in PyQt6

RoadrunnerWMC roadrunnerwmc at gmail.com
Sat Oct 16 01:47:20 BST 2021


I was able to avoid a crash by adding a bytesPerLine argument, too... at
least in the small test script. It didn't help in my larger application
where I first ran into this issue. It's just one of those flaky sorts of
memory corruption bugs where random things affect the behavior, which makes
it even harder to debug :(

On Fri, Oct 15, 2021 at 6:08 PM Baz Walter <bazwal at gmail.com> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20211015/0eb59327/attachment.htm>


More information about the PyQt mailing list