On 09/27/2019 06:57 PM, AlexeyT via lazarus wrote:
Stack trace.

#0 QTransform::type() const at :0

#1 ?? at :0
#2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) at :0

This is crash in Qt library.

#3 QPainter_drawImage2 at :0
#4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffffffb2e4, 0x18bd8a0, 0x7fffffffb2f4, 0x0, 0x7fffffffb2d4, 0) at qt/qtobjects.pas:3568

At line 3568 we are trying to draw image which is converted from QImageFormat_RGB32 format to QImageFormat_ARGB32. That conversion is needed to fix few issues we had in past with various qt versions on linux and windows. See issues #11713 and #25590 for details. Quick check if that works is to change line (above line 3568 in qtobjects.pas)

    if (not EqualRect(LocalRect, sourceRect^) or (Mask = nil)) and
      (QImage_format(Image) = QImageFormat_RGB32) then
     ...
    to
    if (not EqualRect(LocalRect, sourceRect^) then
     ....

and give feedback. As I can see from stack trace your LocalRect and SourceRect are equal , so it will not convert your image to QImageFormat_ARGB32 , but it will directly draw it in line 3611 (qtobjects.pas).

Just change that, rebuild your project and test.


zeljko





#5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at include/winapi.inc:1025 #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122
#9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541
#10 PAINTWINDOW(0x7fffd6eae8f0, 140736908144000) at include/customcontrol.inc:118 #11 PAINTHANDLER(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/wincontrol.inc:4856 #12 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/wincontrol.inc:6828 #13 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/customcontrol.inc:98
#14 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
#15 ?? at :0
#16 ?? at :0
#17 ?? at :0
#18 ?? at :0
#19 .Ld255 at :0
#20 ?? at :0
#21 ?? at :0
#22 ?? at :0
#23 ?? at :0
#24 ?? at :0


Alex


--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to