http://bugs.winehq.org/show_bug.cgi?id=20220
Summary: AutoCAD 2009: unimplemented function windowscodecs.dll.WICCreateImagingFactory_Proxy Product: Wine Version: 1.1.30 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: lukasz.wojnilowicz@gmail.com
Created an attachment (id=23845) --> (http://bugs.winehq.org/attachment.cgi?id=23845) backtrace with built-in windowscodecs.dll
I'm using wine-1.1.30-115-gf8ec47d on Fedora 11 32 bit.
Steps to reproduce: 1) start AutoCAD 2009 2) draw a line 3) select a line 4) get Unhandeled exception window from bug #20214 5) unselect line 6) hold left ctrl and select line Application crashes and closes without error message. If I use native windowscodecs.dll (699.5 KB) I get neither crash nor application closes.
I did so as Vincent Povirk advised me in bug #20214 so I went to this website and did all what was written there http://wiki.winehq.org/Backtraces
built-in windowscodecs.dll backtrace in attachment
native windowscodecs.dll no backtrace, no crash
http://bugs.winehq.org/show_bug.cgi?id=20220
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=20220
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #1 from Ken Sharp kennybobs@o2.co.uk 2009-10-01 10:38:11 --- Then why have you opened a new bug?
*** This bug has been marked as a duplicate of bug 20214 ***
http://bugs.winehq.org/show_bug.cgi?id=20220
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Ken Sharp kennybobs@o2.co.uk 2009-10-01 10:38:32 --- Closing duplicate.
http://bugs.winehq.org/show_bug.cgi?id=20220
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|DUPLICATE |
--- Comment #3 from NSLW lukasz.wojnilowicz@gmail.com 2009-10-01 10:45:10 --- (In reply to comment #1)
Then why have you opened a new bug?
*** This bug has been marked as a duplicate of bug 20214 ***
I don't think so. In this bug I use ctrl key and select drawing, then application crashes and close and in bug #20214 I don't use ctrl key at all and app doesn't crash and doesn't close and shows only warning window. I don't think that this warning window appears because of windowscodecs.dll.WICCreateImagingFactory_Proxy because when i use native windowscodecs.dll nothing changes and in this bug it doesn't cause app to crash and close.
http://bugs.winehq.org/show_bug.cgi?id=20220
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2009-10-01 20:22:25 --- You called two bugs with the same. They both are fixed by using the native windowscodecs.dll
Don't invent 100 different ways to crash one application and call them all different bugs when they all colling the same function.
*** This bug has been marked as a duplicate of bug 20214 ***
http://bugs.winehq.org/show_bug.cgi?id=20220
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Vitaliy Margolen vitaliy@kievinfo.com 2009-10-01 20:22:37 --- Closing
http://bugs.winehq.org/show_bug.cgi?id=20220
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|DUPLICATE |
--- Comment #6 from Vincent Povirk madewokherd@gmail.com 2009-10-01 20:37:57 --- The description of the other bug is incorrect. Native windowscodecs does not solve that one, so it seems it's unrelated to the unimplemented function.
http://bugs.winehq.org/show_bug.cgi?id=20220
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |xerox_xerox2000@yahoo.co.uk Ever Confirmed|0 |1
--- Comment #7 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-12-08 14:58:43 --- bug present for lots of other .net 3.0 apps as well Confirming
http://bugs.winehq.org/show_bug.cgi?id=20220
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major
--- Comment #8 from Vincent Povirk madewokherd@gmail.com 2009-12-08 15:09:16 --- Did I hear "lots of apps"? I think I did.
(Please, someone who knows about Stub and Proxy functions, come solve this.)
http://bugs.winehq.org/show_bug.cgi?id=20220
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |windowscodecs
http://bugs.winehq.org/show_bug.cgi?id=20220
Xavier Vachon xvachon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xvachon@gmail.com
--- Comment #9 from Xavier Vachon xvachon@gmail.com 2010-09-01 09:22:28 CDT --- This is still unimplemented in current git (1.3.1)
http://bugs.winehq.org/show_bug.cgi?id=20220
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com
--- Comment #10 from Damjan Jovanovic damjan.jov@gmail.com 2010-10-07 08:03:45 CDT --- Please find some simple, preferably open-source, application that can reproduce this, and I will fix it.
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #11 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-07 12:26:00 CDT --- (In reply to comment #10)
Please find some simple, preferably open-source, application that can reproduce this, and I will fix it.
Cool! See bug http://bugs.winehq.org/show_bug.cgi?id=18640:
http://www.brothersoft.com/games/valil.chess.html
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #12 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-07 12:31:11 CDT ---
Forgot to mention, as the app suffers from other bugs as well, you need to install dotnet30, disable d3d9, and create the registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-4
BTW, there's plenty of dotnet 3.0 apps that suffer from this bug, but I forgot exactly which ones ;)
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #13 from Damjan Jovanovic damjan.jov@gmail.com 2010-10-10 14:47:09 CDT --- I've written up a patch to add COM registration and widl-generated proxies and stubs to windowscodecs. Most of the stubbed windowscodecs.spec methods now make sense - the proxy methods have exactly the same names - but finer points of COM marshaling are now the problem.
According to MSDN its prototype is "WICCreateImagingFactory_Proxy(__in UINT SDKVersion, __out IWICImagingFactory **ppIImagingFactory);". If you return a plain IWICImagingFactory in the **ppIImagingFactory parameter, it then calls one of the exported IWICImagingFactory proxy methods, which calls into the widl generated code, which expects a proxy not the raw object -> exception c00000005 (ie. SIGSEGV).
I then looked into getting WICCreateImagingFactory_Proxy to return a proxy. To generate a proxy is not straightforward, you apparently have to call into the widl generated code to create an IPSFactoryBuffer, then call IPSFactoryBuffer_CreateProxy. This gives a proxy ready to marshal, but that proxy is utterly useless unless its IRpcProxyBuffer is connected to something. But connected *to what*? The registry values indicate windowscodecs runs in-process. You cannot even create an instance of IWICImagingFactory using CoCreateInstance with an out-of-process context. And the arguments to WICCreateImagingFactory_Proxy don't specify what to connect to.
Maybe the exports from windowscodecs are meant to go to the plain methods and not the widl proxy - that would probably work. But I doubt it - why all the "_Proxy" suffixes whose names exactly match the widl code?
Maybe the caller connects the proxy to something later? Returning the proxy to the application results in the application calling NdrProxyInitialize with the proxy. NdrProxyInitialize calls StdProxy_GetChannel, which return a NULL channel. Later NdrProxyInitialize attempts to access the NULL channel, causing a c0000005 :-(.
Anyway that's it for this weekend.
http://bugs.winehq.org/show_bug.cgi?id=20220
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #14 from Anastasius Focht focht@gmx.net 2011-01-09 14:50:37 CST --- Hello,
the Windows PowerShell 2.0 Integrated Scripting Environment (ISE) also suffers from this (after working around bug 25740 and 18640):
The managed callstack clearly shows the attempt to instantiate the COM server:
--- snip --- ... fixme:shell:URL_ParseUrl failed to parse L"Microsoft.PowerShell.Editor.resources" fixme:shell:URL_ParseUrl failed to parse L"PresentationCore.resources" wine: Call from 0x7b838007 to unimplemented function windowscodecs.dll.WICCreateImagingFactory_Proxy, aborting ... Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.SEHException: External component has thrown an exception. at MS.Win32.PresentationCore.UnsafeNativeMethods.WICCodec.CreateImagingFactory(UInt32 SDKVersion, IntPtr& ppICodecFactory) at System.Windows.Media.FactoryMaker.get_ImagingFactoryPtr() at System.Windows.Media.StreamAsIStream.IStreamFrom(IntPtr memoryBuffer, Int32 bufferSize) at System.Windows.Media.Imaging.BitmapDecoder.GetIStreamFromStream(Stream& bitmapStream) at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle) at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, Boolean insertInDecoderCache) at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption) at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) at System.ComponentModel.TypeConverter.ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, String text) at System.Windows.Markup.XamlTypeMapper.ParseProperty(Object targetObject, Type propType, String propName, Object dpOrPiOrFi, ITypeDescriptorContext typeContext, ParserContext parserContext, String value, Int16 converterTypeId) at System.Windows.Markup.BamlRecordReader.ParseProperty(Object element, Type propertyType, String propertyName, Object dpOrPi, String attribValue, Int16 converterTypeId) at System.Windows.Markup.BamlRecordReader.ReadPropertyRecordBase(String attribValue, Int16 attributeId, Int16 converterTypeId) at System.Windows.Markup.BamlRecordReader.ReadPropertyConverterRecord(BamlPropertyWithConverterRecord bamlPropertyRecord) at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord) at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment() at System.Windows.Markup.TreeBuilder.Parse() at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Microsoft.Windows.PowerShell.Gui.Internal.MainWindow.InitializeComponent() at Microsoft.Windows.PowerShell.Gui.Internal.MainWindow..ctor() at Microsoft.Windows.PowerShell.Gui.Internal.PSGInternalHost.Initialize() at Microsoft.Windows.PowerShell.Gui.Internal.Program.ShowMainWindow(String[] filesToOpen, SendOrPostCallback loadedCallback) --- End of inner exception stack trace --- at Microsoft.Windows.PowerShell.GuiExe.Internal.GPowerShell.Main(String[] args) wine: Unhandled exception 0xe0434f4d at address 0x7b838007 (thread 0009), starting debugger... Unhandled exception: 0xe0434f4d in 32-bit code (0x7b838007). --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=20220
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Summary|AutoCAD 2009: unimplemented |Missing |function |windowscodecs.dll.WICCreate |windowscodecs.dll.WICCreate |ImagingFactory_Proxy causes |ImagingFactory_Proxy |failure for many .NET | |3.x/4.x (WPF) based | |installers/apps
--- Comment #15 from Anastasius Focht focht@gmx.net 2012-05-01 17:12:00 CDT --- Hello,
obviously still present.
From my experience this affects many 3.x/4.x .NET based installers/apps that
make use of WPF. Refining summary.
'winetricks windowscodecs' works around but breaks winemenubuilder.
$ wine --version wine-1.5.3-73-g93a0ca7
Regards
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #16 from Anastasius Focht focht@gmx.net 2012-05-01 18:09:45 CDT --- Hello,
this MSDN entry lists all WIC proxy functions: http://msdn.microsoft.com/en-us/library/ee872008%28v=vs.85%29.aspx
--- quote --- These kinds of functions provide an easy interop to the WIC API since it's based on COM. --- quote ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #17 from Vincent Povirk madewokherd@gmail.com 2012-05-05 21:22:23 CDT --- Damjan, can you attach your patch that exports the widl-generated functions?
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #18 from Damjan Jovanovic damjan.jov@gmail.com 2012-05-06 11:37:39 CDT --- (In reply to comment #17)
Damjan, can you attach your patch that exports the widl-generated functions?
Sorry, that patch went missing. I'll have to redevelop it.
http://bugs.winehq.org/show_bug.cgi?id=20220
--- Comment #19 from Vincent Povirk madewokherd@gmail.com 2012-05-08 09:29:35 CDT --- Created attachment 40089 --> http://bugs.winehq.org/attachment.cgi?id=40089 test program
Looks like that won't be necessary. According to the results of this test program, the _Proxy functions and the normal COM way of doing things are interchangeable, and WICCreateImagingFactory_Proxy gives me an object with the same vtable as CoCreateInstance.
So I guess I'll just write them as thin wrappers.
http://bugs.winehq.org/show_bug.cgi?id=20220
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #40089|0 |1 is obsolete| |
--- Comment #20 from Vincent Povirk madewokherd@gmail.com 2012-05-08 09:32:51 CDT --- Created attachment 40090 --> http://bugs.winehq.org/attachment.cgi?id=40090 test program showing they're not real COM proxies
Whoops, wrong test program.
http://bugs.winehq.org/show_bug.cgi?id=20220
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |bb2df245a76ce0d0f0631ad0890 | |e19efa7a114c0 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #21 from Anastasius Focht focht@gmx.net 2012-05-09 16:57:45 CDT --- Hello,
fixed by commit http://source.winehq.org/git/wine.git/commitdiff/bb2df245a76ce0d0f0631ad0890...
Thanks Vincent
If you encounter other missing WIC proxy methods file separate bugs.
Regards
http://bugs.winehq.org/show_bug.cgi?id=20220
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #22 from Alexandre Julliard julliard@winehq.org 2012-05-11 13:21:44 CDT --- Closing bugs fixed in 1.5.4.
https://bugs.winehq.org/show_bug.cgi?id=20220
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://web.archive.org/web | |/20081112055516/http://www. | |valil.com/winfx/RTM/Chess/A | |PP/Valil.Chess.WinFX.bin.zi | |p