http://bugs.winehq.org/show_bug.cgi?id=59362 Bernhard Übelacker <bernhardu@mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org --- Comment #7 from Bernhard Übelacker <bernhardu@mailbox.org> --- Hello Piotr, the "Repro C++"/WindowsCodecsTest.cpp contains this line: EH << ret->LockBits(&rc, 0, pixelFormat_gdiplus, &bitmapData); I am not sure, but this LockBits method seems to return via GdipBitmapLockBits the value InvalidParameter. But the EH objects interprets this as HRESULT. And the "FAILED(hr)" may just interpret negative values as errors. Therefore bitmapData seems to contain uninitialized data, and if we are lucky we use the "bitmapData.Stride <= 0" path and get the error message, if we have no luck we enter the path into CopyPixels. Therefore WINEDEBUG=+wincodecs,+gdiplus may be helpful from here. Relaxing the flags check and accepting a flags==0 in GdipBitmapLockBits seems to make the repro to succeed: dlls/gdiplus/image.c @@ -1127,3 +1127,3 @@ GpStatus WINGDIPAPI GdipBitmapLockBits... if(rect->X < 0 || rect->Y < 0 || (rect->X + rect->Width > bitmap->width) || - (rect->Y + rect->Height > bitmap->height) || !flags) + (rect->Y + rect->Height > bitmap->height) /*|| !flags*/) { Can you confirm this? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.