mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:25:45 +00:00
- Reference CursorIcon before deleting it
- IntGetPaintMessage: Set MessageQueue->PaintCount to 0, if no dirty Window is found. Stops spamming the debuglog, once is enough. - UserGetDCEx: Check if a dce's hDC is valid, if not warn and create a new one. With our current code those hDCs should never get deleted, but this is also a hack, on Windows you can delete them. - Don't dump the stack backtrace twice in GDIOBJ_Xxx functions svn path=/trunk/; revision=32473
This commit is contained in:
parent
390717a188
commit
16956db4f1
4 changed files with 22 additions and 16 deletions
|
@ -523,7 +523,7 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
|
||||||
|
|
||||||
LIST_FOR_EACH_SAFE(CurIcon, tmp, &gCurIconList, CURICON_OBJECT, ListEntry)
|
LIST_FOR_EACH_SAFE(CurIcon, tmp, &gCurIconList, CURICON_OBJECT, ListEntry)
|
||||||
{
|
{
|
||||||
// UserReferenceObject(CurIcon);
|
UserReferenceObject(CurIcon);
|
||||||
// if(NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon)))
|
// if(NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon)))
|
||||||
{
|
{
|
||||||
LIST_FOR_EACH(ProcessData, &CurIcon->ProcessList, CURICON_PROCESS, ListEntry)
|
LIST_FOR_EACH(ProcessData, &CurIcon->ProcessList, CURICON_PROCESS, ListEntry)
|
||||||
|
@ -532,6 +532,7 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
|
||||||
{
|
{
|
||||||
RemoveEntryList(&CurIcon->ListEntry);
|
RemoveEntryList(&CurIcon->ListEntry);
|
||||||
IntDestroyCurIconObject(WinSta, CurIcon, TRUE);
|
IntDestroyCurIconObject(WinSta, CurIcon, TRUE);
|
||||||
|
CurIcon = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +540,10 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
|
||||||
// UserDereferenceObject(Object);
|
// UserDereferenceObject(Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CurIcon)
|
||||||
|
{
|
||||||
|
UserDereferenceObject(CurIcon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ObDereferenceObject(WinSta);
|
ObDereferenceObject(WinSta);
|
||||||
|
|
|
@ -696,6 +696,8 @@ IntGetPaintMessage(HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax,
|
||||||
if (Message->hwnd == NULL)
|
if (Message->hwnd == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("PAINTING BUG: Thread marked as containing dirty windows, but no dirty windows found!\n");
|
DPRINT1("PAINTING BUG: Thread marked as containing dirty windows, but no dirty windows found!\n");
|
||||||
|
/* Hack to stop spamming the debuglog ! */
|
||||||
|
MessageQueue->PaintCount = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -506,6 +506,13 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!GDIOBJ_ValidateHandle(Dce->hDC, GDI_OBJECT_TYPE_DC))
|
||||||
|
{
|
||||||
|
DPRINT1("FIXME: Got DCE with invalid hDC!\n");
|
||||||
|
Dce->hDC = DceCreateDisplayDC();
|
||||||
|
/* FIXME: Handle error */
|
||||||
|
}
|
||||||
|
|
||||||
Dce->hwndCurrent = (Window ? Window->hSelf : NULL);
|
Dce->hwndCurrent = (Window ? Window->hSelf : NULL);
|
||||||
Dce->DCXFlags = Flags | DCX_DCEBUSY;
|
Dce->DCXFlags = Flags | DCX_DCEBUSY;
|
||||||
|
|
||||||
|
|
|
@ -330,7 +330,10 @@ LockErrorDebugOutput(HGDIOBJ hObj, PGDI_TABLE_ENTRY Entry, LPSTR Function)
|
||||||
DPRINT1("%s: Attempted to lock object 0x%x, something went wrong, typeinfo = 0x%x\n",
|
DPRINT1("%s: Attempted to lock object 0x%x, something went wrong, typeinfo = 0x%x\n",
|
||||||
Function, hObj, Entry->Type);
|
Function, hObj, Entry->Type);
|
||||||
}
|
}
|
||||||
|
#ifdef GDI_DEBUG
|
||||||
|
DPRINT1("-> called from:\n");
|
||||||
KeRosDumpStackFrames(NULL, 20);
|
KeRosDumpStackFrames(NULL, 20);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
|
@ -952,11 +955,6 @@ GDIOBJ_LockObj (PGDI_HANDLE_TABLE HandleTable, HGDIOBJ hObj, DWORD ExpectedType)
|
||||||
* locking type mismatches.
|
* locking type mismatches.
|
||||||
*/
|
*/
|
||||||
LockErrorDebugOutput(hObj, Entry, "GDIOBJ_LockObj");
|
LockErrorDebugOutput(hObj, Entry, "GDIOBJ_LockObj");
|
||||||
|
|
||||||
#ifdef GDI_DEBUG
|
|
||||||
DPRINT1("-> called from:\n");
|
|
||||||
KeRosDumpStackFrames(NULL, 20);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unlock the handle table entry. */
|
/* Unlock the handle table entry. */
|
||||||
|
@ -1081,11 +1079,6 @@ GDIOBJ_ShareLockObj (PGDI_HANDLE_TABLE HandleTable, HGDIOBJ hObj, DWORD Expected
|
||||||
* locking type mismatches.
|
* locking type mismatches.
|
||||||
*/
|
*/
|
||||||
LockErrorDebugOutput(hObj, Entry, "GDIOBJ_ShareLockObj");
|
LockErrorDebugOutput(hObj, Entry, "GDIOBJ_ShareLockObj");
|
||||||
|
|
||||||
#ifdef GDI_DEBUG
|
|
||||||
DPRINT1("-> called from:\n");
|
|
||||||
KeRosDumpStackFrames(NULL, 20);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unlock the handle table entry. */
|
/* Unlock the handle table entry. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue