[Bug 41926] New: Zafehouse demo crashes with Call from 0x7b43c14c to unimplemented function ddraw.dll.GetSurfaceFromDC , aborting
https://bugs.winehq.org/show_bug.cgi?id=41926 Bug ID: 41926 Summary: Zafehouse demo crashes with Call from 0x7b43c14c to unimplemented function ddraw.dll.GetSurfaceFromDC, aborting Product: Wine Version: 1.9.7 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs(a)winehq.org Reporter: xerox_xerox2000(a)yahoo.co.uk Distribution: --- Hi, This is a followup up of bug 41921 I tried the demo, but then with dotnet20 installed ( instead of using mono like in bug 41921) There appear to be several bugs, but after using native xaudio2_7, d3dcompiler_43 and d3dx9_43 a window comes up with music playing, but unfortunately itks black. This could however very well be due to my crappy GPU. Anyway, if you click in the middle-right (i guess there`s a button to start the game) the app crashes with Call from 0x7b43c14c to unimplemented function ddraw.dll.GetSurfaceFromDC, aborting I know this bugreport is a bit vague because you have to click somewhere in a black screen, but i asked on wine irc chat and they said it would be worth a bugreport anway. BTW apart from the game there`s a an executable called Zafediag installed. Make sure to uncheck both options this program offers, otherwise the bug won`t be triggered -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.zafehouse.com/tr | |y-the-demo/ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #1 from Austin English <austinenglish(a)gmail.com> --- Confirming, unimplemented. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #2 from Henri Verbeet <hverbeet(a)gmail.com> --- Is there a prototype for that entrypoint? We do implement the functionality, see ddraw7_GetSurfaceFromDC() and ddraw4_GetSurfaceFromDC(), but those are part of a COM interface. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #3 from Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> --- I overlooked that i had also set gdiplus to native. It looks like the call to unimplemented ddraw.dll.GetSurfaceFromDC comes from native gdiplus. Setting gdiplus to builtin does not trigger the bug. Is it worth to keep this bugreport open? Or does it make it invalid? Gr. Louis -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #4 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Louis Lenders from comment #3)
I overlooked that i had also set gdiplus to native. It looks like the call to unimplemented ddraw.dll.GetSurfaceFromDC comes from native gdiplus. Setting gdiplus to builtin does not trigger the bug. Is it worth to keep this bugreport open? Or does it make it invalid?
It's not in itself a valid bug report in that case, no. Still, if you happen to know or find out what the function's signature is supposed to be, it's likely to be easy enough to implement anyway. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Béla Gyebrószki <gyebro69(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69(a)gmail.com --- Comment #5 from Béla Gyebrószki <gyebro69(a)gmail.com> --- The black screen issue should be fixed by now, see bug #41993. I'm also getting the crash reported here when using native gdiplus (Zafehouse Diaries Steam version). Native gdiplus is needed because the game is stuck when starting a new game: fixme:gdiplus:GdipWindingModeOutline stub: 0x817c858, (nil), 0.25 fixme:gdiplus:GdipWindingModeOutline stub: 0x817c858, (nil), 0.25 fixme:gdiplus:GdipWindingModeOutline stub: 0x817c858, (nil), 0.25 ... Those lines are spamming the terminal endlessly with built-in gdiplus. FWIW, the crash started showing up somewhere between Wine 1.9.5 and 1.9.10. It doesn't crash in Wine 1.9.0, 1.9.5 for me (but I haven't had time for a regression test yet). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Béla Gyebrószki <gyebro69(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hverbeet(a)gmail.com Keywords| |regression Regression SHA1| |82a7f1ebf2979a3c6a4b6ca8fcc | |2679f2278f6e6 --- Comment #6 from Béla Gyebrószki <gyebro69(a)gmail.com> --- The patch that introduced the crash with native gdiplus should be commit 82a7f1ebf2979a3c6a4b6ca8fcc2679f2278f6e6 Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 14 19:32:46 2016 +0200 wined3d: Implement texture DC creation on top of D3DKMTCreateDCFromMemory(). The crash doesn't occur with the previous commit. The following components are needed to launch the game: .net2.0 xaudio2 d3dcompiler_43 d3dx9_43 ZafehouseDiariesDemoSetup.exe (31M) sha1: 0c15d5024c9a1e327ac7383fee48ad55a6fec35a Workaround: in the game configuration file (options.cfg) you need to change the option 'DrawableUsesGDIPlusImage' to 'True'. wine-2.0-rc2-35-gc28816c Fedora 25 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Henri Verbeet <hverbeet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|82a7f1ebf2979a3c6a4b6ca8fcc | |2679f2278f6e6 | Keywords|regression | --- Comment #7 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Béla Gyebrószki from comment #6)
The patch that introduced the crash with native gdiplus should be
commit 82a7f1ebf2979a3c6a4b6ca8fcc2679f2278f6e6 Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 14 19:32:46 2016 +0200
wined3d: Implement texture DC creation on top of D3DKMTCreateDCFromMemory().
The crash doesn't occur with the previous commit.
That's interesting, but doesn't justify the regression keyword. Native dlls were an unsupported configuration before that commit, still are after that commit, and part of the reason is precisely because native dlls can make calls to undocumented/internal APIs like this. Regardless, as mentioned in comment 4, if you can give me a prototype for the function I'll see what I can do. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #8 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- Not sure how accurate it is, but https://www.dxgl.info/svn/dxgl/ddraw/ddraw.cpp contains this info: /// Stub for function found in system ddraw.dll /// Function import is GetSurfaceFromDC DDRAW_API HRESULT WINAPI GlobalGetSurfaceFromDC(LPDIRECTDRAW7 lpDD, HDC hdc, LPDIRECTDRAWSURFACE7 *lpDDS) { TRACE_ENTER(3,14,lpDD,9,hdc,14,lpDDS); FIXME("GetSurfaceFromDC: Verify proper referencing for LPDIRECTDRAW7\n"); HRESULT ret = lpDD->GetSurfaceFromDC(hdc,lpDDS); TRACE_VAR("*lpDDS",14,*lpDDS); TRACE_EXIT(23,ret); return ret; } -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #9 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Dmitry Timoshkov from comment #8)
Not sure how accurate it is, but https://www.dxgl.info/svn/dxgl/ddraw/ddraw.cpp contains this info:
/// Stub for function found in system ddraw.dll /// Function import is GetSurfaceFromDC DDRAW_API HRESULT WINAPI GlobalGetSurfaceFromDC(LPDIRECTDRAW7 lpDD, HDC hdc, LPDIRECTDRAWSURFACE7 *lpDDS)
The number of arguments seems correct, but so far I haven't been able to make it return anything other than E_INVALIDARG. It's perhaps interesting to note that it doesn't crash either, even when passing it random/interesting pointers. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #10 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Henri Verbeet from comment #9)
The number of arguments seems correct, but so far I haven't been able to make it return anything other than E_INVALIDARG. It's perhaps interesting to note that it doesn't crash either, even when passing it random/interesting pointers.
Looks like it uses a SEH to protect from invalid input. Passing an HDC by reference makes it return DDERR_NOTFOUND instead of E_INVALIDARG for me, that seems like a progress :) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #11 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Dmitry Timoshkov from comment #10)
Looks like it uses a SEH to protect from invalid input.
Passing an HDC by reference makes it return DDERR_NOTFOUND instead of E_INVALIDARG for me, that seems like a progress :)
Exchanging first 2 params and passing HDC by value make it work. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #12 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Dmitry Timoshkov from comment #11)
Looks like it uses a SEH to protect from invalid input.
Passing an HDC by reference makes it return DDERR_NOTFOUND instead of E_INVALIDARG for me, that seems like a progress :)
Exchanging first 2 params and passing HDC by value make it work.
The API returns an HDC (GetObjectType() returns 3 == OBJ_DC) in the provided storage, not an iface pointer though. Also, as as side effect the API call invalidates the passed in dd7 interface, so all further calls to it crash here. Not sure how to interpret the results. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #13 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Dmitry Timoshkov from comment #12)
(In reply to Dmitry Timoshkov from comment #11)
Exchanging first 2 params and passing HDC by value make it work.
The API returns an HDC (GetObjectType() returns 3 == OBJ_DC) in the provided storage, not an iface pointer though. Also, as as side effect the API call invalidates the passed in dd7 interface, so all further calls to it crash here.
Not sure how to interpret the results.
It looks like it's supposed to be something like this: HRESULT WINAPI GetSurfaceFromDC(HDC dc, IDirectDrawSurface **surface, HDC *device_dc); I suspect the last parameter is the DC for the display device corresponding to the ddraw object that created the surface, but didn't completely verify that. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #14 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Henri Verbeet from comment #13)
Exchanging first 2 params and passing HDC by value make it work.
The API returns an HDC (GetObjectType() returns 3 == OBJ_DC) in the provided storage, not an iface pointer though. Also, as as side effect the API call invalidates the passed in dd7 interface, so all further calls to it crash here.
Not sure how to interpret the results.
It looks like it's supposed to be something like this:
HRESULT WINAPI GetSurfaceFromDC(HDC dc, IDirectDrawSurface **surface, HDC *device_dc);
Confirming, changing the 2nd parameter to a pointer to an interface fixes all the crashes here, and the returned values look pretty sane. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 --- Comment #15 from Henri Verbeet <hverbeet(a)gmail.com> --- How does this work with current Wine? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #16 from Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> --- (In reply to Henri Verbeet from comment #15)
How does this work with current Wine?
Just tested (with gdiplus set to native) and looks like this is fixed in current git. I saw your patch went in already friday. i changed the trace into fixme to check the function got really called: fixme:ole:Context_CC_ContextCallback (0x9e6ec20/0x9e6ec24)->(0x7a0bf71d, 0x2cbe3e0, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil)) fixme:ole:Context_CC_ContextCallback (0x9e6ec20/0x9e6ec24)->(0x7a0bf71d, 0x2cbe3e0, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil)) fixme:ddraw:GetSurfaceFromDC dc 0x23d00ac, surface 0x33e864, device_dc 0x33e850. fixme:ddraw:GetSurfaceFromDC dc 0x4900d9, surface 0x33e864, device_dc 0x33e850. fixme:ddraw:GetSurfaceFromDC dc 0x3a00cd, surface 0x33e864, device_dc 0x33e850. fixme:ddraw:GetSurfaceFromDC dc 0xcc0054, surface 0x33e864, device_dc 0x33e850. fixme:ddraw:GetSurfaceFromDC dc 0x4d00d9, surface 0x33e864, device_dc 0x33e850. fixme:ole:CoGetApartmentType (0x33fc6c, 0x33fc68): semi-stub fixme:ole:CoGetApartmentType (0x7f0d5fc, 0x7f0d5f8): semi-stub This happens after clicking ``Options`` or ``Credits`` and all these windows appear to look/function fine. Thanks for fixing -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ebcf5196fc150b6ed4bf4891d3f | |5b0ebe08d625c --- Comment #17 from Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> --- fixed -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #18 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 2.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41926 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |--- --- Comment #19 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 2.0.x milestone from bugs included in 2.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org