Author: jimtabor Date: Mon Feb 28 06:31:44 2011 New Revision: 50933
URL: http://svn.reactos.org/svn/reactos?rev=50933&view=rev Log: [Win32k|User32]
- Clarify the meaning and the use of 0, 1 and 2 for user window regions, wine never did. Noticing patches not corresponding in correctness and understanding, leaving potential crashes in the DCE code, which depend on these types.
- Patch based on Rafal Harabien patch, fixes wine msg SetWindowRgn test, see also bug 5959.
This change breaks Winamp 5.601:
(ntoskrnl/ps/thread.c:119) PS: Unhandled Kernel Mode Exception Pointers = 0xF86A8568 (ntoskrnl/ps/thread.c:126) Code c0000005 Addr F87D4C3E Info0 00000000 Info1 00000020 Info2 00000000 Info3 00000020
*** Fatal System Error: 0x0000007e (0xC0000005,0xF87D4C3E,0xF86A8A50,0xF86A8690)
[7hEntered debugger on embedded INT3 at 0x0008:0x808fd45c.bt Eip: <ntoskrnl.exe:fd45d (lib/rtl/i386/debug_asm.S:39 (RtlpBreakWithStatusInstruction))> Frames: <ntoskrnl.exe:a902 (ntoskrnl/ke/bug.c:1110 (KeBugCheckWithTf@24))> <ntoskrnl.exe:aa4d (ntoskrnl/ke/bug.c:1438 (KeBugCheckEx@20))> <ntoskrnl.exe:ead94 (ntoskrnl/ps/thread.c:129 (PspUnhandledExceptionInSystemThread))> <ntoskrnl.exe:eadaf (ntoskrnl/ps/thread.c:159 (_SEHExcept.39966))> <ntoskrnl.exe:fa9fa (lib/pseh/i386/framebased-gcchack.c:132 (_SEH2FrameHandler))> <ntoskrnl.exe:fcecb (lib/rtl/i386/except_asm.s:183 (RtlpExecuteHandler2))> <ntoskrnl.exe:fce9f (lib/rtl/i386/except_asm.s:150 (RtlpExecuteHandlerForUnwind))> <ntoskrnl.exe:3222 (ntoskrnl/ke/i386/exp.c:938 (KiDispatchException@20))> <ntoskrnl.exe:36bd (ntoskrnl/ke/i386/exp.c:1137 (KiDispatchExceptionFromTrapFrame@28))> <ntoskrnl.exe:6941 (ntoskrnl/include/internal/arch/../i386/ke.h:597 (@KiTrap0EHandler@4))> <ntoskrnl.exe:f7408 (ntoskrnl/ke/i386/trap.s:99 (VfIsVerificationEnabled@8))> <win32k.sys:bac39 (subsystems/win32/win32k/objects/region.c:2104 (@RGNOBJAPI_Lock@8))> <win32k.sys:bb0b3 (subsystems/win32/win32k/objects/region.c:3753 (NtGdiPtInRegion@12))> <win32k.sys:71bbb (subsystems/win32/win32k/ntuser/msgqueue.c:248 (@co_MsqInsertMouseMessage@4))> <win32k.sys:5ded4 (subsystems/win32/win32k/ntuser/cursoricon.c:205 (UserSetCursorPos))> <win32k.sys:66630 (subsystems/win32/win32k/ntuser/input.c:1134 (@IntMouseInput@4))> <win32k.sys:66cca (subsystems/win32/win32k/ntuser/input.c:194 (@ProcessMouseInputData@8))> <win32k.sys:66fbf (subsystems/win32/win32k/ntuser/input.c:308 (MouseThreadMain@4))> <ntoskrnl.exe:eac86 (ntoskrnl/ps/thread.c:156 (PspSystemThreadStartup@8))> <ntoskrnl.exe:5936 (ntoskrnl/ke/i386/thrdini.c:78 (KiThreadStartup@0))> <ntoskrnl.exe:eac22 (ntoskrnl/ps/thread.c:625 (PsCreateSystemThread@28))>
WBR, Johannes
Hi! Try this! I'm not sure since I have -soundhw ac97 running with qemu and winapp installs but I can not get it ti run.
On Wed, Mar 2, 2011 at 9:53 AM, Johannes Anderwald johannes.anderwald@reactos.org wrote:
<win32k.sys:bac39 (subsystems/win32/win32k/objects/region.c:2104 (@RGNOBJAPI_Lock@8))>
Index: region.c =================================================================== --- region.c (revision 50945) +++ region.c (working copy) @@ -2096,6 +2096,12 @@ PRGN_ATTR pRgn_Attr; HANDLE pid;
+ if (hRgn <= HRGN_WINDOW) + { + DPRINT1("Cought a window system region handle! hRgn %d",hRgn); + return NULL; + } + pRgn = REGION_LockRgn(hRgn);
if (pRgn)
Hi! Try this! I'm not sure since I have -soundhw ac97 running with qemu and winapp installs but I can not get it ti run.
On Wed, Mar 2, 2011 at 9:53 AM, Johannes Anderwald johannes.anderwald@reactos.org wrote:
<win32k.sys:bac39 (subsystems/win32/win32k/objects/region.c:2104 (@RGNOBJAPI_Lock@8))>
Hi,
this patch does not work here. I'm testing with Vbox 4.00
regards, Johannes
Index: region.c
--- region.c (revision 50945) +++ region.c (working copy) @@ -2096,6 +2096,12 @@ PRGN_ATTR pRgn_Attr; HANDLE pid;
if (hRgn <= HRGN_WINDOW)
{
DPRINT1("Cought a window system region handle! hRgn %d",hRgn);return NULL;}
pRgn = REGION_LockRgn(hRgn);
if (pRgn)
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Try this! Index: window.c =================================================================== --- window.c (revision 50957) +++ window.c (working copy) @@ -4052,7 +4052,7 @@ } else { - hrgnCopy = IntSysCreateRectRgnIndirect(&Window->rcWindow); //HRGN_WINDOW; + hrgnCopy = NULL; }
if (Window->hrgnClip) @@ -4061,12 +4061,14 @@ GreDeleteObject(Window->hrgnClip); }
- if (Window->fnid != FNID_DESKTOP) - NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top); + if (hrgnCopy) + { + if (Window->fnid != FNID_DESKTOP) + NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
- /* Set public ownership */ - IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC); - + /* Set public ownership */ + IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC); + } Window->hrgnClip = hrgnCopy;
Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags|SWP_NOREDRAW) );
Apologies to Rafal Harabien select works like select, also don't assume the original author is always right.
gmail sux!
On Wed, Mar 2, 2011 at 1:59 PM, James Tabor jimtabor.rosdev@gmail.com wrote:
Try this! Index: window.c =================================================================== --- window.c (revision 50957) +++ window.c (working copy) @@ -4052,7 +4052,7 @@ } else {
- hrgnCopy = IntSysCreateRectRgnIndirect(&Window->rcWindow); //HRGN_WINDOW;
- hrgnCopy = NULL;
}
if (Window->hrgnClip) @@ -4061,12 +4061,14 @@ GreDeleteObject(Window->hrgnClip); }
- if (Window->fnid != FNID_DESKTOP)
- NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
- if (hrgnCopy)
- {
- if (Window->fnid != FNID_DESKTOP)
- NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
- /* Set public ownership */
- IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
- /* Set public ownership */
- IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
- }
Window->hrgnClip = hrgnCopy;
Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags|SWP_NOREDRAW) );
Apologies to Rafal Harabien select works like select, also don't assume the original author is always right.
Hi, I manage to get winamp 2.95 running, well sort of....
Try this,
Index: window.c =================================================================== --- window.c (revision 50962) +++ window.c (working copy) @@ -4068,7 +4068,7 @@ NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
/* Set public ownership */ - IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC); +// IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC); } Window->hrgnClip = hrgnCopy;
The ugly gdi debug prints will comeback but it should work, I will figure out a proper fix ASAP. Thanks, James
Okay! Does the newest winamp draw correctly? This patch hides the winamp drawing bug!!!!! So revision 50933 is not a regression!
Johannes, you need to be more specific and explain in great details....
Thanks, James
On Fri, Mar 4, 2011 at 11:17 PM, James Tabor jimtabor.rosdev@gmail.com wrote:
Hi, I manage to get winamp 2.95 running, well sort of....
Try this,
Index: window.c
--- window.c (revision 50962) +++ window.c (working copy) @@ -4068,7 +4068,7 @@ NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
/* Set public ownership */
- IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
+// IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC); } Window->hrgnClip = hrgnCopy;
The ugly gdi debug prints will comeback but it should work, I will figure out a proper fix ASAP. Thanks, James
Okay! Does the newest winamp draw correctly? This patch hides the winamp drawing bug!!!!! So revision 50933 is not a regression!
The newest Winamp (5.601) does not draw correctly. The control window is a black square. The only window which is drawn correctly is playlist window. The bugcheck occurs when moving the mouse over the black window.
Johannes, you need to be more specific and explain in great details....
1.) Install MS VC++ 2008 Runtime (Rapps) 2.) Download Winamp from http://download.nullsoft.com/winamp/client/winamp5601_full_emusic-7plus_de-d... 3.) Perform an install with minimal options (all extras disabled) 4.) Run winamp configuration and disable send statistics 5.) Run winamp (if cpu % 100 try killing it with taskmgr. If that does not work, restart) 6.) Move mouse arround on desktop or near the winamp window.
Thanks, James
PS: I have been testing with 50989, the problem is still there.
regards, Johannes
Just to be clear.... The change is correct and without it, the problem is just hidden and that leaves the investigator lost without knowing why these types of application do not work in current trunk.
AIMP draws but has the same crash when clicking inside the window also the dead window patch I posted goes off like mad!
If you need to test everything without the crash, read this,
http://www.reactos.org/archives/public/ros-dev/2011-March/013902.html
What is not being asked, why did the region lock break before the test for the region attribute block?
On Mon, Mar 7, 2011 at 10:59 AM, Johannes Anderwald johannes.anderwald@reactos.org wrote:
Okay! Does the newest winamp draw correctly? This patch hides the winamp drawing bug!!!!! So revision 50933 is not a regression!
The newest Winamp (5.601) does not draw correctly. The control window is a black square. The only window which is drawn correctly is playlist window. The bugcheck occurs when moving the mouse over the black window.
Johannes, you need to be more specific and explain in great details....
1.) Install MS VC++ 2008 Runtime (Rapps) 2.) Download Winamp from http://download.nullsoft.com/winamp/client/winamp5601_full_emusic-7plus_de-d... 3.) Perform an install with minimal options (all extras disabled) 4.) Run winamp configuration and disable send statistics 5.) Run winamp (if cpu % 100 try killing it with taskmgr. If that does not work, restart) 6.) Move mouse arround on desktop or near the winamp window.
Thanks, James
PS: I have been testing with 50989, the problem is still there.
regards, Johannes
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev