https://bugs.winehq.org/show_bug.cgi?id=49395
Bug ID: 49395 Summary: Altium Designer 20 crashes with E_NOINTERFACE apparently from CreateDxgiSurfaceRenderTarget Product: Wine Version: 5.10 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: d2d Assignee: wine-bugs@winehq.org Reporter: me+wine@shane.sh Distribution: ---
Created attachment 67463 --> https://bugs.winehq.org/attachment.cgi?id=67463 Crash log from Altium
I'm trying to get Altium Designer 20 running in wine. I'm using wine-staging 5.10 with the msxml6 and dotnet461 winetricks. The winetricks are necessary to get the application to start, and wine-staging because it includes a fix for https://bugs.winehq.org/show_bug.cgi?id=46568. I'm also using the patch from https://bugs.winehq.org/show_bug.cgi?id=49379.
The crash log from Altium indicates says that the C# function SharpDX.Direct2D1.Factory.CreateDxgiSurfaceRenderTarget received a HRESULT of E_NOINTERFACE. I don't understand how FFI works in C#, but SharpDX is open-source and https://github.com/sharpdx/SharpDX/blob/master/Source/SharpDX.Direct2D1/Mapp... and https://github.com/sharpdx/SharpDX/blob/master/Source/SharpDX.Direct2D1/Rend... seem like relevant parts of the code. Presumably though this just gets mapped to d2d_factory_CreateDxgiSurfaceRenderTarget from dlls/d2d1/factory.c.
Also relevant is that the following shows up in STDERR when running wine at the same time as the crash:
00c4:fixme:d2d:d2d_d3d_create_render_target Ignoring render target usage 0x2.
And d2d_d3d_create_render_target is indeed called at the end of d2d_factory_CreateDxgiSurfaceRenderTarget, so it seems to get at least that far.
But from reading the source of d2d_d3d_create_render_target, I don't see how it could ever return E_NOINTERFACE without at least printing some additional warnings, but I don't see any.
Any help would be greatly appreciated!
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Please attach text file log when running with WINEDEBUG=+d2d.
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #2 from Shane me+wine@shane.sh --- Created attachment 67464 --> https://bugs.winehq.org/attachment.cgi?id=67464 WINEDEBUG=+d2d log
Aha, that helps! I didn't realise that you needed WINEDEBUG to print warnings. I did try it anyway, but I was doing WINEDEBUG=+d2d1, which made no difference. Here's the log (the relevant section will appear twice because I dismissed the crash report window the first time which causes the crash to immediately happen again).
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- I suspect this is related to https://source.winehq.org/git/wine.git/commit/2814e5ce0b9d9b1c058a8937692bce.... You can try reverting that to get past E_NOINTERFACE failure.
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #4 from Henri Verbeet hverbeet@gmail.com --- (In reply to Shane from comment #2)
Aha, that helps! I didn't realise that you needed WINEDEBUG to print warnings. I did try it anyway, but I was doing WINEDEBUG=+d2d1, which made no difference.
Mostly for future reference, the default debug channel is declared with the WINE_DEFAULT_DEBUG_CHANNEL macro, typically near the top of the relevant file.
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #5 from Shane me+wine@shane.sh --- (In reply to Nikolay Sivov from comment #3)
I suspect this is related to https://source.winehq.org/git/wine.git/commit/ 2814e5ce0b9d9b1c058a8937692bce6212ac74b4. You can try reverting that to get past E_NOINTERFACE failure.
Yep, you're right, it works when I revert that commit. Thanks so much! I got a lot further this time but it still crashes eventually, but it's not related to d2d anymore I don't think. Though it is awfully slow and STDERR is being spammed with:
00c0:fixme:d2d:d2d_device_context_DrawGeometry Ignoring stroke style 000000014B75E930
But that's a different issue.
I'll try to make some sense of this new crash and report a separate bug for that if I can figure it out.
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #6 from Shane me+wine@shane.sh --- (In reply to Henri Verbeet from comment #4)
Mostly for future reference, the default debug channel is declared with the WINE_DEFAULT_DEBUG_CHANNEL macro, typically near the top of the relevant file.
Thanks, that's good to know. This is my first time ever trying to hack on wine so little tips like that are what I need!
https://bugs.winehq.org/show_bug.cgi?id=49395
Andrzej Kilijański and3md@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |and3md@gmail.com
--- Comment #7 from Andrzej Kilijański and3md@gmail.com --- *** Bug 49519 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #8 from Andrzej Kilijański and3md@gmail.com --- Affects also T-Force Alpha Plus VST2 64bit plugin (https://bugs.winehq.org/show_bug.cgi?id=49519)
https://bugs.winehq.org/show_bug.cgi?id=49395
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs@gmail.c | |om
https://bugs.winehq.org/show_bug.cgi?id=49395
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |focht@gmx.net Regression SHA1| |2814e5ce0b9d9b1c058a8937692 | |bce6212ac74b Component|d2d |directx-d3d Summary|Altium Designer 20 crashes |Multiple applications |with E_NOINTERFACE |stopped working after |apparently from |upgrade to Wine 5.10 which |CreateDxgiSurfaceRenderTarg |removed advertising of |et |ID3D10Device interface on | |devices created by d3d11 | |(Altium Designer 20, | |T-Force Alpha Plus VST2 | |64bit plugin) Keywords| |regression
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
refining some fields here.
Regards
https://bugs.winehq.org/show_bug.cgi?id=49395
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple applications |Multiple applications |stopped working after |stopped working after |upgrade to Wine 5.10 which |upgrade to Wine 5.10 which |removed advertising of |removed advertising of |ID3D10Device interface on |ID3D10Device interface on |devices created by d3d11 |devices created by d3d11 |(Altium Designer 20, |(Altium Designer 20, |T-Force Alpha Plus VST2 |T-Force Alpha Plus VST2 |64bit plugin) |64bit plugin, | |MSDN-Direct2D-Demo) Keywords| |download URL| |https://web.archive.org/web | |/20201227155621/http://file | |s.djkaty.com/software/Simpl | |e2D/Simple2DSetup-1.13.exe
--- Comment #10 from Anastasius Focht focht@gmx.net --- Hello folks,
I've found more apps suffering from this. 'MSDN-Direct2D-Demo.exe' example from bug 46038 crashes after the regression commit.
https://web.archive.org/web/20201227155621/http://files.djkaty.com/software/...
$ sha1sum Simple2DSetup-1.13.exe 269c002fb9ea11c2abd8958fc3cc4294af1b45d9 Simple2DSetup-1.13.exe
$ du -sh Simple2DSetup-1.13.exe 11M Simple2DSetup-1.13.exe
$ wine --version wine-6.0-rc4
Regards
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- As far as I know it's not a D3D issue, because it now works as it's supposed to regarding d3d10/d3d11 interface duality. The issue is that D2D at the moment can't handle a device that does not support d3d10 interface variant.
https://bugs.winehq.org/show_bug.cgi?id=49395
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple applications |Multiple Direct2D |stopped working after |applications stopped |upgrade to Wine 5.10 which |working after upgrade to |removed advertising of |Wine 5.10 which removed |ID3D10Device interface on |advertising of ID3D10Device |devices created by d3d11 |interface on d3d11 devices |(Altium Designer 20, |(Altium Designer 20, |T-Force Alpha Plus VST2 |T-Force Alpha Plus VST2 |64bit plugin, |64bit plugin, |MSDN-Direct2D-Demo) |MSDN-Direct2D-Demo) Component|directx-d3d |d2d
--- Comment #12 from Anastasius Focht focht@gmx.net --- Hello Nikolay,
--- quote --- As far as I know it's not a D3D issue, because it now works as it's supposed to regarding d3d10/d3d11 interface duality. The issue is that D2D at the moment can't handle a device that does not support d3d10 interface variant. --- quote ---
thanks for the clarification. Changed component back.
Regards
https://bugs.winehq.org/show_bug.cgi?id=49395
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #13 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 69096 --> https://bugs.winehq.org/attachment.cgi?id=69096 Fix
I've sent a first series of tests to validate D2D / D3D11 interop, and I've implemented a fix for this regression, although the changes may be a bit too large for the code freeze.
It uses D3DDeviceContextState to enable D3D10Device interface on D3D11 device, with a semi-stub implementation in wined3d to allow interface query again after SwapDeviceContextState has been called. The state is not actually restored, but I don't think Wine D2D implementation depends on it, as it does state record / restore on the D3D10 interface already.
I'm attaching the patch series here, in any case.
https://bugs.winehq.org/show_bug.cgi?id=49395
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
adding another app affected by this regression.
PreSonus Studio One 3 from bug 39469
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/PreSonus/Studio One 3
$ WINEDEBUG=+seh,+relay,+dxgi,+d3d,+d2d wine ./Studio\ One.exe >>log.txt 2>&1 ... 00fc:trace:d2d:D2D1CreateFactory factory_type 0, iid {bb12d362-daee-4b9a-aa1d-14ba401cfa1f}, factory_options 00000000, factory 02DA1F34. ... 00fc:trace:d2d:D2D1CreateFactory Created factory 00210608. 00fc:trace:d2d:d2d_factory_QueryInterface iface 00210608, iid {bb12d362-daee-4b9a-aa1d-14ba401cfa1f}, out 02DA1F34. 00fc:trace:d2d:d2d_factory_AddRef 00210608 increasing refcount to 2. 00fc:trace:d2d:d2d_factory_Release 00210608 decreasing refcount to 1. 00fc:Ret d2d1.D2D1CreateFactory() retval=00000000 ret=02aa9832 00fc:trace:d2d:d2d_factory_CreateDevice iface 00210608, dxgi_device 001F2960, device 02DA1F38. ... 00fc:trace:d2d:d2d_factory_AddRef 00210608 increasing refcount to 2. 00fc:trace:dxgi:dxgi_device_AddRef 0x1f2960 increasing refcount to 4 00fc:trace:d2d:d2d_factory_CreateDevice Create device 0020FEC0. 00fc:trace:d2d:d2d_device_CreateDeviceContext iface 0020FEC0, options 0, context 02DA1F3C. ... 00fc:trace:d2d:d2d_device_GetFactory iface 0020FEC0, factory 0020FAD4. 00fc:trace:d2d:d2d_factory_AddRef 00210608 increasing refcount to 3. 00fc:trace:d2d:d2d_device_AddRef 0020FEC0 increasing refcount to 2. 00fc:trace:dxgi:dxgi_device_QueryInterface iface 0x1f2960, riid {9b7e4c0f-342c-4106-a19f-4f2704f689f0}, object 0x20fadc 00fc:trace:dxgi:dxgi_device_QueryInterface Forwarding to child layer 0x1f2984. 00fc:trace:d3d11:d3d_device_inner_QueryInterface iface 001F2984, riid {9b7e4c0f-342c-4106-a19f-4f2704f689f0}, out 0020FADC. 00fc:warn:d3d11:d3d_device_inner_QueryInterface {9b7e4c0f-342c-4106-a19f-4f2704f689f0} not implemented, returning E_NOINTERFACE. 00fc:warn:d2d:d2d_device_context_init Failed to get device interface, hr 0x80004002. 00fc:trace:d2d:d2d_factory_Release 00210608 decreasing refcount to 2. 00fc:warn:d2d:d2d_device_CreateDeviceContext Failed to initialize device context, hr 0x80004002. ... 00fc:Call user32.MessageBoxW(00000000,03967c80 L"This application requires Windows 7 SP1 with Platform Update or later.",02d87bb4 L"",00042030) ret=02b6c3dd --- snip ---
https://web.archive.org/web/20210328090524/https://download.informer.com/win...
https://web.archive.org/web/20210328090554/https://download.informer.com/win...
$ sha1sum presonus_studio_one_3_installer* 94bdac4bc8e55e839fbf7d096a1acb9975744f82 presonus_studio_one_3_installer.exe eb51794ec3ffd3f86d8c5770529f741ad4885ad0 presonus_studio_one_3_installer_x64_.exe
$ du -sh presonus_studio_one_3_installer* 87M presonus_studio_one_3_installer.exe 91M presonus_studio_one_3_installer_x64_.exe
$ wine --version wine-6.5
Regards
https://bugs.winehq.org/show_bug.cgi?id=49395
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget@codeweavers.com Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=49395
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #15 from winetest@luukku.com --- I can't test this, but this bug might have been fixed now.
208518 Committed Rémi Bernon ▼ [PATCH 5/5] d2d1: Remove unused D3D10 interfaces. Henri Verbeet ✓✓ Failed 93190 208517 Committed Rémi Bernon ▼ [PATCH 4/5] d2d1: Use D3DDeviceContextState instead of D3D10 state block. Henri Verbeet ✓✓ OK 93189 208515 Committed Rémi Bernon ▼ [PATCH 3/5] d2d1: Use D3D11 interfaces to create sampler states. Henri Verbeet ✓✓ OK 93188 208514 Committed Rémi Bernon ▼ [PATCH 2/5] d2d1: Use D3D11 interfaces to create blend state. Henri Verbeet ✓✓ OK 93187 208516 Committed Rémi Bernon ▼ [PATCH 1/5] d2d1: Use D3D11 interfaces to create rasterizer state.
https://source.winehq.org/patches/ https://source.winehq.org/patches/data/208516
https://bugs.winehq.org/show_bug.cgi?id=49395
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e6603ae4e74463e925ca9e28706 | |575de6be30226 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #16 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commits:
* https://source.winehq.org/git/wine.git/commitdiff/942ee9318ea5cadfebf4da6db7... ("d2d1: Use D3D11 interfaces to create rasterizer state.")
* https://source.winehq.org/git/wine.git/commitdiff/50e04d9f9d18fd29e747c4dc48... ("d2d1: Use D3D11 interfaces to create blend state.")
* https://source.winehq.org/git/wine.git/commitdiff/580ef84cae0955bd533702d8b2... ("d2d1: Use D3D11 interfaces to create sampler states.")
* https://source.winehq.org/git/wine.git/commitdiff/8c9354926204242cde714a51e5... ("d2d1: Use D3DDeviceContextState instead of D3D10 state block.")
* https://source.winehq.org/git/wine.git/commitdiff/e6603ae4e74463e925ca9e2870... ("d2d1: Remove unused D3D10 interfaces.")
Thanks Rémi
$ wine --version wine-6.11-199-g362eed3ae30
Regards
https://bugs.winehq.org/show_bug.cgi?id=49395
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.12.