Peter Schauer a écrit :
vdrivers/vd_win32.c has a race condition with the loadcolor SetDIBColorTable function call, which happens sometimes on fast multiprocessor machines. If the WndThread is currently executing its BitBlt during WM_PAINT processing and the GRX user thread is calling GrAllocColor, the SetDIBColorTable function call fails, as the DC is locked by the BitBlt. This results in the color not being set, which could also happen during the initial setting of the VGA colors in _GrResetColors.
This affects only 8 bpp modes, as loadcolor is not called in 32 bpp modes.
I can reproduce this problem on a modern dual core Vista system, and on a dual core Linux system running Wine. It happens less often on a modern dual core XP system, but it happens.
My proposed fix delays the SetDIBColorTable call and moves it to the WM_PAINT processing, making it synchronous with the BitBlt call.
OK, I can reproduce the bug on an XP dual core Laptop, with the blttest and colorops test programs. Your patch corrects for it. I thus have uploaded it as usual in the directory "more things" of grx:
Thank you !!
Maurice