Skip to content
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

SoulCalibur II: Crash on Launch #931

Closed
ThisNekoGuy opened this issue May 18, 2022 · 13 comments · Fixed by #919
Closed

SoulCalibur II: Crash on Launch #931

ThisNekoGuy opened this issue May 18, 2022 · 13 comments · Fixed by #919
Labels
bug Something isn't working

Comments

@ThisNekoGuy
Copy link

ThisNekoGuy commented May 18, 2022

Title

https://xemu.app/titles/4e4d0003/#Soulcalibur-II

Bug Description

Launching SoulCalibur II crashes Xemu; GDB throws a message about what might have caused it?

xemu: ../hw/xbox/nv2a/pgraph.c:6039: void pgraph_update_surface(NV2AState *, _Bool, _Bool, _Bool): Assertion `(pg->color_binding->width == pg->zeta_binding->width) && (pg->color_binding->height == pg->zeta_binding->height)' failed.

Expected Behavior

Attempting to run SoulCalibur II should not crash Xemu

xemu Version

Version: 0.7.13
Branch: master
Commit: 38a0e46
Date: Wed May 18 09:10:05 PM UTC 2022
Compiler: Clang 13.0.1 (Xemu compiled with full LTO)
Compiler flags (via makepkg):

CC=clang
CXX=clang++
LD="/usr/bin/ld.lld"
CC_LD="/usr/bin/ld.lld"
CXX_LD="/usr/bin/ld.lld"
AR="/usr/bin/llvm-ar"
NM="/usr/bin/llvm-nm"
AS="/usr/bin/llvm-as"
RANLIB="/usr/bin/llvm-ranlib"
STRIP="/usr/bin/llvm-strip"
OBJCOPY="/usr/bin/llvm-objcopy"

CFLAGS="-march=znver2 -mtune=znver2 -O3 -pipe -fno-plt -fexceptions -Wall \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
LTOFLAGS="-flto=full"
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="${DEBUG_CFLAGS}"

System Information

CPU: AMD Ryzen 7 3700X 8-Core Processor
OS Platform: Linux
OS Version: Arch Linux
Kernel: Linux 5.17.2-256-tkg-pds-llvm
Manufacturer: NVIDIA Corporation
GPU Model: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Driver: 4.0.0 NVIDIA 510.60.02
Shader: 4.00 NVIDIA via Cg compiler

Additional Context

Compiled via the AUR

GDB core dump - (file size is too big for github)
xemu-SC2-gdb.log

@ThisNekoGuy ThisNekoGuy added the bug Something isn't working label May 18, 2022
@abaire
Copy link
Contributor

abaire commented May 18, 2022

Can you see if #919 changes the behavior here?

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented May 19, 2022

Yes, but then it gets stuck on a few frames, essentially setting it to "starts" status:
Screenshot_20220518_192221
Screenshot_20220518_192423

It's chugging pretty severely, making loud corrupt audio noises along the way

@abaire
Copy link
Contributor

abaire commented May 19, 2022

It looks like it worked with 0.6.2-79-ga32f271d55 (https://xemu.app/titles/4e4d0003/#Soulcalibur-II) can you try that release to see if you have the same performance issues?

@ThisNekoGuy
Copy link
Author

It seems to work fine under that revision :/

@abaire
Copy link
Contributor

abaire commented May 19, 2022

Excellent, can you try the versions in between and see where it stopped working? (I'd do a binary search, start with the version in the middle, then go up or down depending on whether that one works)

Knowing exactly when it regressed will make it much easier to figure out and fix the underlying cause.

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented May 19, 2022

Ironically, it stopped working as of 0.6.3; somewhere in between that testing commit and 0.6.3 the game went from playable to "starts" status

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented May 19, 2022

Correction: even the last 0.6.2 commit (bbcd576) suffered from this; debatably worse, actually, because it couldn't even display the initial namco video before crashing

@abaire
Copy link
Contributor

abaire commented May 19, 2022

Cool, there were a number of changes in the 0.6.3 release (v0.6.2...v0.6.3) that might've introduced the assert, but I'd guess 57795d8 is the most likely candidate as it (correctly) reduced the frequency at which the surfaces are discarded and likely exposed the preexisting buggy behavior.

I'm mostly interested in the performance degradation, to test that we'd need to backport #919 to various versions and see where the perf drops off.

@abaire
Copy link
Contributor

abaire commented May 19, 2022

Correction: even the last 0.6.2 commit (bbcd576) suffered from this

To avoid confusion: "this" meaning the assertion, or the chugging after the point where it asserts on 0.7.13?

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented May 19, 2022

The assertion; I've only seen the chugging with that one commit you had me test for 0.7.13
I've seen something "close" to the chugging along the way but nowhere near as severe; it was pretty ignorable in old revisions but they always end with the assertion

@abaire
Copy link
Contributor

abaire commented May 19, 2022

Gotcha. The assertion really isn't that interesting, the chugging is interesting if you can definitively track down where it started. To avoid confusion here, probably better to just file a new bug (either now if you're able to backport the fix and find where perf started going bad, or once #919 lands and the game can get past the assertion again).

@ThisNekoGuy
Copy link
Author

Honestly, I have somewhat minimal experience for bisecting Lol (I have minimal git experience)
Is there a way to automatically merge the PR with an arbitrary git checkout revision or do I have to do it by hand every time?

@abaire
Copy link
Contributor

abaire commented May 19, 2022

You may be able to cherry-pick or just merge but given how far back you're looking it's possible that the context won't match up and you'll need to hand merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants