Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-31 Thread Peter Schlaile
Hi Alexandre, On Mon, 31 Jan 2011, Alexandre Julliard wrote: And: from a design perspective it sounds very strange that a fast track optimisation *silently* changes protection bits! There's nothing silent about it, the protection bits have to match the DIB state. Hmm. In which way changes S

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-31 Thread Peter Schlaile
Hi Alexandre, On Mon, 31 Jan 2011, Alexandre Julliard wrote: Peter Schlaile writes: Fix: X11DRV_SetDIBits() shouldn't silently change Bitmap protection, so we now restore the protection bits, that were present before instead of always changing to READONLY. No, it needs to be read-only so

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-31 Thread Alexandre Julliard
Peter Schlaile writes: > And: do you want to say, that there is a page fault handler within > wine, that can handle *that* case above? Yes, that's how DIBs work in Wine. > In either way, I hope we can agree on the following: > > a) the app is *not* broken (at least not regarding it's usage of >

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-31 Thread Alexandre Julliard
Peter Schlaile writes: > At least, wine reacts very differently than windows here :) > Read: it crashes the application I mentioned in my previous mail: > http://www.phononet.de/downloads/support/downloads/Aktueller_PNClient/PNCLIENT1.9.zip > > And: from a design perspective it sounds very strang

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-31 Thread Alexandre Julliard
Peter Schlaile writes: > Fix: X11DRV_SetDIBits() shouldn't silently change Bitmap protection, so > we now restore the protection bits, that were present before instead of > always changing to READONLY. No, it needs to be read-only so that we can detect further changes. > Additional minor fix:

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-30 Thread Peter Schlaile
Hi Vitaliy, On Sun, 30 Jan 2011, Vitaliy Margolen wrote: On 01/30/2011 04:16 AM, Peter Schlaile wrote: Hi, find fix for a crash in create_alpha_bitmap() attached. If it's easy to reproduce please create a test that demonstrates the problem. hmm, don't know, the application that triggered

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-30 Thread Vitaliy Margolen
On 01/30/2011 12:02 PM, Peter Schlaile wrote: Nevertheless: I hope, I explained pretty well, how and why the current code is wrong (aquiring a bitmap-pointer using CreateDIBSection, setting this bitmap to readonly using the fast track code path within StretchDIBits, writing to this bitmap again.)

Re: user32/gdi32: Fix for a crash in create_alpha_bitmap()

2011-01-30 Thread Vitaliy Margolen
On 01/30/2011 04:16 AM, Peter Schlaile wrote: Hi, find fix for a crash in create_alpha_bitmap() attached. If it's easy to reproduce please create a test that demonstrates the problem. Additional minor fix: bmi_has_alpha() tests for alpha channel != 0, but should test for alpha channel != 25