Bug #6439: requesting explanation of GDI_CheckNotLock in order to fix

Alexandre Julliard julliard at winehq.org
Thu Oct 19 13:11:38 CDT 2006

Alex Villací­s Lasso <a_villacis at palosanto.com> writes:

> So, when metafiles are involved, this sequence of calls triggers the
> debug assertion in CreateCompatibleDC(). Since I don't really see the
> point of having the assertion in CreateCompatibleDC(), I was planning
> to send a patch to simply remove the assertion. However, the assertion
> must be there for a reason (debug a deadlock, maybe), so I thought I
> would check with others with more experience in GDI. If this assertion
> has to stay, then the metafile functions should be reworked to remove
> calls to GetDIBits or any other GDI calls that check the assertion. In
> fact, any GDI call that uses CreateDC[AW], CreateCompatibleDC or
> DeleteDC must not be called with the GDI lock held, because of the
> debug assertion.

Yes, and the assertion should remain there. The real bug is that
GetDIBits creates a new DC, it shouldn't need to do that.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list