https://bugs.winehq.org/show_bug.cgi?id=39667
Bug ID: 39667 Summary: dinput: MotoGP 3 demo launcher crashes on leaving key configuration dialog. Product: Wine Version: 1.8-rc1 Hardware: x86 URL: https://appdb.winehq.org/objectManager.php?sClass=vers ion&iId=6934 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput Assignee: wine-bugs@winehq.org Reporter: bernhardu@vr-web.de Distribution: ---
Created attachment 52886 --> https://bugs.winehq.org/attachment.cgi?id=52886 motogp3-demo-launcher-crash.txt with wine-1.8-rc1
Probably same issue as in https://bugs.winehq.org/show_bug.cgi?id=12432 . (Attached backtrace seems equal.)
Steps to reproduce: - start launcher - "Configure Controller" - leave dialog with "Cancel" - crash
MotoGP 3 demo launcher uses ConfigureDevices for the key mapping. This seems because the result of a GetProperty(DIPROP_USERNAME) is used without checking.
https://bugs.winehq.org/show_bug.cgi?id=39667
--- Comment #1 from Bernhard Übelacker bernhardu@vr-web.de --- Created attachment 52887 --> https://bugs.winehq.org/attachment.cgi?id=52887 dinput: Implement device property DIPROP_USERNAME.
https://bugs.winehq.org/show_bug.cgi?id=39667
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #2 from Vijay Kamuju infyquest@gmail.com --- Also send this to wine-patches@winehq.org for review and inclusion
https://bugs.winehq.org/show_bug.cgi?id=39667
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED CC| |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Ever confirmed|0 |1 Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/dinput-DIPROP_ | |USERNAME
https://bugs.winehq.org/show_bug.cgi?id=39667
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=39667
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
--- Comment #3 from Andrew Eikum aeikum@codeweavers.com --- Looking at the patch wine wine-staging:87f68ad2f. Some feedback:
- static const WCHAR emptyW[] = { 0 };
This seems unnecessary. Just assign \0 to dps.wsz[0] or do the strcpy.
ps->wsz[0] = 0;
if (This->username)
lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));
Similar here, no need to assign if This->username is non-NULL.
This->username[0] = 0;
if (ps->wsz)
lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));
And here.
- WCHAR *username; /* set by 'SetActionMap' */
I'm OK with this as it is, but I would rather allocate the char array as part of the IDirectInputDeviceImpl struct instead of allocating and freeing it separately.
ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
These should be "hr == S_OK" or similar.
https://bugs.winehq.org/show_bug.cgi?id=39667
--- Comment #4 from Bernhard Übelacker bernhardu@vr-web.de --- New iteration sent to wine-patches: https://www.winehq.org/pipermail/wine-patches/2016-March/148567.html
https://bugs.winehq.org/show_bug.cgi?id=39667
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #5 from super_man@post.com --- I dont know why but I have an issue to reproduce the crash. Patch reverted I get 3 lines similar to this and no crash.
fixme:dinput:IDirectInputDevice2WImpl_GetProperty Unknown property <guid-0x0019>
Patch commit id fbc85ddc28a3ad6002cd415552684bd8c5b27bf2
https://bugs.winehq.org/show_bug.cgi?id=39667
--- Comment #6 from Bernhard Übelacker bernhardu@vr-web.de --- (In reply to super_man from comment #5)
By any chance you tested motogp_demo.exe instead of launcher.exe or didn't went into Controller configuration?
# I tested current head $ git describe --always --tag wine-1.9.6-307-gf820c09
#removed the commit in question and built git show fbc85ddc28a3ad6002cd415552684bd8c5b27bf2 | git apply --reverse
#installed the demo and cd into "drive_c/Program Files/THQ/MotoGP URT 3 Demo"
wine launcher.exe
* "Configure Controllers" * Cancel / Abbrechen --> crash
$ wine launcher.exe fixme:win:EnumDisplayDevicesW ((null),0,0x14be4d8,0x00000000), stub! fixme:dinput:IDirectInput8AImpl_ConfigureDevices (this=0x144228,(nil),0x14bde48,0001,(nil)): stub fixme:dinput:IDirectInput8WImpl_ConfigureDevices (this=0x144228,(nil),0x14bdb74,0001,(nil)): stub fixme:dinput:IDirectInput8WImpl_EnumDevicesBySemantics (this=0x144228,(null),0x14bdbb4,0x7dd27a10,0x14bda94,0000): semi-stub fixme:dinput:IDirectInput8WImpl_EnumDevicesBySemantics (this=0x144228,(null),0x14bdbb4,0x7dd27a30,0x14bda94,0000): semi-stub fixme:dinput:IDirectInputDevice2WImpl_GetProperty Unknown property <guid-0x0019> fixme:dinput:SysMouseWImpl_BuildActionMap (0x1b63bc)->(0x14bdde4,L"0%\00dd\00c4\201d\00c4`%0%\00c8K\2039\00c4\0002",00000000): semi-stub ! fixme:dinput:IDirectInputDevice8WImpl_BuildActionMap (0x1b63bc)->(0x14bdde4,L"0%\00dd\00c4\201d\00c4`%0%\00c8K\2039\00c4\0002",00000000): semi-stub ! fixme:dinput:SysMouseWImpl_SetActionMap (0x1b63bc)->(0x14bdde4,L"PLAYER 0",00000000): semi-stub ! wine: Unhandled page fault on write access to 0x04455355 at address 0x4094d7 (thread 0009), starting debugger... Unhandled exception: page fault on write access to 0x04455355 in 32-bit code (0x004094d7). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:004094d7 ESP:014be070 EBP:0025225c EFLAGS:00010217( R- -- I -A-P-C) EAX:0025224c EBX:00000000 ECX:04455355 EDX:ffffffef ESI:001b63b8 EDI:011154c3 Stack dump: 0x014be070: 00251e20 0025225c 002522ac 00000000 0x014be080: 001b63b8 00251e20 0000000f c4dd2530 0x014be090: 2560c494 4bc82530 0002c48b 00000000 0x014be0a0: 00000000 00000000 00000000 00000000 0x014be0b0: 00000000 00000000 00000000 00000000 0x014be0c0: 00000000 00000000 00000000 00000000 Backtrace: =>0 0x004094d7 in launcher (+0x94d7) (0x0025225c) 1 0x00000000 (0x00250118) ...
https://bugs.winehq.org/show_bug.cgi?id=39667
--- Comment #7 from super_man@post.com --- [master 7ec736d] Revert "dinput: Implement device property DIPROP_USERNAME." 3 files changed, 2 insertions(+), 57 deletions(-)
and then make and installed the demo and went into directory and launched the launcher, configure controller and then cancel (traslated into my native language).
I just retested this. I just cant get it crash.
I don't know if it matters much.
https://bugs.winehq.org/show_bug.cgi?id=39667
--- Comment #8 from Bernhard Übelacker bernhardu@vr-web.de --- At least there was another bug in comment 0 that suffered from this crash (or very similar at least) and seemed also not reproducable by everyone.
As I opened the ticket I think it is ok to close it now, as the crash happens not for me anymore, and the patch is now committed in: http://source.winehq.org/git/wine.git/commit/fbc85ddc28a3ad6002cd415552684bd...
https://bugs.winehq.org/show_bug.cgi?id=39667
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED CC| |leslie_alistair@hotmail.com Fixed by SHA1| |fbc85ddc28a3ad6002cd4155526 | |84bd8c5b27bf2 Resolution|--- |FIXED
--- Comment #9 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Marking as fixed.
https://bugs.winehq.org/show_bug.cgi?id=39667
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.7.
https://bugs.winehq.org/show_bug.cgi?id=39667
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=39667
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #11 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.3.