http://bugs.winehq.org/show_bug.cgi?id=35371
Bug ID: 35371 Summary: Battlefield 2: Wine crashes on mic setup Product: Wine Version: 1.7.10 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: crazy.just@verizon.net Classification: Unclassified
Created attachment 47174 --> http://bugs.winehq.org/attachment.cgi?id=47174 Program Error Details
Battlefield 2: Wine crashes on mic setup.
http://bugs.winehq.org/show_bug.cgi?id=35371
Ed Houseman jr. crazy.just@verizon.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |crazy.just@verizon.net
http://bugs.winehq.org/show_bug.cgi?id=35371
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Component|-unknown |winmm&mci Summary|Battlefield 2: Wine crashes |Battlefield 2 voice setup |on mic setup |tool crashes when "Save | |Settings" button is clicked | |(winmm.mixerGetDevCaps | |should also accept mixer | |device handles) Ever confirmed|0 |1
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
This reminded me of bug 16544 which I analyzed years ago (same backtrace). It's not the same thing though, the backtrace is just a manifestation of earlier problems.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/EA GAMES/Battlefield 2
$ WINEDEBUG=+tid,+seh,+relay,+winmm wine ./BF2VoiceSetup.exe >>log.txt 2>&1 ... 0024:Call winmm.mixerGetDevCapsA(00000000,0033f42c,00000030) ret=00408295 0024:trace:winmm:mixerGetDevCapsA (0, 0x33f42c, 48) 0024:trace:winmm:mixerGetDevCapsW (0, 0x33f354, 80) ... 0024:Ret winmm.mixerGetDevCapsA() retval=00000000 ret=00408295 0024:Call winmm.mixerOpen(00425f0c,00000000,00000000,00000000,00010000) ret=004082ac 0024:trace:winmm:mixerOpen (0x425f0c, 0, 0, 0, 10000) 0024:Ret winmm.mixerOpen() retval=00000000 ret=004082ac 0024:Call winmm.mixerGetDevCapsA(0000c000,0033f290,00000030) ret=00408021 0024:trace:winmm:mixerGetDevCapsA (49152, 0x33f290, 48) 0024:trace:winmm:mixerGetDevCapsW (49152, 0x33f1b4, 80) 0024:Ret winmm.mixerGetDevCapsA() retval=00000002 ret=00408021 ... 0024:Call msvcrt._wfsopen(0033dac0 L"C:\users\focht\My Documents\Battlefield 2\Profiles\BattleCommoDefaultUserSettings.con",7e468984 L"w",00000040) ret=7e40e7a6 0024:Call KERNEL32.CreateFileW(0033dac0 L"C:\users\focht\My Documents\Battlefield 2\Profiles\BattleCommoDefaultUserSettings.con",40000000,00000003,0033d870,00000002,00000080,00000000) ret=7e33d409 0024:Ret KERNEL32.CreateFileW() retval=000000b4 ret=7e33d409 0024:Ret msvcrt._wfsopen() retval=7e3ae440 ret=7e40e7a6 ... 0024:Ret msvcp71.?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z() retval=0033dd80 ret=00403918 0024:trace:seh:raise_exception code=c0000005 flags=0 addr=0x408661 ip=00408661 tid=0024 0024:trace:seh:raise_exception info[0]=00000000 0024:trace:seh:raise_exception info[1]=0000002c 0024:trace:seh:raise_exception eax=00000000 ebx=00000111 ecx=00000000 edx=00000002 esi=0033dc84 edi=0033dd68 0024:trace:seh:raise_exception ebp=0033dd68 esp=0033dc84 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 0024:trace:seh:call_stack_handlers calling handler at 0x41d00c code=c0000005 flags=0 --- snip ---
The problem is the failing winmm.mixerGetDevCapsA() call, returning MMSYSERR_BADDEVICEID. The mixer id is the handle returned by earlier mixerOpen() call.
MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757300%28v=vs.85%2...
--- quote --- ... This function also accepts a mixer device handle returned by the mixerOpen function as the uMxId parameter. The application should cast the HMIXER handle to a UINT. --- quote ---
Apparently Wine doesn't do this:
Source: http://source.winehq.org/git/wine.git/blob/06c95af45726674847d12440d904568f5...
--- snip --- 3724 UINT WINAPI mixerGetDevCapsW(UINT_PTR uDeviceID, LPMIXERCAPSW lpCaps, UINT uSize) 3725 { 3726 WINMM_MMDevice *mmdevice; 3727 MIXERCAPSW caps; 3728 HRESULT hr; 3729 3730 TRACE("(%lu, %p, %u)\n", uDeviceID, lpCaps, uSize); 3731 3732 hr = WINMM_InitMMDevices(); 3733 if(FAILED(hr)) 3734 return MMSYSERR_NODRIVER; 3735 3736 if(!lpCaps) 3737 return MMSYSERR_INVALPARAM; 3738 3739 if(!uSize) 3740 return MMSYSERR_NOERROR; 3741 3742 if(uDeviceID >= g_outmmdevices_count + g_inmmdevices_count) 3743 return MMSYSERR_BADDEVICEID; ... --- snip ---
Additionally a small diagnostic trace in mixerOpen(), printing the actual returned handle value (out param) would be helpful.
Regards
http://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #2 from Ed Houseman jr. crazy.just@verizon.net --- Thank you for confirming my problem. I could not move the mic bar by speaking into the mike before clicking the save settings button either. I can record outside of wine, so I'm sure it's related. I would be happy to provide additional information (If pointed in the right direction), but I am inexperienced working with wine or linux.
http://bugs.winehq.org/show_bug.cgi?id=35371
Robert Walker bob.mt.wya@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bob.mt.wya@gmail.com
--- Comment #3 from Robert Walker bob.mt.wya@gmail.com --- Created attachment 47974 --> http://bugs.winehq.org/attachment.cgi?id=47974 BF2 Demo Voice Setup trimmed console log
@Anastasius,
I've attached the results of running:
wine BF2VoiceSetup.exe >demo_log.txt 2>&1 grep -C 10 winmm:mixer demo_log.txt > demo_audiosetup.txt
The BF2VoiceSetup.exe utility bundled with the demo version of Battlefield 2.
The utility does not detect any sound from my headsets microphone. It does not crash. It does produce a tiny square popup window (empty error message?) when exiting.
Bob
http://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #4 from Robert Walker bob.mt.wya@gmail.com --- Created attachment 47975 --> http://bugs.winehq.org/attachment.cgi?id=47975 BF2 Demo ingame VOIP Setup heavily trimmed log
Also interestingly the ingame VOIP setup utility works (for me) in the Demo version and correctly loops back my microphone input to the headphones.
I can't realistically run a full trace (even after deleting all the intro videos the game is extremely slow to even start)...
export WINEDEBUG=+tid,+seh,+winmm wine BF2.exe +menu 1 +fullscreen 1 +szx 1366 +szy 768 >demo_log.txt 2>&1 grep -C 10 winmm:mixer demo_log.txt > demo_audiosetup_ingame.txt
Please suggest if there is any other logs I can provide!!
Bob
https://bugs.winehq.org/show_bug.cgi?id=35371
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #5 from super_man@post.com --- still crashing 1.7.49
https://bugs.winehq.org/show_bug.cgi?id=35371
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #6 from super_man@post.com --- http://www.4players.de/4players.php/download_info/Downloads/Download/44463/B...
still valid issue
1.7.55
https://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #7 from Andrew Eikum aeikum@codeweavers.com --- The problem in comment 1 has been fixed for some time, but the crash still happens.
https://bugs.winehq.org/show_bug.cgi?id=35371
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.4players.de/4pla | |yers.php/download_info/Down | |loads/Download/44463/Battle | |field_2/Demo__1.html
https://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #8 from super_man@post.com --- (In reply to Andrew Eikum from comment #7)
The problem in comment 1 has been fixed for some time, but the crash still happens.
Still getting crash.
wine-1.9.12-121-g41d0187
https://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #9 from Robert Walker bob.mt.wya@gmail.com --- Still present in Wine: wine-2.15 (Staging)
https://bugs.winehq.org/show_bug.cgi?id=35371
--- Comment #10 from Robert Walker bob.mt.wya@gmail.com --- Still present in Wine: wine-3.21 (Staging)