On Thu, Oct 05, 2006 at 09:43:13PM +0200, Andre Poenitz wrote:
> That should be harmless. The crashs I've seen came in the range of a few
> thousand pixels off (less than the 'usual' 2^15 limit for X servers
> anyway)
>
> So if that's a bug in the raster painter it's none I've seen before...
Using the attached patch for the qt4 sources the crash is avoided.
I really don't know what is going on here, but I observed that the
crash is always related to some particular values for the arguments
of comp_func_solid_Source(). Indeed, the dest parameter was varying,
but I was always getting printed to the console the same values:
dest=0x5e08c8, length=34, src=0xff00008b, const_alpha=34
and
dest=0x6bb3728, length=35, src=0xffa52a2a, const_alpha=5
before the crash (and, btw, const_alpha is different from 255 only in
these cases). Simply returning from comp_func_solid_Source() when
they occur makes everything work ok. Go figure.
--
Enrico
--- src/gui/painting/qdrawhelper_x86.cpp.orig 2006-08-18 04:44:52.000000000
+0200
+++ src/gui/painting/qdrawhelper_x86.cpp 2006-10-12 11:58:42.000000000
+0200
@@ -177,6 +177,10 @@ static void QT_FASTCALL comp_func_solid_
if (const_alpha == 255) {
QT_MEMFILL_UINT(dest, length, src);
} else {
+ fprintf(stderr, "dest=0x%x, length=%d, src=0x%x, const_alpha=%u\n",
dest, length, src, const_alpha);
+ if ((length == 34 && src == 0xff00008b && const_alpha == 34) ||
+ (length == 35 && src == 0xffa52a2a && const_alpha == 5))
+ return;
C_FF; C_80; C_00;
const m64 a = load_alpha(const_alpha);
const m64 ia = negate(a);