http://bugs.winehq.org/show_bug.cgi?id=32654
Bug #: 32654 Summary: Visual Studio 2010 fails on shutdown, needs windowscodecs WICSetEncoderFormat_Proxy stub Product: Wine Version: 1.5.21 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: windowscodecs AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
upon shutdown of Visual Studio 2010 IDE:
--- snip --- 002c:Call KERNEL32.GetProcAddress(f7140000,055bfe54 "WICSetEncoderFormat_Proxy") ret=79171e1e 002c:Ret KERNEL32.GetProcAddress() retval=f714e9fc ret=79171e1e ... 002c:Call KERNEL32.RaiseException(80000100,00000001,00000002,0032dbf4) ret=f71d0891 002c:trace:seh:raise_exception code=80000100 flags=1 addr=0x7b83aa77 ip=7b83aa77 tid=002c 002c:trace:seh:raise_exception info[0]=f71d0900 002c:trace:seh:raise_exception info[1]=f71d0a88 wine: Call from 0x7b83aa77 to unimplemented function windowscodecs.dll.WICSetEncoderFormat_Proxy, aborting 002c:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c code=80000100 flags=1 002c:Call KERNEL32.GetLastError() ret=791f5aa7 002c:Ret KERNEL32.GetLastError() retval=00000000 ret=791f5aa7 002c:trace:seh:call_vectored_handlers handler at 0x791f5a7c returned 0 002c:trace:seh:call_stack_handlers calling handler at 0x791ccc44 code=80000100 flags=1 --- snip ---
Prerequisite: winetricks -q dotnet20 dotnet40 corefonts
Regards
http://bugs.winehq.org/show_bug.cgi?id=32654
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://go.microsoft.com/?li | |nkid=9709949 Depends on| |32568
http://bugs.winehq.org/show_bug.cgi?id=32654
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spetreolle@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=32654
--- Comment #1 from Vincent Povirk madewokherd@gmail.com 2013-02-27 15:59:30 CST --- Created attachment 43733 --> http://bugs.winehq.org/attachment.cgi?id=43733 implementation attempt #1
Does this patch help?
http://bugs.winehq.org/show_bug.cgi?id=32654
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=32654
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Visual Studio 2010 fails on |Visual Studio 2010 needs |shutdown, needs |windowscodecs |windowscodecs |WICSetEncoderFormat_Proxy |WICSetEncoderFormat_Proxy | |stub |
--- Comment #2 from Anastasius Focht focht@gmx.net 2013-02-27 17:12:34 CST --- Hello Vincent,
yes, it goes a bit further.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE ... $ WINEDEBUG=+tid,+seh,+relay,+wincodecs wine ./VCExpress.exe ... 002b:Call windowscodecs.WICSetEncoderFormat_Proxy(065e6080,00000000,065e4e50,0032f15c) ret=0f24f5bb 002b:trace:wincodecs:WICSetEncoderFormat_Proxy 0x65e6080,(nil),0x65e4e50,0x32f15c 002b:trace:wincodecs:BitmapImpl_GetPixelFormat (0x65e6080,0x32f008) 002b:trace:wincodecs:TiffFrameEncode_SetPixelFormat (0x65e4e50,{6fddc324-4e03-4bfe-b185-3d77768dc90f}) 002b:trace:wincodecs:BitmapImpl_AddRef (0x65e6080) refcount=5 002b:Ret windowscodecs.WICSetEncoderFormat_Proxy() retval=00000000 ret=0f24f5bb ... 002b:Call windowscodecs.IWICBitmapFrameEncode_WriteSource_Proxy(065e4e50,065e6080,0032f214) ret=0f24f77b 002b:trace:wincodecs:TiffFrameEncode_WriteSource (0x65e4e50,0x65e6080,0x32f214) 002b:trace:wincodecs:BitmapImpl_GetPixelFormat (0x65e6080,0x32ef7c) 002b:Ret windowscodecs.IWICBitmapFrameEncode_WriteSource_Proxy() retval=80070057 ret=0f24f77b ... 002b:trace:seh:raise_exception code=e0434352 flags=1 addr=0x7b83aabb ip=7b83aabb tid=002b 002b:trace:seh:raise_exception info[0]=80070057 002b:trace:seh:raise_exception info[1]=00000000 002b:trace:seh:raise_exception info[2]=00000000 002b:trace:seh:raise_exception info[3]=00000000 002b:trace:seh:raise_exception info[4]=79140000 002b:trace:seh:raise_exception eax=7b826891 ebx=7b8b96b0 ecx=79140000 edx=0032ef88 esi=0032f068 edi=0032efe0 002b:trace:seh:raise_exception ebp=0032efb8 esp=0032ef54 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00000283 002b:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c code=e0434352 flags=1 ... 002b:Call oleaut32.SysAllocStringLen(01584f9c L"Value does not fall within the expected range.",0000002e) ret=793c87f2 --- snip ---
--- snip --- Wine-dbg>bt Backtrace: =>0 0xf728bb6f TiffFrameEncode_WriteSource(iface=0xeccd9f0, pIBitmapSource=0xec9f448, prc=0x33f214) [/home/focht/projects/wine/wine-git/dlls/windowscodecs/tiffformat.c:1642] in windowscodecs (0x0033f108) 1 0x06a6f77b (0x0033f19c) 2 0x06a6edcd (0x0033f25c)
Wine-dbg>p *prc {X=0, Y=0, Width=0, Height=0}
Wine-dbg>p *This {IWICBitmapFrameEncode_iface={lpVtbl=0xf72f7740}, ref=0x1, parent=0xec9f6e8, initialized=0x1, info_written=0, committed=0, format=0xf72f8d20, width=0x10, height=0x10, xres=96.000000, yres=96.000000, lines_written=0} --- snip ---
Source of failure:
http://source.winehq.org/git/wine.git/blob/d8c71dd5ed80111c401382dc9dd6c5a21...
--- snip --- 1640 static HRESULT WINAPI TiffFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, 1641 IWICBitmapSource *pIBitmapSource, WICRect *prc) 1642 { 1643 TiffFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface); 1644 HRESULT hr; 1645 WICRect rc; 1646 WICPixelFormatGUID guid; 1647 UINT stride; 1648 BYTE *pixeldata; ... Wine-dbg>l 1693 if (prc->Width != This->width) return E_INVALIDARG; 1694 1695 stride = (This->format->bpp * This->width + 7)/8; 1696 1697 pixeldata = HeapAlloc(GetProcessHeap(), 0, stride * prc->Height); 1698 if (!pixeldata) return E_OUTOFMEMORY; 1699 1700 hr = IWICBitmapSource_CopyPixels(pIBitmapSource, prc, stride, 1701 stride*prc->Height, pixeldata); 1702 1703 if (SUCCEEDED(hr)) --- snip ---
Not sure if the empty rect is result of an earlier problem.
Interestingly it's also required on startup now, refining summary.
Regards
http://bugs.winehq.org/show_bug.cgi?id=32654
--- Comment #3 from Vincent Povirk madewokherd@gmail.com 2013-03-02 10:59:39 CST --- A quick test on Windows XP shows that passing an empty rect to WriteSource doesn't work, so I guess there is an earlier problem.
http://bugs.winehq.org/show_bug.cgi?id=32654
--- Comment #4 from Anastasius Focht focht@gmx.net 2013-03-02 18:08:43 CST --- Hello Vincent,
filtered relay/windowscodecs trace log before the problem:
--- snip --- 002b:trace:wincodecs:TiffEncoder_CreateInstance ((nil),{00000103-a8f2-4877-ba0a-fd2b6645fb94},0x32f03c) 002b:trace:wincodecs:TiffEncoder_QueryInterface (0x65f2020,{00000103-a8f2-4877-ba0a-fd2b6645fb94},0x32f03c) 002b:trace:wincodecs:TiffEncoder_AddRef (0x65f2020) refcount=2 002b:trace:wincodecs:TiffEncoder_Release (0x65f2020) refcount=1 002b:trace:wincodecs:ClassFactoryImpl_Release (0x65f2008) refcount=0 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e4f88) refcount=2 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e4f88) refcount=1 002b:trace:wincodecs:ComponentEnum_Release (0x65e4f38) refcount=0 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e4f88) refcount=0 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e4fc8) refcount=0 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e5008) refcount=0 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e8440) refcount=0 002b:trace:wincodecs:BitmapEncoderInfo_Release (0x65e8480) refcount=0 002b:Ret windowscodecs.IWICImagingFactory_CreateEncoder_Proxy() retval=00000000 ret=0f29c0ec 002b:trace:wincodecs:ComponentFactory_Release (0x65e4f20) refcount=0 002b:Call windowscodecs.IWICBitmapEncoder_Initialize_Proxy(065f2020,0661e678,00000002) ret=0f29dc8c 002b:trace:wincodecs:TiffEncoder_Initialize (0x65f2020,0x661e678,2) 002b:Ret windowscodecs.IWICBitmapEncoder_Initialize_Proxy() retval=00000000 ret=0f29dc8c 002b:Call windowscodecs.IWICBitmapEncoder_CreateNewFrame_Proxy(065f2020,0032f234,0032f230) ret=0f29e7e1 002b:trace:wincodecs:TiffEncoder_CreateNewFrame (0x65f2020,0x32f234,0x32f230) 002b:trace:wincodecs:TiffEncoder_AddRef (0x65f2020) refcount=2 002b:Ret windowscodecs.IWICBitmapEncoder_CreateNewFrame_Proxy() retval=00000000 ret=0f29e7e1 002b:Call windowscodecs.IWICBitmapFrameEncode_Initialize_Proxy(0661e6c0,001931c8) ret=0f29f0ad 002b:trace:wincodecs:TiffFrameEncode_Initialize (0x661e6c0,0x1931c8) 002b:Ret windowscodecs.IWICBitmapFrameEncode_Initialize_Proxy() retval=00000000 ret=0f29f0ad 002b:Call windowscodecs.IWICBitmapFrameEncode_SetSize_Proxy(0661e6c0,00000010,00000010) ret=0f29f31c 002b:trace:wincodecs:TiffFrameEncode_SetSize (0x661e6c0,16,16) 002b:Ret windowscodecs.IWICBitmapFrameEncode_SetSize_Proxy() retval=00000000 ret=0f29f31c 002b:Call windowscodecs.IWICBitmapFrameEncode_SetResolution_Proxy(0661e6c0,00000000,40580000,00000000,40580000) ret=0f268e08 002b:trace:wincodecs:TiffFrameEncode_SetResolution (0x661e6c0,96.00,96.00) 002b:Ret windowscodecs.IWICBitmapFrameEncode_SetResolution_Proxy() retval=00000000 ret=0f268e08 002b:Call windowscodecs.WICSetEncoderFormat_Proxy(001b7e60,00000000,0661e6c0,0032f15c) ret=0f29f5bb 002b:trace:wincodecs:WICSetEncoderFormat_Proxy 0x1b7e60,(nil),0x661e6c0,0x32f15c 002b:trace:wincodecs:BitmapImpl_GetPixelFormat (0x1b7e60,0x32f008) 002b:trace:wincodecs:TiffFrameEncode_SetPixelFormat (0x661e6c0,{6fddc324-4e03-4bfe-b185-3d77768dc90f}) 002b:trace:wincodecs:BitmapImpl_AddRef (0x1b7e60) refcount=5 002b:Ret windowscodecs.WICSetEncoderFormat_Proxy() retval=00000000 ret=0f29f5bb 002b:Call windowscodecs.IWICBitmapFrameEncode_WriteSource_Proxy(0661e6c0,001b7e60,0032f214) ret=0f29f77b 002b:trace:wincodecs:TiffFrameEncode_WriteSource (0x661e6c0,0x1b7e60,0x32f214) 002b:trace:wincodecs:BitmapImpl_GetPixelFormat (0x1b7e60,0x32ef7c) 002b:Ret windowscodecs.IWICBitmapFrameEncode_WriteSource_Proxy() retval=80070057 ret=0f29f77b --- snip ---
This is the managed callstack at the point of failure:
--- snip --- (2a.2b): CLR exception - code e0434352 (first chance) Child SP IP Call Site 0033f158 7b83aabb [HelperMethodFrame: 0033f158] 0033f1a8 0f2cee3c System.Windows.Media.Imaging.BitmapEncoder.SaveFrame(System.Windows.Media.SafeMILHandle, System.Windows.Media.SafeMILHandle, System.Windows.Media.Imaging.BitmapFrame) 0033f26c 0f2cbdeb System.Windows.Media.Imaging.BitmapEncoder.Save(System.IO.Stream) 0033f2ec 0f2ca35c Microsoft.VisualStudio.PlatformUI.MainWindow.SetWindowIcon() 0033f320 0f2c56c1 Microsoft.VisualStudio.PlatformUI.MainWindow.OnSourceInitialized(System.EventArgs) 0033f350 0f0a9e0f System.Windows.Window.CreateSourceWindow(Boolean) 0033f420 0f0a99c7 System.Windows.Interop.WindowInteropHelper.EnsureHandle() 0033f430 04c4d06f Microsoft.Internal.VisualStudio.PlatformUI.WpfHostPrivate.CreateWPFUIElementContainer(System.String, IntPtr, Microsoft.VisualStudio.Shell.Interop.IVsUIElement, Microsoft.VisualStudio.Shell.Interop.IVsUIDataSource, System.Object, Microsoft.Internal.VisualStudio.Shell.Interop.IVsUIWPFElementContainerPrivate ByRef) 0033f46c 04c4632c DomainNeutralILStubClass.IL_STUB_COMtoCLR(IntPtr, Int32, IntPtr, IntPtr, IntPtr, IntPtr) ... --- snip ---
What I deduce through .NET debugger is that the rectangle created by the caller of IWICBitmapFrameEncode::WriteSource() is indeed an empty one (BitmapEncoder.SaveFrame). Corresponding .NET code might look like this:
--- snip --- ... Int32Rect rect = new Int32Rect(); WICBitmapFrameEncode.WriteSource( ..., ref rect) --- snip ---
MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ee690159%28v=vs.85%2...
--- quote --- HRESULT WriteSource( [in] IWICBitmapSource *pIBitmapSource, [in, unique] WICRect *prc );
... Parameters
pIBitmapSource [in]
Type: IWICBitmapSource*
The bitmap source to encode. prc [in]
Type: WICRect*
The size rectangle of the bitmap source.
...
If SetSize is not called prior to calling WriteSource, the size given in prc is used if not NULL. Otherwise, the size of the IWICBitmapSource given in pIBitmapSource is used. --- quote ---
SetSize() is definitely called prior to WriteSource().
Regards
http://bugs.winehq.org/show_bug.cgi?id=32654
--- Comment #5 from Vincent Povirk madewokherd@gmail.com 2013-03-02 19:07:12 CST --- My test case did call SetSize before passing the empty rect to WriteSource. The call to WriteSource failed. The same code succeeds with a NULL rect.
http://bugs.winehq.org/show_bug.cgi?id=32654
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33149
http://bugs.winehq.org/show_bug.cgi?id=32654
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #6 from Dan Kegel dank@kegel.com 2013-09-02 19:28:36 CDT --- Visual C++ 2010 express still hits this on startup with wine-1.7.1-26-g1562065:
wine: Call from 0x7b83b402 to unimplemented function windowscodecs.dll.WICSetEncoderFormat_Proxy, aborting
'winetricks windowscodecs' still works around it.
http://bugs.winehq.org/show_bug.cgi?id=32654
--- Comment #7 from Austin English austinenglish@gmail.com 2013-10-29 18:27:18 CDT --- (In reply to comment #6)
Visual C++ 2010 express still hits this on startup with wine-1.7.1-26-g1562065:
wine: Call from 0x7b83b402 to unimplemented function windowscodecs.dll.WICSetEncoderFormat_Proxy, aborting
'winetricks windowscodecs' still works around it.
Try http://source.winehq.org/git/wine.git/commitdiff/4d30c057bf2aaad7985713cd980...
http://bugs.winehq.org/show_bug.cgi?id=32654
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4d30c057bf2aaad7985713cd980 | |00756d2e6b61a Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #8 from Anastasius Focht focht@gmx.net 2013-10-30 03:56:54 CDT --- Hello folks,
WICSetEncoderFormat_Proxy was implemented by commit http://source.winehq.org/git/wine.git/commitdiff/4d30c057bf2aaad7985713cd980...
Thanks Vincent.
--- snip --- ... 002b:Call windowscodecs.WICSetEncoderFormat_Proxy(05b68c9c,00000000,05ba0078,0033f15c) ret=0f1ff5bb 002b:trace:wincodecs:WICSetEncoderFormat_Proxy 0x5b68c9c,(nil),0x5ba0078,0x33f15c 002b:trace:wincodecs:BitmapImpl_GetPixelFormat (0x5b68c9c,0x33f058) 002b:trace:wincodecs:TiffFrameEncode_SetPixelFormat (0x5ba0078,{6fddc324-4e03-4bfe-b185-3d77768dc90f}) 002b:trace:wincodecs:BitmapImpl_AddRef (0x5b68c9c) refcount=5 002b:Ret windowscodecs.WICSetEncoderFormat_Proxy() retval=00000000 ret=0f1ff5bb ... --- snip ---
The failure from comment #2 is still there:
--- snip --- 002b:Call windowscodecs.IWICBitmapFrameEncode_WriteSource_Proxy(05ba0078,05b68c9c,0033f214) ret=0f1ff77b 002b:trace:wincodecs:TiffFrameEncode_WriteSource (0x5ba0078,0x5b68c9c,0x33f214) 002b:trace:wincodecs:BitmapImpl_GetPixelFormat (0x5b68c9c,0x33efcc) 002b:Ret windowscodecs.IWICBitmapFrameEncode_WriteSource_Proxy() retval=80070057 ret=0f1ff77b ... 002b:Call KERNEL32.RaiseException(e0434352,00000001,00000005,0033f0ac) ret=791cac08 002b:trace:seh:raise_exception code=e0434352 flags=1 addr=0x7b83a8bf ip=7b83a8bf tid=002b 002b:trace:seh:raise_exception info[0]=80070057 002b:trace:seh:raise_exception info[1]=00000000 002b:trace:seh:raise_exception info[2]=00000000 002b:trace:seh:raise_exception info[3]=00000000 002b:trace:seh:raise_exception info[4]=79140000 002b:trace:seh:raise_exception eax=7b8268f1 ebx=7b8ba000 ecx=80070057 edx=0033efc4 esi=0033f068 edi=0033f030 002b:trace:seh:raise_exception ebp=0033f008 esp=0033efa4 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00200287 ... 002b:Call oleaut32.SysAllocStringLen(01554f9c L"Value does not fall within the expected range.",0000002e) ret=793c87f2 ... 002b:Call user32.MessageBeep(00000000) ret=36b218c4 002b:Ret user32.MessageBeep() retval=00000001 ret=36b218c4 --- snip ---
It now fails directly on startup which should be subject to a new bug.
Regards
http://bugs.winehq.org/show_bug.cgi?id=32654
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2013-11-08 12:32:37 CST --- Closing bugs fixed in 1.7.6.
https://bugs.winehq.org/show_bug.cgi?id=32654
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks|33149 |
https://bugs.winehq.org/show_bug.cgi?id=32654 Bug 32654 depends on bug 32568, which changed state.
Bug 32568 Summary: Visual Studio 2010 fails on startup, .NET Framework 4.0 WPF message dispatcher unexpectedly receives messages (CoWaitForMultipleHandles, COWAIT_FLAGS, message pump) https://bugs.winehq.org/show_bug.cgi?id=32568
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
https://bugs.winehq.org/show_bug.cgi?id=32654
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://go.microsoft.com/?li |https://web.archive.org/web |nkid=9709949 |/20111016110147/http://down | |load.microsoft.com/download | |/1/E/5/1E5F1C0A-0D5B-426A-A | |603-1798B951DDAE/VS2010Expr | |ess1.iso