http://bugs.winehq.org/show_bug.cgi?id=24192
Summary: Star Trek: Legacy exits when trying to play sound effect Product: Wine Version: 1.3.1 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: companheiro.vermelho@gmail.com
Created an attachment (id=30454) --> (http://bugs.winehq.org/attachment.cgi?id=30454) full log of WINDEBUG=+file wine Legacy.exe
The game Star Trek: Legacy installs and run well until it tries to play a voice over in one of the missions. The sound in the menu and the introduction works fine and even some sound effects and music. But when it tries to play this voice over, a exception occurs. After some debugging, I discovered that it seems like the game tries to open a file and doesn't test if it was successful, leading to a page fault in case of failure when it tries to read it. The strange thing is that there seems to be no reason why the file can't be accessed. The path is right and the permissions are good. I can even play the sound using aplay.
The relevant part of the log with WINEDEBUG=+file is this (I know I shouldn't paste logs in here, but is just a few lines to explain the bug...):
trace:file:SearchPathW found L"C:\Arquivos de programas\Bethesda Softworks\Star Trek Legacy\sounds\voiceover\captains\Federation\f_cap03_Fleet_att_enterprise.wav" trace:file:OpenFile found "\x02" trace:file:_lopen ("\x02",0000) trace:file:CreateFileW L"\0002" GENERIC_READ FILE_SHARE_READ FILE_SHARE_WRITE creation 3 attributes 0x80 trace:file:RtlDosPathNameToNtPathName_U (L"\0002",0x934e274,(nil),(nil)) trace:file:RtlGetFullPathName_U (L"\0002" 520 0x934dfb8 (nil)) warn:file:CreateFileW Unable to create file L"\0002" (status c0000033) trace:file:CreateFileW returning 0xffffffff warn:file:OpenFile (sounds\voiceover\captains\Federation\f_cap03_Fleet_att_enterprise.wav): return = HFILE_ERROR error= 123 wine: Unhandled page fault on read access to 0x00000004 at address 0x45688a (thread 0024), starting debugger...
According to MSDN, error 123 is ERROR_INVALID_NAME Attached is the full log of WINDEBUG=+file wine Legacy.exe
If you need any other information, let me know.
http://bugs.winehq.org/show_bug.cgi?id=24192
--- Comment #1 from Vincent Povirk madewokherd@gmail.com 2010-09-16 16:52:38 CDT --- According to http://msdn.microsoft.com/en-us/library/aa365430%28VS.85%29.aspx, "you cannot use the OpenFile function to open a file with a path length that exceeds 128 characters."
That particular path is 130 characters long. SearchPath fails, but OpenFile (incorrectly) continues anyway and tries to use uninitialized memory, causing ERROR_INVALID_NAME. OpenFile should (apparently) fail, but with a different error code.
This needs a testcase.
Maybe you can work around this by choosing a different, shorter path for the install.
http://bugs.winehq.org/show_bug.cgi?id=24192
--- Comment #2 from Eduardo companheiro.vermelho@gmail.com 2010-09-17 02:47:53 CDT --- (In reply to comment #1)
According to http://msdn.microsoft.com/en-us/library/aa365430%28VS.85%29.aspx, "you cannot use the OpenFile function to open a file with a path length that exceeds 128 characters."
That particular path is 130 characters long. SearchPath fails, but OpenFile (incorrectly) continues anyway and tries to use uninitialized memory, causing ERROR_INVALID_NAME. OpenFile should (apparently) fail, but with a different error code.
This needs a testcase.
Maybe you can work around this by choosing a different, shorter path for the install.
You are absolutely right! Installing in a shorter path solved the problem. I will try to reproduce this on Windows to discover which errorcode OpenFile should use. Still, thank you very much. Great work!
http://bugs.winehq.org/show_bug.cgi?id=24192
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |adys.wh@gmail.com Ever Confirmed|0 |1
--- Comment #3 from Jerome Leclanche adys.wh@gmail.com 2012-01-13 12:39:36 CST --- Im guessing this is still an issue in wine-1.3.36? Vincent, was a test ever written/sent for this?
https://bugs.winehq.org/show_bug.cgi?id=24192
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |ABANDONED
--- Comment #4 from Austin English austinenglish@gmail.com --- No reply in 2 years, marking abandoned.
If this is still an issue in current (1.7.16 or newer) wine and you can provide the needed information, feel free to reopen.
https://bugs.winehq.org/show_bug.cgi?id=24192
austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from austinenglish@gmail.com --- Closing.