http://bugs.winehq.org/show_bug.cgi?id=18531
Summary: FontValidator (.NET based app) needs OleInPlaceObject_InPlaceDeactivate properly implemented Product: Wine Version: 1.1.21 Platform: Other URL: http://www.microsoft.com/typography/FontValidator.mspx OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: shdocvw AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
now that some urlmon MIME support patches are on the way which are essential for this app ("text/xml" MIME is later needed to show XML content in embedded browser window) I file an "intermediate" bug that needs to be fixed before we can verify the new functionality with real apps ;-)
The story is basically about in-place activation and deactivation of embedded browser control. The current shdocvw OleInPlaceObject_InPlaceDeactivate stub is mostly harmless for many embedded browser control hosting apps because they don't rely on the fact that in-place deactivation doesn't really take place (control will be destroyed shortly anyway). This app use case is a bit special hence the current in-place deactivation stub becomes the culprit.
Steps to reproduce:
1. clean WINEPREFIX 2. winetricks -q dotnet20 3. start app, "Font files" -> "Add..." -> select whatever true/opentype font from your system 4. "Table tests" -> "Clear All" -> select only "BASE" (shortens test) 5. "Rasterization" -> deselect "Test rasterization of TrueType outlines" (shortens test) 6. hit "Start validation"
The .NET 2.0 app creates an embedded browser control:
--- snip --- ... 0029:trace:ole:CoCreateInstance (rclsid={8856f961-340a-11d0-a96b-00c04fd705a2}, pUnkOuter=(nil), dwClsContext=00000001, riid={00000000-0000-0000-c000-000000000046}, ppv=0x32e2a4) ... 0029:fixme:shell:URL_ParseUrl failed to parse L"Interop.SHDocVw" ... 0029:trace:win:WIN_CreateWindowEx L"Shell Embedding" L"Shell Embedding" ex=00000100 style=46010000 0,0 0x0 parent=0x500b4 menu=(nil) inst=0x61020000 params=0x136d00 ... 0029:trace:win:WIN_CreateWindowEx created window 0x100b6 ... 0029:trace:shdocvw:create_shell_embedding_hwnd parent=0x500b4 hwnd=0x100b6 ... 0029:trace:shdocvw:OleObject_DoVerb (0x136d00)->(-5 (nil) 0x3c80034 -1 0x500b4 0xadd434) 0029:trace:shdocvw:OleObject_DoVerb OLEIVERB_INPLACEACTIVATE ... 0029:trace:win:DestroyWindow (0x500b4) ... --- snip ---
and a "parking window" to host the control in inactive/hidden state until the real hosting window is about to be created and displayed to avoid runtime penalties of destroying and recreating browser control each time.
This blog gives some insight in the world of "parking windows": http://blogs.msdn.com/sburke/archive/2007/06/20/flashback-windows-forms-park...
--- snip --- 0029:trace:win:WIN_CreateWindowEx L"WindowsFormsParkingWindow" L"WindowsForms10.Window.8.app.0.378734a" ex=00010000 style=02010000 0,0 0x0 parent=0xfffffffd menu=(nil) inst=0x400000 params=(nil) ... 0029:trace:win:WIN_CreateWindowEx created window 0x100b8 0029:trace:win:show_window hwnd=0x100b6, cmd=0, wasVisible 1 ... 0029:fixme:shdocvw:OleInPlaceObject_InPlaceDeactivate (0x136d00) 0029:trace:shdocvw:WebBrowser_AddRef (0x136d00) ref=11 0029:trace:ole:GetErrorInfo (0, 0x32d9b0, 0x19a9c4) 0029:fixme:shdocvw:WebBrowser_QueryInterface (0x136d00)->({df0b3d60-548f-101b-8e65-08002b2bd119} 0x32d9a8) interface not supported 0029:trace:shdocvw:WebBrowser_Release (0x136d00) ref=10 0029:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b84385b ip=7b84385b tid=0029 ... 0029:trace:win:WIN_SetWindowLong 0x100b6 -4 61031784 W 0029:trace:win:alloc_winproc reusing 0xffff0057 for (nil)/0x61031784 0029:trace:win:WIN_DestroyWindow 0x500b4 --- snip ---
The CLR exceptions resulting from E_NOTIMPL of OleInPlaceObject_InPlaceDeactivate are handled gracefully.
The window which is the real target for the browser control gets created later:
--- snip --- 0029:trace:win:WIN_CreateWindowEx L"C:\windows\temp\tmp47b0.tmp.report.xml" L"WindowsForms10.Window.8.app.0.378734a" ex=00050040 style=46cf0000 -2147483648,-2147483648 376x358 parent=0x10088 menu=(nil) inst=0x400000 params=(nil) ... 0029:trace:win:WIN_CreateWindowEx hwnd 0x600b4 cs 0,0 376x358 ... 0029:trace:win:show_window hwnd=0x600b4, cmd=5, wasVisible 0 0029:trace:shdocvw:WebBrowser_AddRef (0x136d00) ref=11 0029:trace:shdocvw:OleObject_DoVerb (0x136d00)->(-5 (nil) 0x3c80034 -1 0x600b4 0xaece88) 0029:trace:shdocvw:OleObject_DoVerb OLEIVERB_INPLACEACTIVATE 0029:trace:shdocvw:WebBrowser_Release (0x136d00) ref=10 0029:trace:seh:raise_exception code=e0434f4d flags=1 addr=0x7b84385b ip=7b84385b tid=0029 0029:trace:seh:raise_exception info[0]=80131509 0029:trace:seh:raise_exception eax=7b82ca1d ebx=7b8c2918 ecx=00000000 edx=0032d958 esi=0032d958 edi=e0434f4d 0029:trace:seh:raise_exception ebp=0032d920 esp=0032d8bc cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00000246 --- snip ---
The CLR exception leads to following backtrace dialog (and abort):
--- snip --- ************** Exception Text ************** System.InvalidOperationException: Unable to get the window handle for the 'AxWebBrowser' control. Windowless ActiveX controls are not supported. at System.Windows.Forms.AxHost.EnsureWindowPresent() at System.Windows.Forms.AxHost.InPlaceActivate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) --- snip ---
The activate_inplace() OLE verb bails out early because Wine thinks the control is in-place activated (This->inplace) -> real in-place deactivation never took place. .NET runtime tries to fetch hosted control's window handle which fails because no parent switch was done.
Adding simple in-place deactivation (releasing IOleInPlaceSite, resetting This->inplace) lets this app succeed, having windows properly switched/re-parented.
Regards
http://bugs.winehq.org/show_bug.cgi?id=18531
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=18531
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|FontValidator (.NET based |.NET based apps using |app) needs |WebBrowser Control need |OleInPlaceObject_InPlaceDea |OleInPlaceObject_InPlaceDea |ctivate properly |ctivate properly |implemented |implemented
--- Comment #1 from Anastasius Focht focht@gmx.net 2009-05-22 05:25:12 --- Hello,
this seems to be required for several .NET apps hence I changed the summary. Another .NET app, "BinTube" (http://www.bintube.com/player/) which suffers from several bugs breaks on exit due to this stub, though different manifestation:
--- snip --- System.NotImplementedException: The method or operation is not implemented. at System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceObject.InPlaceDeactivate() at System.Windows.Forms.WebBrowserBase.TransitionFromInPlaceActiveToRunning() at System.Windows.Forms.WebBrowserBase.TransitionDownTo(AXState state) at System.Windows.Forms.WebBrowserBase.WndProc(Message& m) at System.Windows.Forms.WebBrowser.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=18531
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=18531
James McKenzie jjmckenzie51@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jjmckenzie51@earthlink.net
--- Comment #2 from James McKenzie jjmckenzie51@earthlink.net 2009-06-23 20:18:51 --- Add BibleStudyPro to the list of affected programs. Any work being done to implement this function? James
http://bugs.winehq.org/show_bug.cgi?id=18531
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #3 from Juan Lang juan_lang@yahoo.com 2009-08-14 15:03:38 --- This appears to have been fixed with commit a1ab2df19a8b7cc773c0b4cac81193be4dfca3ab, please reopen if that's not the case.
http://bugs.winehq.org/show_bug.cgi?id=18531
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2009-08-21 12:50:48 --- Closing bugs fixed in 1.1.28.
http://bugs.winehq.org/show_bug.cgi?id=18531
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Fixed by SHA1| |a1ab2df19a8b7cc773c0b4cac81 | |193be4dfca3ab
--- Comment #5 from Anastasius Focht focht@gmx.net 2011-10-11 15:27:20 CDT --- Hello,
filling/correcting fields ...
Regards
http://bugs.winehq.org/show_bug.cgi?id=18531
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|Other |x86 OS|other |Linux
https://bugs.winehq.org/show_bug.cgi?id=18531
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.microsoft.com/ty |https://web.archive.org/web |pography/FontValidator.mspx |/20180223132312/http://down | |load.microsoft.com/download | |/F/E/9/FE9795A3-756E-4F60-8 | |989-03DC9870F189/fontvalset | |up.msi