http://bugs.winehq.org/show_bug.cgi?id=33125
Bug #: 33125 Summary: Tomb Raider (2013) distortions during loading Product: Wine Version: 1.5.25 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: andrey.goosev@gmail.com CC: andrey.goosev@gmail.com Classification: Unclassified
Created attachment 43810 --> http://bugs.winehq.org/attachment.cgi?id=43810 log
Launched on Nvidia GT 540M with 310.32 drivers.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #1 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 04:02:21 CST --- Created attachment 43811 --> http://bugs.winehq.org/attachment.cgi?id=43811 screen
screen 1
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #2 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 04:02:56 CST --- Created attachment 43812 --> http://bugs.winehq.org/attachment.cgi?id=43812 screen
screen 2
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #3 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 04:03:17 CST --- Created attachment 43813 --> http://bugs.winehq.org/attachment.cgi?id=43813 screen
screen 3
http://bugs.winehq.org/show_bug.cgi?id=33125
jiveaxe jiveaxe@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jiveaxe@gmail.com
--- Comment #4 from jiveaxe jiveaxe@gmail.com 2013-03-05 07:53:24 CST --- I confirm it on Chakra 64bit, kernel 3.7.6, nvidia 313.18, GTX-560Ti, kde 4.10, wine 1.5.24
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #5 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 08:05:33 CST --- (In reply to comment #4)
I confirm it on Chakra 64bit, kernel 3.7.6, nvidia 313.18, GTX-560Ti, kde 4.10, wine 1.5.24
Seems it's not a drivers. Can you create ingame profile or it just loading before this step and than nothing?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #6 from jiveaxe jiveaxe@gmail.com 2013-03-05 08:25:32 CST --- Some advancement: enabling "StrictDrawOrdering" in registry reduces flickering but after loading, perhaps just before menu loading, game freezes.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #7 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 08:45:22 CST --- (In reply to comment #6)
Some advancement: enabling "StrictDrawOrdering" in registry reduces flickering but after loading, perhaps just before menu loading, game freezes.
Yes, enabling function gives more better result. Thanks. But still can't create a profile.
http://bugs.winehq.org/show_bug.cgi?id=33125
Anthony Mattheakakis antony256@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |antony256@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #8 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 14:01:32 CST --- Think with distortion/flickering is solved. Second side of the problem is freezing game before creating a profile (or maybe entering). Need a new report?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #9 from jiveaxe jiveaxe@gmail.com 2013-03-05 15:36:14 CST --- I dunno if the flickering trick is fine; initially, when flickering, I was able to read some text like game tips, bottom right; "StrictDrawOrdering" eliminated flickering and texts. Anyone noticed this?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #10 from Andrey Gusev andrey.goosev@gmail.com 2013-03-05 16:00:39 CST --- (In reply to comment #9)
I dunno if the flickering trick is fine; initially, when flickering, I was able to read some text like game tips, bottom right; "StrictDrawOrdering" eliminated flickering and texts. Anyone noticed this?
Look this video: youtube.com/watch?v= 0DMf9r6uz74 (just an example) When I set "StrictDrawOrdering" flickering (like on the screens on the top) is gone. Same trick is discribed for Deus Ex: Human Revolution. Look before 00:26 - after "profile" text game is freezes and it's a main clue.
http://bugs.winehq.org/show_bug.cgi?id=33125
sacrediou sacrediou@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sacrediou@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=33125
Jack Peirce jpeirce@sourcecode.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jpeirce@sourcecode.com
http://bugs.winehq.org/show_bug.cgi?id=33125
Felix Hellmann privat@cirk2.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |privat@cirk2.de
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #11 from jiveaxe jiveaxe@gmail.com 2013-03-06 03:25:21 CST --- (In reply to comment #10)
Look this video: youtube.com/watch?v= 0DMf9r6uz74 (just an example) When I set "StrictDrawOrdering" flickering (like on the screens on the top) is gone. Same trick is discribed for Deus Ex: Human Revolution. Look before 00:26 - after "profile" text game is freezes and it's a main clue.
So, also windows version shows glitches on loading... funny.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #12 from Andrey Gusev andrey.goosev@gmail.com 2013-03-06 03:56:01 CST --- (In reply to comment #11)
(In reply to comment #10) So, also windows version shows glitches on loading... funny.
Perhaps it's a developers concept. )
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #13 from Andrey Gusev andrey.goosev@gmail.com 2013-03-06 04:25:08 CST --- Solution for starting is downgrade Wine version. Thanks to youtube.com/watch? v=syvn-k2oxY0 and youtube.com/watch? v=-HBO5IVOg40
What's wrong with the latest 1.5.23-25 ?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #14 from jiveaxe jiveaxe@gmail.com 2013-03-06 04:45:39 CST --- (In reply to comment #13)
Solution for starting is downgrade Wine version.
Great catch. Thanks you. Have installed TR in playonlinux, selected wine 1.5.9-raw3 (instead of system) and TR finally works.
http://bugs.winehq.org/show_bug.cgi?id=33125
Andras Kovacs andras@sth.sze.hu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andras@sth.sze.hu
--- Comment #15 from Andras Kovacs andras@sth.sze.hu 2013-03-06 06:29:50 CST --- With the latest wine (1.5.25) on Ubuntu 12.10 32 bit with GeForce 8500GT (driver 310.14) I have no problem at all, it runs slow (but I think this is OK because of old graphics card)
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #16 from Andras Kovacs andras@sth.sze.hu 2013-03-06 06:37:14 CST --- Created attachment 43832 --> http://bugs.winehq.org/attachment.cgi?id=43832 screen (GeForce 8500GT)
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #17 from Andrey Gusev andrey.goosev@gmail.com 2013-03-06 11:09:02 CST --- (In reply to comment #15)
With the latest wine (1.5.25) on Ubuntu 12.10 32 bit with GeForce 8500GT (driver 310.14) I have no problem at all, it runs slow (but I think this is OK because of old graphics card)
I'm using 12.10 (32-bit) too with kernel 3.5.0-25 Very strange why some players can runs without issues while other players haven't.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #18 from Felix Hellmann privat@cirk2.de 2013-03-06 17:09:51 CST --- I can confirm that StrictDrawOrdering fixes the graphical distortions with a wine version 1.5.17. On a actual git build (as of 07.03) the distortions are not fixed with StrictDrawOrdering and the game crashes after the loading screen. Strangely with a build from 06.03 the game didn't crash, but the distortions also where not fixed with StrictDrawOrdering (There I could observe that the same distortions also occur ingame).
So this bug is at least partly regression!
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #19 from Felix Hellmann privat@cirk2.de 2013-03-06 17:14:37 CST --- (In reply to comment #18)
Oh I missed the date change at midnight, the crashing build is from 06.03 and the non crashing one from 05.03
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #20 from Bruno Jesus 00cpxxx@gmail.com 2013-03-06 17:18:24 CST --- You could run a regression test to find the commit that caused the problem: http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=33125
papon.jonathan@laposte.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |papon.jonathan@laposte.net
--- Comment #21 from papon.jonathan@laposte.net 2013-03-06 18:09:24 CST --- It seem this bug first appeard in 1.5.13. The 1.5.12 doesn't suffer the crash at launch, nor the distortions bug (with or without StrictDrawOrdering registry fix) I am currently trying to do a regression test, but I am running through compilation issues.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #22 from Felix Hellmann privat@cirk2.de 2013-03-06 19:27:58 CST --- Ok I found the guilty one:
4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a is the first bad commit commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a Author: Alexandre Julliard julliard@winehq.org Date: Sat Dec 15 16:49:47 2012 +0100
include: Force stack alignment also on Linux to work around the ABI breakage.
:040000 040000 77ef795291e351dff842cfa08a77c48ee9a4c5c7 e29359eaeee7b50d6aec06ff4a4b55e280c8fe0e M include
I already tested it by reverting the commit on the current head with git show 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a | patch -p1 -R
Also disregard my comment regarding the distortions persisting after enabling StrictDrawOrder, this was caused by the glBufferSubDataARB patch (http://bugs.winehq.org/show_bug.cgi?id=11674#c263). I've done the Regression test without any patches.
http://bugs.winehq.org/show_bug.cgi?id=33125
Andras Kovacs andras@sth.sze.hu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #23 from Andrey Gusev andrey.goosev@gmail.com 2013-03-07 02:43:53 CST --- What paths for fix in the next release, cut commit or refine it?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #24 from Nikolay Sivov bunglehead@gmail.com 2013-03-07 02:54:13 CST --- Does it have something to do with d3d11 used by this game? You could try to disable is in winecfg.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #25 from Andrey Gusev andrey.goosev@gmail.com 2013-03-07 03:21:06 CST --- (In reply to comment #24)
Does it have something to do with d3d11 used by this game? You could try to disable is in winecfg.
For me it's:
fixme:d3d11:D3D11CreateDevice stub: adapter (nil), driver_type D3D_DRIVER_TYPE_HARDWARE, swrast (nil), flags 0, feature_levels 3341084, levels 0x2, sdk_version 7, device 0x32fb14, feature_level 0x32fb18, context 0x32fb10
but force disabling is not necessarily.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #26 from Felix Hellmann privat@cirk2.de 2013-03-07 06:09:52 CST --- (In reply to comment #24)
Does it have something to do with d3d11 used by this game? You could try to disable is in winecfg.
Disabling d3d11 does not change the outcome.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #27 from Felix Hellmann privat@cirk2.de 2013-03-07 08:10:00 CST --- (In reply to comment #23)
What paths for fix in the next release, cut commit or refine it?
I can't really grasp the ramification in this commit. Aparently gcc version 4.2 added some function to align function entry points to allow old applications to use these entry points.
On the other hand this commit had only been introduced in December 2012, maybe it was a bugfix? Alexandre Julliard should be able to help us with that.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #28 from Andrey Gusev andrey.goosev@gmail.com 2013-03-07 08:23:44 CST --- (In reply to comment #27) Felix, yes Julliard might be help with it, but how be with Andras comment #15 ? A strange situation indeed.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #29 from Felix Hellmann privat@cirk2.de 2013-03-07 09:14:35 CST --- (In reply to comment #15)
With the latest wine (1.5.25) on Ubuntu 12.10 32 bit with GeForce 8500GT (driver 310.14) I have no problem at all, it runs slow (but I think this is OK because of old graphics card)
can you try to upgrade to Nvidia version 310.32 or higher? Maybe the regression only kicks in on those newer Driver version?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #30 from Andrey Gusev andrey.goosev@gmail.com 2013-03-07 09:29:49 CST --- Felix, I don't think the problem in driver, because of launching on Intel HD 3000 (IGP) give the same result.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #31 from Felix Hellmann privat@cirk2.de 2013-03-07 10:00:25 CST --- (In reply to comment #30)
Felix, I don't think the problem in driver, because of launching on Intel HD 3000 (IGP) give the same result.
Ok only saw that he was the only one with a Nvidia driver before yours.
Do both of you use the Wine Packages? if not do you have the same gcc version? I must admit it is only guessed, but since the commit only changed a compile option i think this is the direction to guess toward.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #32 from Andrey Gusev andrey.goosev@gmail.com 2013-03-07 10:25:20 CST --- (In reply to comment #31)
Ok only saw that he was the only one with a Nvidia driver before yours.
Do both of you use the Wine Packages? if not do you have the same gcc version? I must admit it is only guessed, but since the commit only changed a compile option i think this is the direction to guess toward.
I'm using Ubuntu package from Wine PPA, so I'm didn't compile source by myself or change it somehow.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #33 from Andrey Gusev andrey.goosev@gmail.com 2013-03-08 08:32:40 CST --- 1.5.19 is the latest version with which game is working. It can be dependent to commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a
http://bugs.winehq.org/show_bug.cgi?id=33125
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Tomb Raider (2013) |Tomb Raider (2013) screen |distortions during loading |distortions and game | |freezes
http://bugs.winehq.org/show_bug.cgi?id=33125
thanoulas thanoulas@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thanoulas@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #34 from thanoulas thanoulas@gmail.com 2013-03-09 06:18:17 CST --- On a Mac here, OS X 10.8.2, trying with different wine versions, all behave the same. I tried the following: 1.5.9, 1.5.11, 1.5.12, 1.5.13, 1.5.19, 1.5.25, and latest from git.
Game launching on all, screen is all glitched, but I can see Loading and then goes black when loading is done. Not quitting, or crashing. StrictDrawOrdering enabled, 1.5.9 never even goes in game, all the rest look fine without glitches, then I see profile and then just the background and the game stops.
I am now building the latest got without commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a, I'll let you know how it goes.
So, have you managed to start the game with older versions, or not?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #35 from thanoulas thanoulas@gmail.com 2013-03-09 06:31:00 CST --- So, reverting commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a does absolutely no difference to me.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #36 from Andrey Gusev andrey.goosev@gmail.com 2013-03-09 07:31:10 CST --- (In reply to comment #35)
So, reverting commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a does absolutely no difference to me.
I can't to affirm on 100% that problem in this commit, but last working version (perhaps for me) is 1.5.19. Next version and all after has this commit and not working. At the end it can be a dependency tree.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #37 from Felix Hellmann privat@cirk2.de 2013-03-09 07:51:00 CST --- (In reply to comment #35)
So, reverting commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a does absolutely no difference to me.
The commit had no effect on OSX. It only affects systems witch GCC >= 4.2 that are not OSX. (Have a look in the diff (git show 4adfb...) of the commit its pretty self explanatory, even if you don't know C).
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #38 from thanoulas thanoulas@gmail.com 2013-03-09 08:28:53 CST --- (In reply to comment #37)
(In reply to comment #35)
So, reverting commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a does absolutely no difference to me.
The commit had no effect on OSX. It only affects systems witch GCC >= 4.2 that are not OSX. (Have a look in the diff (git show 4adfb...) of the commit its pretty self explanatory, even if you don't know C).
I do know C, but I didn't read the code in the commit. Now that I did I can understand why I see no difference. So what exactly does reversing this commit fix in Linux? Does this fix the glitches, the freezing, or both?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #39 from Felix Hellmann privat@cirk2.de 2013-03-09 08:33:32 CST --- (In reply to comment #38)
I do know C, but I didn't read the code in the commit. Now that I did I can understand why I see no difference. So what exactly does reversing this commit fix in Linux? Does this fix the glitches, the freezing, or both?
The freezing, the glitches are fixed with "StrictDrawOrdering" enabled.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #40 from thanoulas thanoulas@gmail.com 2013-03-09 08:41:46 CST --- Ok. When I enable StrictDrawOrdering on mac, I no longer see the Loading screen at the beginning, but when loading is finished I see the profile screen for a split second (without glitches), then the screen is emptied and left with only the background image (where it freezes). Is this the case in Linux, too? (only reverting the commit does fix the freezing for you).
If that's the case, I wonder what the result on mac would be if I also removed the #ifdef __APPLE__ from that same line. I am going to give it a try.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #41 from Felix Hellmann privat@cirk2.de 2013-03-09 08:47:10 CST --- (In reply to comment #40)
Ok. When I enable StrictDrawOrdering on mac, I no longer see the Loading screen at the beginning, but when loading is finished I see the profile screen for a split second (without glitches), then the screen is emptied and left with only the background image (where it freezes). Is this the case in Linux, too? (only reverting the commit does fix the freezing for you).
If that's the case, I wonder what the result on mac would be if I also removed the #ifdef __APPLE__ from that same line. I am going to give it a try.
The exact point of freezing varies a bit (had plenty of occasions while regression testing). I suspect it to freeze during engine initalisation which is happening n the lst frames of the Loading/intro screen, the "Profile" frames are the last ones, I had occasions where I could hear the beginning of the waves from the menu etc.
Would be interesting to see your result of changing the alignment in that header.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #42 from Alexandre Julliard julliard@winehq.org 2013-03-09 08:51:52 CST --- You can't change it on Mac OS, it will crash and burn.
If you want to try to track it down (on Linux) you should compile individual dlls with the patch reverted until you find the one that makes a difference. Then repeat for individual files in that dll, and finally function by function in that file to find the offending code.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #43 from Felix Hellmann privat@cirk2.de 2013-03-09 08:56:31 CST --- (In reply to comment #42)
You can't change it on Mac OS, it will crash and burn.
If you want to try to track it down (on Linux) you should compile individual dlls with the patch reverted until you find the one that makes a difference. Then repeat for individual files in that dll, and finally function by function in that file to find the offending code.
How is that workflow for such a process? Copy the compiled dll in the prefix? And how do I compile single functions?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #44 from Alexandre Julliard julliard@winehq.org 2013-03-09 09:00:03 CST --- You can simply rebuild individual dlls by running make in the dll directory. For individual functions you'll have to put a #undef/#define __stdcall at various places in the file.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #45 from Felix Hellmann privat@cirk2.de 2013-03-09 09:06:42 CST --- I'm not at home for the Weekend, I'll try to track down the dll when I'm back. Maybe I can figure out the compiling of single functions, I'll have a read on the backgrounds of #define __stdcall.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #46 from thanoulas thanoulas@gmail.com 2013-03-09 11:40:32 CST --- (In reply to comment #42)
You can't change it on Mac OS, it will crash and burn.
If you want to try to track it down (on Linux) you should compile individual dlls with the patch reverted until you find the one that makes a difference. Then repeat for individual files in that dll, and finally function by function in that file to find the offending code.
Well it didn't crash or burn, but it didn't compile either. Getting errors.
http://bugs.winehq.org/show_bug.cgi?id=33125
rico.tilgner@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rico.tilgner@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33125
Jonathan Strander mblackwell1024@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mblackwell1024@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #47 from Felix Hellmann privat@cirk2.de 2013-03-12 21:04:32 CDT --- Ok I found the guilty dll, and as I feared it is one of the "big" ones: kernel32 now how exactly does the compiling of single Functions work? I have no idea of the win32 api and only limited experience in c and c++.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #48 from Andrey Gusev andrey.goosev@gmail.com 2013-03-13 06:31:22 CDT --- (In reply to comment #47)
Ok I found the guilty dll, and as I feared it is one of the "big" ones: kernel32 now how exactly does the compiling of single Functions work? I have no idea of the win32 api and only limited experience in c and c++.
I guess, now we need to find someone who can work with it.
http://bugs.winehq.org/show_bug.cgi?id=33125
Anthony Mattheakakis antony256@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|antony256@gmail.com |
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #49 from Jonathan Strander mblackwell1024@gmail.com 2013-03-13 23:04:33 CDT --- Aren't these really two separate bugs?
One is a graphical distortion (fixed by StrictDrawOrdering, which is a workaround not a fix of course), and the other is a crash.
Anyway, I've tested this now with 1.5.23 and 1.5.16 (in a clean prefix). 1.5.23 had graphical glitches (no matter the settings) and would display only the background after the initial loading and then appear to freeze (but not crash). 1.5.16 had slight graphical glitches during the initial load (the copyright credits to be precise), but the menu and game all played normally... as long as StrictDrawOrdering was enabled. Otherwise it had wild distortions.
On Ubuntu Linux 12.10, using an Intel Q9550 and a GTX 560Ti.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #50 from Andrey Gusev andrey.goosev@gmail.com 2013-03-14 07:55:46 CDT --- (In reply to comment #49) Yes, these bugs are separate. And problem with glitches can be "solved" by workaround for now. About freezes - it's a big problem, because each user have a different reaction to it.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #51 from Andrey Gusev andrey.goosev@gmail.com 2013-03-17 14:42:23 CDT --- Continues on 1.5.26
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #52 from Andrey Gusev andrey.goosev@gmail.com 2013-04-05 05:07:57 CDT --- Retesting in 1.5.27 no shows any flickering problem. Clean wineprefix. Game with latest update 1.01.732.1. Nvidia driver 313.30. Freezes still exist.
Can someone try to yourself?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #53 from Felix Hellmann privat@cirk2.de 2013-04-05 06:27:29 CDT --- I can confir that the distortions during the loading are gone, even when disabling strickDrawOrder. But it now freezes even when reverting the commit 4adfb787f4e8c36a37[...]
http://bugs.winehq.org/show_bug.cgi?id=33125
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Tomb Raider (2013) screen |Tomb Raider (2013) game |distortions and game |freezes |freezes |
http://bugs.winehq.org/show_bug.cgi?id=33125
Felix Hädicke felixhaedicke@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |felixhaedicke@web.de
--- Comment #54 from Felix Hädicke felixhaedicke@web.de 2013-04-06 20:47:49 CDT --- For me, The freeze is gone in Wine 1.5.27 (Linux) after compiling with one of the following changes: * revert commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a * unmodified 1.5.27 sources, but without optimizations: CFLAGS="-O0"
The latter could be an option to try on Mac OS X (I don't have a Mac, so I cannot try it myself), because reverting the commit is useless on Mac OS X. But it is of course not a real solution for this game, because missing optimization leads to a serious performance impact for particularly for DirectX software.
Another attemt was to compile Wine with the reverted commit 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a and CFLAGS="-O2 -mstackrealign". I had expected that the deadlock would also occur, because from my understanding the compiler option "-mstackrealign" has the same effect for all functions as the function attribute "force_align_arg_pointer" (which the commit adds for __stdcall / __cdecl functions).
More information about stack alignment issues can be found in Wine Bug 22316 and the following GCC bug entry: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838. But I do not have the knowledge to judge if our bug is caused by a GCC bug or if it is a bug in Wine.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #55 from Felix Hädicke felixhaedicke@web.de 2013-04-07 06:44:19 CDT --- Created attachment 44108 --> http://bugs.winehq.org/attachment.cgi?id=44108 backtraces in freezed state
winebd "bt all" backtrace for all processes / threads when the freeze occured.
Used Wine 1.5.27 (unmodified sources) with CFLAGS="-g -O2" (could not use -O0, because the freeze does not occur without optimization)
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #56 from Felix Hädicke felixhaedicke@web.de 2013-04-07 09:08:04 CDT --- It is just dlls/kernel32/sync.c which is broken with compiler optimizations. So disabling optimizations for this file only, by adding a line "#pragma GCC optimize ("O0")" on top of this source file, and compiling with default CFLAGS, fixes the freeze for me.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #57 from Jonathan Strander mblackwell1024@gmail.com 2013-04-07 12:45:41 CDT --- I still get graphical distortions without StrictDrawOrdering, however your modification to sync.c does prevent the crash.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #58 from thanoulas thanoulas@gmail.com 2013-04-07 13:45:47 CDT --- I tried building wine with the #pragma directive, but it makes no difference on OS X 10.8.3, I'm afraid. I still get to the "Profiles" screen, then I hear a selection sound, then just shows the game's background (something that looks like a map).
Can I somehow trace the frozen processes like you did?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #59 from Felix Hädicke felixhaedicke@web.de 2013-04-07 14:25:40 CDT --- Have you tried to compile whole Wine without optimizations? CFLAGS="-g -O0" This would also help to get a better backtrace if the freeze still occurs.
It could be interesting to compare the Mac OS X backtraces with mine. To get backtraces for all threads, start the wine process as you always do, wait until it freezes, start winedbg (in the same WINEPREFIX) and execute the command "bt all". To redirect the backtraces to a file, I started winedbg using "winedbg > tr-deadlock-trace.txt" and typed "bt all" without seeing the winedbg command line which is also redirected then. But there is maybe a more elegant way.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #60 from thanoulas thanoulas@gmail.com 2013-04-07 14:29:15 CDT --- Thanks I'll try that. I'm now trying to rebuild wine with the #pragma after I do a make clean first, because I suspect that kernel32 was already built in the folder and that the compilation never happened. If that doesn't work, I'll try building it without optimizations.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #61 from thanoulas thanoulas@gmail.com 2013-04-07 15:03:53 CDT --- Ok, good news, compiling with -O0 makes the game go past the freezing point, though it's very slow and I get some graphical glitches on screen, even with strictdrawordering enabled. I'll try and get a backtrace now, but I'll have to rebuild with -g -02, is that correct?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #62 from thanoulas thanoulas@gmail.com 2013-04-07 15:34:52 CDT --- Created attachment 44114 --> http://bugs.winehq.org/attachment.cgi?id=44114 OS X 10.8.3 - Wine 1.5.27 Winedbg Backtrace
Here's the backtrace for when the game is stuck at the profile page with winedbg bt all
Engine is wine from git, built with CFLAGS="-g -O2"
Unfortunately the output is not showing function names for some reason, like the linux backtrace, so I can't really tell what's going on.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #63 from Felix Hädicke felixhaedicke@web.de 2013-04-07 16:09:00 CDT --- Ok, the winedbg backtrace without function names is not really helpful. Could that be Bug 22384 ? Including "-gstabs+" in CFLAGS and maybe using "-O1" instead of "-O2" could help. The freeze is also there with -O1 on Linux.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #64 from thanoulas thanoulas@gmail.com 2013-04-07 17:48:39 CDT --- "-gstabs+" and -01 still don't generate function names in the backtrace. I'm thinking of disabling optimizations in the kernel32 .c files one by one until the game works, this is the only way I can think of now to find the file where this bug exists in OS X
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #65 from thanoulas thanoulas@gmail.com 2013-04-07 18:11:37 CDT --- Ok, from http://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-Pragmas.html
"The ‘#pragma GCC optimize’ pragma is not implemented in GCC versions earlier than 4.4."
My OS X: gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
So #pragma GCC optimize is not supported! Anything equivalent for older GCC versions, or a way to update my GCC on OS X?
http://bugs.winehq.org/show_bug.cgi?id=33125
aaronchi@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aaronchi@gmail.com
--- Comment #66 from aaronchi@gmail.com 2013-04-07 18:29:48 CDT --- I've been following this thread as I'm having the same issues with Tomb Raider on a mac. I tried the #pragma GCC optimize that didn't work either. Going to try now with an updated gcc:
brew tap homebrew/versions brew install gcc48
Thanks for working on this.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #67 from Andrey Gusev andrey.goosev@gmail.com 2013-04-08 04:48:12 CDT --- What a solution for Linux users? Updating GCC? Now I have version 4.7.2
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #68 from Felix Hädicke felixhaedicke@web.de 2013-04-08 14:31:34 CDT --- Created attachment 44122 --> http://bugs.winehq.org/attachment.cgi?id=44122 Patch which disables optimization for CreateEventExW
It seems to be the "CreateEventExW" function which gets broken in optimized builds. This patch disables optimization for this function only. Sorry, it uses a function attribute which only recent GCC version (probably >= 4.4) understand.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #69 from Andrey Gusev andrey.goosev@gmail.com 2013-04-08 16:19:31 CDT --- Felix, thanks for patch. Guys, please, post your results with this one.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #70 from Alexandre Julliard julliard@winehq.org 2013-04-08 16:32:54 CDT --- Does it work if you remove the IsBadReadPtr call instead?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #71 from Felix Hädicke felixhaedicke@web.de 2013-04-08 16:55:52 CDT --- No, removing the IsBadReadPtr call does unfortunately not help.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #72 from thanoulas thanoulas@gmail.com 2013-04-10 10:40:21 CDT --- (In reply to comment #68)
Created attachment 44122 [details] Patch which disables optimization for CreateEventExW
It seems to be the "CreateEventExW" function which gets broken in optimized builds. This patch disables optimization for this function only. Sorry, it uses a function attribute which only recent GCC version (probably >= 4.4) understand.
So, after a LONG time, trying to setup GCC 4.8 on my OS X 10.8, that can successfully build wine, I can confirm that this patch fixes the freeze on OS X, too.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #73 from aaronchi aaronchi@gmail.com 2013-04-10 12:59:58 CDT --- @thanoulas Do you have any documentation on the flags you used to install gcc 4.8 on OSX? I was having issues as well.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #74 from thanoulas thanoulas@gmail.com 2013-04-10 13:07:39 CDT --- I'm using macports, so you need to get gcc48 and any required dependencies with the +universal flag, or you'll be missing the required i386 arch in the dylibs. I originally had Homebrew as my package manager, but I had to change that because they don't offer a universal GCC
you will also need to change the Makefile.in in the folder /dlls/winemac.drv and add CC=clang
I'm sure I had more issues, but they were just missing dependencies, some trial and error will get you there, eventually. Make sure to build with -m32 and the MacOSX10.8.sdk in your DYLD path
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #75 from Felix Hädicke felixhaedicke@web.de 2013-04-10 15:50:25 CDT --- @thanoulas Your description confuses me a little. Have you used clang (3.2) or GCC (4.8) - these are different compilers - also for dlls/kernel32/sync.c and the rest, or did you just use clang for winemac.drv?
I tried to compile only the unmodified dlls/kernel32/sync.c with clang 3.0 instead of GCC (the rest of Wine with GCC 4.7.2) with -O1 and again with -O3 and the game did not freeze.
Another thing I tried was to compile Wine without optimizations, only dlls/kernel32/sync.c with optimization turned on. The bug was still there. Then I turned on optimization only for CreateEventExW and the game did not freeze as I had expected.
What I found out in my further investigations is that enabling optimizations (-O1 is enough) for the following thre functions only (and not for all the rest of Wine) makes the bug occur: * CreateEventExW * CreateSemaphoreW * CreateSemaphoreExW And if optimization is disabled for only one of these three functions, the freeze is gone.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #76 from Alexandre Julliard julliard@winehq.org 2013-04-10 16:06:56 CDT --- It would be interesting to try if making them DECLSPEC_HOTPATCH makes a difference.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #77 from Felix Hädicke felixhaedicke@web.de 2013-04-10 16:46:18 CDT --- Created attachment 44141 --> http://bugs.winehq.org/attachment.cgi?id=44141 Patch: Add DECLSPEC_HOTPATCH to CreateSemaphoreExW
Adding DECLSPEC_HOTPATCH to CreateSemaphoreExW does fix the problem. It makes no difference for me if the attribute is added to CreateEventExW and / or CreateSemaphoreW as well or not.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #78 from thanoulas thanoulas@gmail.com 2013-04-10 17:13:46 CDT --- (In reply to comment #75)
@thanoulas Your description confuses me a little. Have you used clang (3.2) or GCC (4.8) - these are different compilers - also for dlls/kernel32/sync.c and the rest, or did you just use clang for winemac.drv?
Compile everything with gcc48 and winemac.drv with clang
Doing the change I described in the Makefile.in of winemac.drv will force the main make command to compile winemac.drv with clang instead of gcc
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #79 from Andrey Gusev andrey.goosev@gmail.com 2013-04-11 15:03:15 CDT --- I see patch was committed in git d8c72febc823c6076a58a7d1bb166ff240db8326
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #80 from Felix Hädicke felixhaedicke@web.de 2013-04-11 15:22:23 CDT --- I've recompiled wine 1.5.27 with the DECLSPEC_HOTFIX patch and noticed that it does not fix it any longer for me. The same for recent git version with commit d8c72febc823c6076a58a7d1bb166ff240db8326.
I don't know yet what was different when I tested it yesterday.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #81 from Andrey Gusev andrey.goosev@gmail.com 2013-04-13 02:46:52 CDT --- Nothing changes on 1.5.28
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #82 from Jonathan Strander mblackwell1024@gmail.com 2013-04-13 16:43:55 CDT --- I can confirm that I still require at least the modification from comment #68 (with some changes obviously so it patches correctly) in order to not freeze with 1.5.28.
And also I still require StrictDrawOrdering to be enabled.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #83 from Andrey Gusev andrey.goosev@gmail.com 2013-04-19 06:13:11 CDT --- So, it's not quite a Wine bug? Something mutual?
http://bugs.winehq.org/show_bug.cgi?id=33125
TestSubject sirbubbles01@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sirbubbles01@gmail.com
--- Comment #84 from TestSubject sirbubbles01@gmail.com 2013-04-22 14:16:04 CDT --- (In reply to comment #82)
I can confirm that I still require at least the modification from comment #68 (with some changes obviously so it patches correctly) in order to not freeze with 1.5.28.
And also I still require StrictDrawOrdering to be enabled.
I don't know what everyone else's experience has been with the git version of wine, but I've found that simply reverting patch 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a is enough to allow the game to run. I've also found that StrictDrawOrdering is not necessary for me. I've got nvidia driver version 319.12, so I don't know if that's having some sort of effect. But I have had no issues whatsoever getting the game to load by simply reverting this patch.
I have an amd 955 cpu, nvidia gtx660, and Ubuntu 12.10 x64.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #85 from sylvain.pare@gmail.com 2013-05-01 13:07:58 CDT --- Created attachment 44345 --> http://bugs.winehq.org/attachment.cgi?id=44345 tomb raider crash wine 1.5.29
http://bugs.winehq.org/show_bug.cgi?id=33125
Max Mustermann maxmusterm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maxmusterm@gmail.com
--- Comment #86 from Max Mustermann maxmusterm@gmail.com 2013-05-08 15:10:00 CDT --- Would it be bad to add a gcc workaround in the wine codebase? Or do you think the bug should only be fixed in gcc itself? What is btw the status of wine with clang?The bugs mentioned here http://wiki.winehq.org/Clang seem all only to apply to older clang versions or don't they?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #87 from Austin English austinenglish@gmail.com 2013-05-08 17:06:28 CDT --- (In reply to comment #86)
Would it be bad to add a gcc workaround in the wine codebase? Or do you think the bug should only be fixed in gcc itself? What is btw the status of wine with clang?The bugs mentioned here http://wiki.winehq.org/Clang seem all only to apply to older clang versions or don't they?
From that page:
Using Wine 1.5.20+ and Clang 3.2, the Wine ConformanceTests behaves the same as gcc (tested using 4.7.2 on Fedora 18, x86_64).
I can't comment on how it runs on OSX, but at least on Linux, things seem to work. I haven't tried using it for my system installed wine, so there may be other bugs that the test suite doesn't expose.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #88 from Max Mustermann maxmusterm@gmail.com 2013-06-05 13:00:48 CDT --- Does anyone know which gcc optimisation breaks the code and did anyone open a bug report for gcc?
http://bugs.winehq.org/show_bug.cgi?id=33125
Travis Greenman cartman-2000@cartman-2000.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cartman-2000@cartman-2000.n | |et
--- Comment #89 from Travis Greenman cartman-2000@cartman-2000.net 2013-07-14 19:38:30 CDT --- (In reply to comment #68)
Created attachment 44122 [details] Patch which disables optimization for CreateEventExW
It seems to be the "CreateEventExW" function which gets broken in optimized builds. This patch disables optimization for this function only. Sorry, it uses a function attribute which only recent GCC version (probably >= 4.4) understand.
This also fixes the freeze for me on wine 1.6_rc3. I'm using 64bit gentoo with the 3.8.13 kernel, gcc 4.6.3.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #90 from Andrey Gusev andrey.goosev@gmail.com 2013-09-15 05:04:49 CDT --- Updating for Felix Hädicke's attachment 44122 for Wine 1.7.2
HANDLE WINAPI __attribute__((optimize("-O0"))) DECLSPEC_HOTPATCH CreateEventExW( SECURITY_ATTRIBUTES *sa, LPCWSTR name, DWORD flags, DWORD access )
http://bugs.winehq.org/show_bug.cgi?id=33125
Jeff Cook jeff@deseret-tech.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeff@deseret-tech.com
--- Comment #91 from Jeff Cook jeff@deseret-tech.com 2013-10-06 00:34:43 CDT --- Experiencing freeze on the profile screen with 6d03ce8d08e68d, even after modifying the posted patch to be applicable in consideration of d8c72febc823c607 which makes the function hotpatchable. Have done a full clean and recompile and still experience the issue.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #92 from Max Mustermann maxmusterm@gmail.com 2013-11-27 05:14:37 CST --- This bug was confirmed by many peers and there even are a few solutions (and proposals), yet this bug is still marked as unconfirmed?
http://bugs.winehq.org/show_bug.cgi?id=33125
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #93 from Bruno Jesus 00cpxxx@gmail.com 2013-11-27 05:19:23 CST --- Confirmed by multiple users.
http://bugs.winehq.org/show_bug.cgi?id=33125
Berillions berillions@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |berillions@gmail.com
--- Comment #94 from Berillions berillions@gmail.com 2013-12-08 03:40:34 CST --- The game still crash after the login profil for me. All patch in this bug report does not work for me.
I must to play at this game on Windows ?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #95 from TestSubject sirbubbles01@gmail.com 2013-12-08 07:12:27 CST --- If you happen to be building wine from git, you can get around the freezing problem by reverting this git commit. 4adfb787f4e8c36a37ce1d53a7e6df16d03ecd8a. I've been running the game for a long time via this method. Shouldn't have to revert this git and others for basic functionality, but there you go.
http://bugs.winehq.org/show_bug.cgi?id=33125
legluondunet@free.fr legluondunet@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |legluondunet@free.fr
--- Comment #96 from legluondunet@free.fr legluondunet@free.fr 2013-12-08 13:00:25 CST --- I just tried this game, Steam version ,and after asked me my mail, the game freeze!
Thank you for your help.
LGDN.
Config: Ubuntu 13.10 wine 1.7.8 32 bits AMD radeon 7850 with Ubuntu Catalyst drivers 13.101 version Processor Intel i5-3570 3,4 Ghz
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #97 from Berillions berillions@gmail.com 2013-12-08 13:05:41 CST --- Same thing for me ans there are two solutions : 1- If you use wine-git, apply this patch http://bugs.winehq.org/attachment.cgi?id=44122&action=diff 2- Or configure Wine with CFLAGS="-g -O0"
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #98 from Max Mustermann maxmusterm@gmail.com 2013-12-08 14:10:05 CST --- Or compile it with clang.
http://bugs.winehq.org/show_bug.cgi?id=33125
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #99 from Anastasius Focht focht@gmx.net 2013-12-08 17:03:24 CST --- Hello folks,
I can't confirm this. Neither the freeze nor this 'flickering' effect is present here.
The game works out of the box, I played until first savepoint.
Using the Steam version (2013-12-08), 'windowed' mode.
Specs:
* Fedora 19 64-bit/32-bit * gcc 4.8.2 20131017 (Red Hat 4.8.2-1) * Wine 1.7.8-128-g37460b6 (64/32-bit, CFLAGS: -O2 -g) * Steam + game installed in 32-bit WINEPREFIX, dwrite disabled * NVIDIA GeForce GT 425M
Regards
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #100 from legluondunet@free.fr legluondunet@free.fr 2013-12-09 04:07:08 CST --- Finally this game does not freeze if I launch it in full screen, without a wine virtual destop. Same problem for other Tomb Raider title like Tomb Raider last revelations and Chronicles. It seems AMD Catalyst drivers does not appreciate wine virtual desktop.I will open a bug report on AMD.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #101 from Andrey Gusev andrey.goosev@gmail.com ---
From changes list for gcc 4.8.2
"A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0."
Upstream?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #102 from legluondunet@free.fr legluondunet@free.fr --- Sorry, wrong comment 100: the games still freeze with last 1.7.x wine version. But not with wine 1.5.17 and 1.5.19. I will try to patch the last git with http://bugs.winehq.org/attachment.cgi?id=44122&action=diff for test.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #103 from Adam Bolte abolte@systemsaviour.com --- Created attachment 47293 --> http://bugs.winehq.org/attachment.cgi?id=47293 Patch which disables optimization for CreateEventExW
Updated for Wine 1.7.10+.
Note that Tomb Raider is completely broken in 1.7.11. Will probably run a regression test soon, but I suspect it's bug 35388.
http://bugs.winehq.org/show_bug.cgi?id=33125
Adam Bolte abolte@systemsaviour.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |abolte@systemsaviour.com
http://bugs.winehq.org/show_bug.cgi?id=33125
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #104 from Wylda wylda@volny.cz --- (In reply to comment #103)
regression test soon, but I suspect it's bug 35388.
Another one could be bug 35408 as that was also new in 1.7.11.
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #105 from Adam Bolte abolte@systemsaviour.com ---
Another one could be bug 35408 as that was also new in 1.7.11.
Correct, it was bug 35408. I just commented there. :)
http://bugs.winehq.org/show_bug.cgi?id=33125
Matěj Týč matej.tyc@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matej.tyc@gmail.com
--- Comment #106 from Matěj Týč matej.tyc@gmail.com --- I experience the freeze even in Wine 1.7.12
http://bugs.winehq.org/show_bug.cgi?id=33125
Jarkko K jarkko_korpi@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarkko_korpi@hotmail.com
--- Comment #107 from Jarkko K jarkko_korpi@hotmail.com --- "fixme:d3d11:D3D11CreateDevice stub: adapter (nil), driver_type D3D_DRIVER_TYPE_HARDWARE, swrast (nil), flags 0, feature_levels 3406616, levels 0x2, sdk_version 7, device 0x33fb10, "
Someone had that in his backlog. It means basically that the game tries to run dx11.
Please disable directx 11 and 10 related libraries while trying to run the game.
http://bugs.winehq.org/show_bug.cgi?id=33125
Dooglio doug@dooglio.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |doug@dooglio.net
--- Comment #108 from Dooglio doug@dooglio.net --- I was experiencing a crash when I touched any key at all. It would play up to the point of when Laura is first hanging from the ceiling, but when I used the arrow keys, it would immediately lock up.
I applied the last patch in the list above (http://bugs.winehq.org/attachment.cgi?id=47293) to wine 1.7 and it works like a champ.
I even made a PPA for it if you run Ubuntu Saucy (13.10):
https://launchpad.net/~doug/+archive/steam-wine-fix
To use, add the following PPA:
sudo apt-add-repository ppa:doug/steam-wine-fix sudo apt-get update sudo apt-get upgrade # This should force wine-1.7 to upgrade, if you have it installed.
http://bugs.winehq.org/show_bug.cgi?id=33125
hNarval drummaniac47@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |drummaniac47@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33125
pasa psnirvana.lviv@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |psnirvana.lviv@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33125
Rui Caridade rcaridade145@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rcaridade145@gmail.com
--- Comment #109 from Rui Caridade rcaridade145@gmail.com --- I am experiencing this problem on ubuntu 14.04 wine 1.7.20. Any chance this patch gets commited or better to talk to the ubuntu maintainers?
http://bugs.winehq.org/show_bug.cgi?id=33125
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://store.steampowered.c | |om/app/203160/ Summary|Tomb Raider (2013) game |Tomb Raider (2013) freezes |freezes |(bug in game engine, | |semaphore object handle | |value must be zero on all | |error paths)
--- Comment #110 from Anastasius Focht focht@gmx.net --- Hello folks,
I could reproduce the problem.
It's actually buggy code in the game engine that just works by chance.
I looked at the disassembly from different gcc optimization levels and could not really spot a problem. There is some questionable (redundant) code in the function prolog at O1+ but still no overly optimized code that breaks something.
Running with +relay avoided the freeze so stack layout/values certainly had an impact.
A +server trace along with +msvcrt (msvcrt = good search patterns to correlate with working a +relay trace):
--- snip --- ... 0063: create_semaphore( access=001f0003, attributes=00000080, initial=00000000, max=7fffffff, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_semaphore() = 0 { handle=011c } ... 0063: create_semaphore( access=001f0003, attributes=00000080, initial=00000000, max=7fffffff, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_semaphore() = 0 { handle=0120 } ... 0063: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_event() = 0 { handle=0208 } 0063: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_event() = 0 { handle=020c } 0063:trace:msvcrt:pf_printf_a Format is: "%s%s.drm" ... 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33ece4 2000 "InitializePanel: 0" 18) 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33eae4 2000 "ShowPanel(0)" 12) 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33eae4 2000 "Prev ID 0" 9) 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33ece4 2000 "this[nav_list_item_8_mc].GetState() 2" 37) ... 0063: release_semaphore() = 0 { prev_count=00000000 } 0063: release_semaphore( handle=011c, count=00000001 ) 0063: release_semaphore() = 0 { prev_count=00000000 } 0066: release_semaphore( handle=0208, count=00000001 ) 0066: release_semaphore() = OBJECT_TYPE_MISMATCH { prev_count=00000000 } 0063: release_semaphore( handle=011c, count=00000001 ) 0063: release_semaphore() = 0 { prev_count=00000001 } 0066: select( flags=2, cookie=053fe4dc, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={011c,0120}} ) 0066: select() = 0 { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0063: select( flags=2, cookie=0033f09c, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={0208}} ) 0063: select() = PENDING { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0066: release_semaphore( handle=0208, count=00000001 ) 0066: release_semaphore() = OBJECT_TYPE_MISMATCH { prev_count=00000000 } 0066: select( flags=2, cookie=053fe4dc, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={011c,0120}} ) 0066: select() = 0 { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0066: release_semaphore( handle=0208, count=00000001 ) 0066: release_semaphore() = OBJECT_TYPE_MISMATCH { prev_count=00000000 } 0066: event_op( handle=0208, op=1 ) 0063: *wakeup* signaled=0 0066: event_op() = 0 0063: select( flags=2, cookie=0033f09c, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={0208}} ) 0063: select() = PENDING { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0066: select( flags=2, cookie=053fe4dc, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={011c,0120}} ) 0066: select() = PENDING { timeout=infinite, call={APC_NONE}, apc_handle=0000 } ... <threads 00063 and 0066 wait blocked> --- snip ---
The 'OBJECT_TYPE_MISMATCH' error catched my attention. Object/handle 0x208 was certainly valid but not a semaphore.
That value was leaked through earlier call(s) which incidentally mapped to a valid handle (event object). Because the event was waitable but not signaled, the thread assumed it waited on a counted semaphore got blocked forever.
An unoptimized build of Wine gave this trace:
--- snip --- ... 0062: create_semaphore( access=001f0003, attributes=00000080, initial=00000000, max=7fffffff, objattr={rootdir=0000,sd={},name=L""} ) 0062: create_semaphore() = 0 { handle=011c } 0062: create_semaphore( access=001f0003, attributes=00000080, initial=00000000, max=7fffffff, objattr={rootdir=0000,sd={},name=L""} ) 0062: create_semaphore() = 0 { handle=0120 } ... 0062: create_event( access=001f0003, attributes=00000080, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} ) 0062: create_event() = 0 { handle=0208 } 0062: create_event( access=001f0003, attributes=00000080, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} ) 0062: create_event() = 0 { handle=020c } 0062:trace:msvcrt:pf_printf_a Format is: "%s%s.drm" ... 0062:trace:msvcrt:MSVCRT_strncpy_s (0x33eca4 2000 "InitializePanel: 0" 18) 0062:trace:msvcrt:MSVCRT_strncpy_s (0x33eaa4 2000 "ShowPanel(0)" 12) 0062:trace:msvcrt:MSVCRT_strncpy_s (0x33eaa4 2000 "Prev ID 0" 9) 0062:trace:msvcrt:MSVCRT_strncpy_s (0x33eca4 2000 "this[nav_list_item_8_mc].GetState() 2" 37) ... 0062: release_semaphore( handle=011c, count=00000001 ) 0065: *wakeup* signaled=0 0062: release_semaphore() = 0 { prev_count=00000000 } ... 0062: release_semaphore( handle=011c, count=00000001 ) 0065: *wakeup* signaled=0 0062: release_semaphore() = 0 { prev_count=00000000 } 0062: release_semaphore( handle=011c, count=00000001 ) 0062: release_semaphore() = 0 { prev_count=00000000 } 0065: release_semaphore( handle=7b8bc000, count=00000001 ) 0065: release_semaphore() = INVALID_HANDLE { prev_count=00000000 } 0062: release_semaphore( handle=011c, count=00000001 ) 0062: release_semaphore() = 0 { prev_count=00000001 } 0065: select( flags=2, cookie=053fe5ec, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={011c,0120}} ) 0065: select() = 0 { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0062: select( flags=2, cookie=0033f15c, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={7b8bc000}} ) 0062: select() = INVALID_HANDLE { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0065: release_semaphore( handle=7b8bc000, count=00000001 ) 0065: release_semaphore() = INVALID_HANDLE { prev_count=00000000 } 0062: select( flags=2, cookie=0033f15c, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={7b8bc000}} ) 0062: select() = INVALID_HANDLE { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0065: select( flags=2, cookie=053fe5ec, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={011c,0120}} ) 0065: select() = 0 { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0062: select( flags=2, cookie=0033f15c, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={7b8bc000}} ) 0062: select() = INVALID_HANDLE { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0065: release_semaphore( handle=7b8bc000, count=00000001 ) 0065: release_semaphore() = INVALID_HANDLE { prev_count=00000000 } 0062: select( flags=2, cookie=0033f15c, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={0208}} ) 0062: select() = PENDING { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0065: event_op( handle=0208, op=1 ) 0062: *wakeup* signaled=0 0065: event_op() = 0 0065: select( flags=2, cookie=053fe5ec, timeout=infinite, prev_apc=0000, result={}, data={WAIT,handles={011c,0120}} ) 0065: select() = PENDING { timeout=infinite, call={APC_NONE}, apc_handle=0000 } 0062: release_semaphore( handle=011c, count=00000001 ) 0065: *wakeup* signaled=0 ... --- snip ---
The handle value now changed to 0x7b8bc000, which works "better" on sync APIs because it immediately fails them, giving 'INVALID_HANDLE'. Mapped base address of kernel32, leaked through local stack area.
With +relay,+server together it become more obvious:
--- snip --- ... 0063:Call KERNEL32.CreateSemaphoreW(00000000,00000000,7fffffff,00000000) ret=005283d1 0063: create_semaphore( access=001f0003, attributes=00000080, initial=00000000, max=7fffffff, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_semaphore() = 0 { handle=011c } 0063:Ret KERNEL32.CreateSemaphoreW() retval=0000011c ret=005283d1 ... 0063:Call KERNEL32.CreateSemaphoreW(00000000,00000000,7fffffff,00000000) ret=005283e0 0063: create_semaphore( access=001f0003, attributes=00000080, initial=00000000, max=7fffffff, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_semaphore() = 0 { handle=0120 } 0063:Ret KERNEL32.CreateSemaphoreW() retval=00000120 ret=005283e0 0063:Call msvcr90._beginthreadex(00000000,00020000,00527fd0,00000000,00000000,00000000) ret=00528406 ... 0063:Call KERNEL32.CreateEventW(00000000,00000000,00000000,00000000) ret=00527298 0063: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} ) 0063: create_event() = 0 { handle=0208 } 0063:Ret KERNEL32.CreateEventW() retval=00000208 ret=00527298 ... 0063:Call KERNEL32.CreateSemaphoreW(00000000,00000000,ffffffff,00000000) ret=0064381d 0063:Ret KERNEL32.CreateSemaphoreW() retval=7bcde220 ret=0064381d ... 0063:trace:msvcrt:pf_printf_a Format is: "%s%s.drm" 0063:Call msvcr90._stricmp(00dd3b48 "generalbank",129ee9f9 "ac_bendy_01_medium_shrub") ret=0055b09c 0063:Ret msvcr90._stricmp() retval=00000001 ret=0055b09c ... 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33ece4 2000 "InitializePanel: 0" 18) ... 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33eae4 2000 "ShowPanel(0)" 12) ... 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33eae4 2000 "Prev ID 0" 9) ... 0063:trace:msvcrt:MSVCRT_strncpy_s (0x33ece4 2000 "this[nav_list_item_8_mc].GetState() 2" 37) ... --- snip ---
'TombRaider.exe' disassembly, the culprit:
--- snip --- 00643804 33C0 XOR EAX,EAX 00643806 53 PUSH EBX ; lpName = NULL 00643807 6A FF PUSH -1 ; lMaximumCount = 0xffffffff (!) 00643809 53 PUSH EBX ; lInitialCount = 0 0064380A 53 PUSH EBX ; lpSemaphoreAttributes = NULL 0064380B 8946 08 MOV DWORD PTR DS:[ESI+8],EAX 0064380E 895E 0C MOV DWORD PTR DS:[ESI+C],EBX 00643811 895E 10 MOV DWORD PTR DS:[ESI+10],EBX 00643814 895E 14 MOV DWORD PTR DS:[ESI+14],EBX 00643817 FF15 FC70D800 CALL DWORD PTR DS:[<&KERNEL32.CreateSemaphoreW>] 0064381D 8906 MOV DWORD PTR DS:[ESI],EAX 0064381F 8BC6 MOV EAX,ESI 00643821 5E POP ESI 00643822 5B POP EBX 00643823 C2 0400 RETN 4 --- snip ---
'lMaximumCount' < 0 (LONG) can't obviously work.
The code here (including caller) doesn't check the returned handle value and stores it right away for later use.
Wine doesn't initialize the local variable that ought to carry the return value, which is passed as 'out' parameter to NtXXX API. Depending on the stack layout/optimizations, different stack values get leaked as handle values.
Source: http://source.winehq.org/git/wine.git/blob/0e1b381503751294c6e6925b9ba1eeb0a...
--- snip --- 777 HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreExW( SECURITY_ATTRIBUTES *sa, LONG initial, LONG max, 778 LPCWSTR name, DWORD flags, DWORD access ) 779 { 780 HANDLE ret; 781 UNICODE_STRING nameW; 782 OBJECT_ATTRIBUTES attr; 783 NTSTATUS status; ... 798 status = NtCreateSemaphore( &ret, access, &attr, initial, max ); 799 if (status == STATUS_OBJECT_NAME_EXISTS) 800 SetLastError( ERROR_ALREADY_EXISTS ); 801 else 802 SetLastError( RtlNtStatusToDosError(status) ); 803 return ret; 804 } --- snip ---
You need to explicitly zero-init 'ret' here or have 'NtCreateSemaphore' zero-init the 'out' handle parameter. With that part fixed, the freeze is gone.
Despite the failure of 'CreateSemaphoreExW' to create a sync object the game works (profile -> main screen cut scene threading synchronization).
Regards
http://bugs.winehq.org/show_bug.cgi?id=33125
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |149d60318fac6314726f256c1cc | |a1e8c4806202b Status|NEW |RESOLVED Component|-unknown |kernel32 Resolution|--- |FIXED
--- Comment #111 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/149d60318fac6314726f256c1cc...
Thanks Austin.
Regards
https://bugs.winehq.org/show_bug.cgi?id=33125
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #112 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.22.
http://bugs.winehq.org/show_bug.cgi?id=33125
fusion.lightcat@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fusion.lightcat@gmail.com
--- Comment #113 from fusion.lightcat@gmail.com --- When i try to patch the attachment number 47293 (disable optimization) with "patch -p1 < patch.diff" it says:
patching file dlls/kernel32/sync.c Hunk #1 FAILED at 456. 1 out of 1 hunk FAILED -- saving rejects to file dlls/kernel32/sync.c.rej
How can i fix this?
http://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #114 from Berillions berillions@gmail.com --- (In reply to fusion.lightcat from comment #113)
When i try to patch the attachment number 47293 (disable optimization) with "patch -p1 < patch.diff" it says:
patching file dlls/kernel32/sync.c Hunk #1 FAILED at 456. 1 out of 1 hunk FAILED -- saving rejects to file dlls/kernel32/sync.c.rej
How can i fix this?
The bug is fixed in wine 1.7.22 ... read the AJ's message
https://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #115 from Jerome Leclanche adys.wh@gmail.com --- (In reply to Berillions from comment #114) According to a user it still happens on 1.7.23. Can anyone confirm?
https://bugs.winehq.org/show_bug.cgi?id=33125
--- Comment #116 from legluondunet@free.fr legluondunet@free.fr --- I just tested it with 1.7.23 and I can access to the aim menu without freeze.