protonscr

[d3d9] Artificial Academy 2 crash on class roster

dxvkclosed
doitsujin/dxvk#1665 · opened 2020-06-14 by Arkblade2015 · updated 2023-07-08 · 6 comments · github
AArkblade2015 2020-06-14 github

game start and select new game, make class and go class roster (upper right icon).
Double-clicking on a blank field on this screen to add a character or go to the change of clothes screen causes a very high (ABOUT 80%) probability of a CTD, especially after the second person.

Software information

Artificial Academy 2 (with AA Unlimited)

System information

  • CPU: i7 6700
  • GPU: Nvidia GeForce GTX 1070
  • Driver: 446.14
  • DXVK version: 1.6.1, but also 1.7

Apitrace file(s)

https://drive.google.com/file/d/1YHqDpJ37znrTIfM9m6Ocej8aD4oTsucD/view?usp=sharing

Log files

AArkblade2015 2020-06-15 github

add apitrace file

Kk4yf0ur 2020-06-20 github

To add onto this, there's a couple of different ways of causing this crash to happen, it is not merely opening the roster. The crashes can happen when you click on any UI elements, including when you click on config, new game, load game, clothing selection, and even when the high poly model of a character is loaded.

  1. The crashes are more likely to happen when your roster is full, i.e, when you have 25 characters in your class.
  2. The crashes will never happen the first time you click on the roster once you load a game. They can only happen from then on.
  3. The engine is 15 years old. And last I tried, the game was working fine on windows 8.1, windows 10 is the issue.
  4. The game is stable on native d3d9, but it runs on 1 fps on high poly load.
  5. The way to replicate the crash is to load a game with 25 characters in class, and keep spamming roster like 20 times, just opening it and closing it. Then ending the day, and in the morning period doing the same again. Then starting the day by ending that period, and pressing the roster a couple more times. It may sound excessive, but all of this naturally happens if you play the game for like 30minutes, which means that the game is guaranteed to crash if you just play normally.
  6. DXVK version 1.6.1, and also 1.7 are very unstable with this game. To replicate a crash, it is enough to click on the roster less than 5 times in total, and the crash will happen. The log returns these errors:
warn:  ConvertFormat: Unknown format encountered: D3D9Format::R16
warn:  ConvertFormat: Unknown format encountered: D3D9Format::AL16

Rhedox gave us a build that included this old PR, and it has somewhat reduced the crash (it now takes effort to crash it if you are aiming to make it crash, and you have to do the steps from 5).)

I spent some time trying to figure out what the earliest time is when we can detect that the game is going to crash. It's here.
unknown
If "AA2Play.exe"+1C23A8 is hit, the game will crash. The same is true for all of the crashes we've been having, from the UI crashes, to the clothing selection/high poly load crashes. Which looks like:

iVar3 = D3DXCreateEffect(param_1[1],&DAT_00766680,0x7a4,0,0,2,0,ppiVar1,0);
  if (iVar3 < 0) {
    FUN_00402770(local_cc);
                    /* WARNING: Subroutine does not return */
    __CxxThrowException@8(local_cc,&DAT_0073e158);
  }

The closest I could manage to narrow it down is this
unknown (1)
Somewhere d3dx9_42.D3DXCreateEffectEx fucks up, and that's what's causing the issues.

Here's an apitrace from when it doesn't crash.

BBlisto91 2022-07-23 github

@Arkblade2015 @k4yf0ur Friendly ping. Are you still having this issue with latest dxvk?

AArkblade2015 2023-07-03 github

The latest dxvk (actually 2.0 or later) no longer has these frequent crashes.
But there is another (and one that is of great concern in this type of game) z-fighting like issue.

BBlisto91 2023-07-03 github

Open a new issue please since that's easier to track. Remember to try and get a apitrace of the issue and if you could show it in a screenshot or video that would also be nice 🙂

But you're saying this original crash issue solved? 👀

AArkblade2015 2023-07-05 github

yes, original crash issue seem to solved.
i will prepare a report on the new issue in a separate.

Nothing extracted yet.