http://bugs.winehq.org/show_bug.cgi?id=21941
Summary: Alpha Prime crashes right after the intro Product: Wine Version: 1.1.40 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: gyebro69@gmail.com CC: stefan@codeweavers.com
Created an attachment (id=26639) --> (http://bugs.winehq.org/attachment.cgi?id=26639) Alpha Prime (Steam version) crashlog
Alpha Prime crashes after showing the company logos.
Demo version of the game: http://www.gamershell.com/download_18730.shtml
Wine-1.1.40 compiled from source Fedora 12 x86 Nvidia GeForce 7600 GT with driver 195.36.08
Wine-1.1.37 was the last version I could start the game with.
Regression testing came up with the following:
224043d6cf8b56e9ff2537358646700211d54d1f is the first bad commit commit 224043d6cf8b56e9ff2537358646700211d54d1f Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Jan 28 20:51:06 2010 +0100
wined3d: Implement dynamic buffers with GL_ARB_map_buffer_range.
:040000 040000 1f55d5e837f1d9a7d2b4611f2de3e02dbcd8fafe c189de355870e1812adce96432f42a16967e2b2c M dlls
Note: Mouse control didn't work in the game unless I set the windows version to Windows 2000 in winecfg (but that's another bug).
http://bugs.winehq.org/show_bug.cgi?id=21941
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=21941
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=21941
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #1 from Austin English austinenglish@gmail.com 2010-03-07 12:19:49 --- Dupe.
*** This bug has been marked as a duplicate of bug 21707 ***
http://bugs.winehq.org/show_bug.cgi?id=21941
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2010-03-07 22:54:50 --- Closing
http://bugs.winehq.org/show_bug.cgi?id=21941
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED CC| |stefandoesinger@gmx.at Resolution|DUPLICATE |
--- Comment #3 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-10 04:39:55 --- Reopening this bug, I doubt it is a duplicate of 21707, even though it is caused by the same patch.
Is there a downloadable demo of this game that can be used to reproduce this bug?
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-10 05:53:51 --- I found a demo on steam. Downloading it right now...
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #5 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-10 13:49:51 --- Created an attachment (id=26733) --> (http://bugs.winehq.org/attachment.cgi?id=26733) Debug hack: Semi-randomize the returned address
Hi,
I suspect that the game fails because two different map calls on the same buffer return a different address. Can you try the attached patch? If my suspicion is correct, the game should still crash with it. It disables GL vertex buffers, but allocates new memory each map.
If this is really the game's problem, then we have a big issue. There's nothing in the d3d API that guarantees the game that the address remains the same. Similarly in GL. It just seems that the game is lucky on Windows on at least some drivers, but is not lucky with the Linux GL drivers.
If it is just this one game I'd be tempted to close this bug as WONTFIX, seriously broken app. But it seems a number of applications are affected, possibly including Call of Duty 4 and Crysis.
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #6 from GyB gyebro69@gmail.com 2010-03-10 14:24:14 --- Hello,
With your patch applied, the game no more crashes after the intro but became extremely slow: like 1 fps. Tested with the demo version of the game, because I have no time mucking around with the steam client right now.
There are lots of messages like this in the console:
err:d3d:state_undefined Undefined state.
Keep up the good work, Stefan
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #7 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-11 03:14:52 --- That's strange, it keeps crashing for me. Can you try to remove the HeapFree(GetProcessHeap(), 0, This->mem2) call from buffer_unmap? It should crash when entering the main menu. (If it doesn't it will crash when playing because it runs out of memory)
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-11 05:00:02 --- An update: Possibly the crash isn't caused by a different pointer, but by an incorrectly aligned pointer. D3D resource mappings are 32 byte aligned, OpenGL mappings don't give such a guarantee. Alpha prime works with my randomized pointer patch if I make sure the returned pointer is 32 byte aligned.
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #9 from GyB gyebro69@gmail.com 2010-03-11 09:59:22 --- (In reply to comment #7)
That's strange, it keeps crashing for me. Can you try to remove the HeapFree(GetProcessHeap(), 0, This->mem2) call from buffer_unmap? It should crash when entering the main menu. (If it doesn't it will crash when playing because it runs out of memory)
This time I could get past the intro but the game crashed in the menu in about 5 seconds.
http://bugs.winehq.org/show_bug.cgi?id=21941
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #26733|0 |1 is obsolete| |
--- Comment #10 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-12 13:18:11 --- Created an attachment (id=26768) --> (http://bugs.winehq.org/attachment.cgi?id=26768) Buffer alignment patches
hi, This archive contains a number of patches, most of them deal with the buffer alignment and should get Alpha Prime and Call of Duty 4 working again. Can you give them a try? I'll send the patches to wine-patches next week, I have to look over them once more before I send them.
Patch 1 is a fix for Shaiya, but the changes to the testsuite are not included yet.
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #11 from GyB gyebro69@gmail.com 2010-03-12 15:01:45 --- I applied all of the patches from the archive and the game now runs again! It doesn't crash and fully playable.
Thank you for taking the time and effort to fix this issue.
You didn't mention which one of the patches is applied to Alpha Prime so I applied them all. I'm not a linux guru, so these things were all new to me (regression testing, patching). I hope I did it correctly.
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #12 from Stefan Dösinger stefandoesinger@gmx.at 2010-03-13 07:28:52 --- Patch 4 is the one for Alpha Prime, patches 2 and 3 are preparations for it. Patch 1 fixes Shaiya. 5 is a cleanup, 6 is an unrelated bugfix. Patch 7 makes alignment less strict and might break games(although I don't know of any game that wants 32 byte buffer alignment)
http://bugs.winehq.org/show_bug.cgi?id=21941
--- Comment #13 from GyB gyebro69@gmail.com 2010-03-16 12:54:09 --- With the current git (wine-1.1.40-191-g4b5f6ad) the game doesn't crash anymore. Well done!
http://bugs.winehq.org/show_bug.cgi?id=21941
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #14 from Austin English austinenglish@gmail.com 2010-03-16 14:02:27 --- Reported fixed.
http://bugs.winehq.org/show_bug.cgi?id=21941
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org 2010-03-19 14:10:58 --- Closing bugs fixed in 1.1.41.