only dump stack traces when GDI_DEBUG is enabled Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c _____
Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c --- trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-02-18 12:54:17 UTC (rev 13628) +++ trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-02-18 12:59:30 UTC (rev 13629) @@ -801,13 +801,17 @@
if((EntryType & ~GDI_HANDLE_REUSE_MASK) == 0) { DPRINT1("Attempted to lock object 0x%x that is deleted!\n", hObj); +#ifdef GDI_DEBUG KeRosDumpStackFrames ( NULL, 20 ); +#endif } else { DPRINT1("Attempted to lock object 0x%x, type mismatch (0x%x : 0x%x)\n", hObj, EntryType & ~GDI_HANDLE_REUSE_MASK, ExpectedType & ~GDI_HANDLE_REUSE_MASK); +#ifdef GDI_DEBUG KeRosDumpStackFrames ( NULL, 20 ); +#endif } #ifdef GDI_DEBUG DPRINT1("-> called from %s:%i\n", file, line); @@ -839,8 +843,8 @@ else { DPRINT1("Attempted to lock foreign handle: 0x%x, Owner: 0x%x locked: 0x%x Caller: 0x%x, stockobj: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)PrevProcId & 0x1, PsGetCurrentProcessId(), GDI_HANDLE_IS_STOCKOBJ(hObj)); +#ifdef GDI_DEBUG KeRosDumpStackFrames ( NULL, 20 ); -#ifdef GDI_DEBUG DPRINT1("-> called from %s:%i\n", file, line); #endif }