-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anno 2205 crashes if State Cache is enabled #686
Comments
Can you post the full wine console output, and if possible, a stack trace from the crash? I'd find it extremely weird if there were any game-specific bugs in the state cache because there's literally nothing game-specific about it. |
DXVK is not in the stack trace, and the game seems to crash while waiting for a sync object in its own code, which means that either the stack trace caught the wrong thread for some reason or that this is not even my bug. |
There is a chance that the game itself has a use-after-free that usually works because nothing else touches the memory before the wait finishes. When the state cache is enabled, DXVK is doing allocations in parallel and that can reinitialize the freed memory, clobbering the sync object. If this is the case, it is a bug in the game. The only thing DXVK could do to work around such a bug is to implement a separate heap for itself, but that could be a significant amount of work. I imagine that implementing it and testing the change would confirm/refute the idea that use-after-free is happening in the game code. It might be better to figure out how to apply UBSAN or ASAN to a winelib build. By the way, a bug like what I describe happened in the Linux kernel several years ago. It was absurdly difficult to track down and took dozens of people more than a year to find it: https://lwn.net/Articles/575477/ I suggest keeping the possibility in mind when debugging this. It could save plenty of time. |
It might be possible to get a different heap for DXVK via linker magic if a different malloc implementation is linked into DXVK. This assumes that C++ wraps the C malloc and the linker lets the game continue to use the wine malloc. Here is one option that could work: https://github.com/rampantpixels/rpmalloc It might help performance at the start of games when the state cache is used. The MIT / public domain licensing is also compatible with the licensing used in DXVK in terms of not adding additional restrictions. |
@Shished How did you get the game workin in the first place? Every time I try to run it I get a
I tried setting the ENV but that didnt help.
|
You need to set that env variable to utf8. |
derp Of course, thanks! |
for me it does not work the terminal gives me this: at this point, i have a black screen and nothing happens Update: now i got this error: Does it matter if the OS language is german? |
@Shatrico This is the same error I posted earlier. Just add the environment variable Here's a proof, that it works fine: |
ah thx now it works. on which settings do you run it because i had all on high but my pc freezes after some time and it only happens with anno |
@Shatrico: We went a bit off-topic here. Let's talk somewhere else to not spam the ticket too much. The actual problem OP had was a crash when DXVK_STATE_CACHE was active not running the game after all. |
@Shished Is the original bug actually still an issue? If so I'm just going to blacklist the game because there are no obvious bugs in the state cache implementation. |
This bug still presented in .92, I cannot test it right now in .93. |
The state cache should now be disabled for this game. Not sure what's going on, but since this is the only game that has issues with it, I doubt there is a general bug in the implementation. |
Shouldn't the bug still be open until the issue is fixed? |
This issue cannot be fixed, and it might not even be a DXVK bug. Every single game works just fine with the state cache, none of them have any synchronization issues no matter how eratically they create and destroy D3D11 devices or do whatever nonsense they come up with... except this one. For all I care, blacklisting it is enough of a fix. That said, if you know why the state cache crashes this game, feel free to share your findings, but I'm not going to invest any more time in it. |
I don't said its not a good fix. I just thought it would be better to let it open in terms of showing known issues. sorry for ot: but from which anime is your github avatar? |
@Thaodan is 2B from the game Nier:Automata |
It's actually A2. |
I think there is a regression with Anno 2205 with the newest dxvk release:
After starting the game is on the screen where it says he is loading and then the game crashed and also closed uplay |
So does it work with 0.93? If so, please bisect, and when you did, open a new issue. |
sry, but my English is not the best, what you mean with "bisect"? |
First of all, please check if it works with 0.93. |
Its starting but then its crashing during playing the game: |
Then please bisect DXVK following this tutorial. |
This bug does not reproduces for me anymore.
Then i tried 0.93 and 0.92 and they also worked. |
Tomorrow or so I will take a look into bisect, it looks very complicated, but i can exclude a wine problem because i switched the versions and it still happens |
because with 0.94 I already crashes when I start the game and with 0.93 I can run the game select a save go into a map and crashes then between 5-10 min. And if it would be a Linux problem then no DX11 would run and that's not the case. |
I tried to play this game with DXVK 0.92 and 0.93, now it does not crashes but crashed last time when i tested it before. I installed vcrun2012 from winetricks so game wont complain about msvcp in terminal, also i disabled overlay64.dll in winecfg - that's uplay overlay. |
Tried it and did not help |
Anno 2205 (64bit DX11-only game) crashes if State Cache is enabled.
It seems that if cache file does not exists, game will crash immediately after launch but will create cache file, on second launch game will load to menu and crash in it or after map loading.
If State Cache is disabled with DXVK_STATE_CACHE=0 env variable, game works fine without crashes.
Software information
Anno 2205 Complete Edition from Ubisoft store.
System information
Log files
The text was updated successfully, but these errors were encountered: