cemu-project / Cemu

Cemu - Wii U emulator
https://cemu.info
Mozilla Public License 2.0
7.23k stars 589 forks source link

crash at Zelda BotW splash screen #605

Closed anon8948 closed 1 year ago

anon8948 commented 1 year ago

TLDR: see below for crash log (backtrace) and read on for steps and info

Systems tested:

Zelda Breath of the Wild

Other games work fine (like Captain Toad and Mario Kart 8) and smooth with a good framerate. But Zelda BotW's splash screen causes Cemu to crash. Tried lots of Cemu versions, both native Windows and native Linux but also Wine versions, I tried 1.11.0, 1.21.4, 1.27.1, 2.0-7 and 2.0-25, and also compiled one from source. All of them crashed at the Zelda splash screen, even though other games worked fine.

I tried this on 2 systems, a Linux desktop PC with a Ryzen 5700G processor, and a Windows laptop with a Ryzen 5700U processor. The result was the same. Most games work fine, but Zelda BotW crashes at the splash screen. Game data verified, no changes, no mods, no graphics packs. The same game data works fine on a real WiiU (dumped disc). Whether the DLC was installed or not didn't seem to matter. (I also tried using the game and update files from the eShop, but the same crash occurred.) Tried OpenGL and Vulkan, both crash. It seems it doesn't have to do with graphics, either.

Even more interesting, when I turned on file access logging I saw the game tried to access certain files (3 files in this case, from the game's UPDATE content files) before the crash. So, just as an experiment, I did something that I shouldn't do: I checked if the GAME's content folder had those files as well, and used those, by copying them to the same place in the UPDATE's content folder:

content/Terrain/A/MainField.tscb content/Sound/DummySound.bfsar content/Sound/Resource/Stream/Event_Demo169_0_Seal.bfstm

Replacing just one didn't help, so I replaced them all. Again, note that the (original) files were verified, so this was just for debugging purposes.

After this, Cemu didn't crash but I couldn't advance. The game showed some intro texts and gets to the "open your eyes" scene, but then it hangs while showing a white/yellow screen. In certain unofficial Cemu guides I read this is because the game's update is not properly installed. Well, in a sense that's applicable because I replaced 3 files just to get past the crash. (I do have the update of course, and I tested that before mucking around.) So we're back to the main issue I guess, which is to see if we can fix the crash in a clean/proper way.

Hence, I reverted my changes and compiled Cemu, to see where it crashes. Below is the backtrace where Cemu crashes at the BotW splash screen.

I'm not sure what is so different about my system, since it seems that Cemu is clearly capable of emulating BotW just fine on other systems. What could be going wrong here? It seems graphics aren't the issue. And I verified the game data. So what else could this be? I hope this can be fixed. I can't be the only one having this issue. :-)

--> Cemu log file.txt

This is the backtrace from gdb:

#0  0x00000000005f0517 in PPCItpCafeOSUsermode::ppcMem_readDataU32(PPCInterpreter_t*, unsigned int)
    ()
#1  0x00000000005ee612 in PPCInterpreterContainer<PPCItpCafeOSUsermode>::PPCInterpreter_LWZ(PPCInterpreter_t*, unsigned int) ()
#2  0x00000000005e713f in PPCInterpreterContainer<PPCItpCafeOSUsermode>::executeInstruction(PPCInterpreter_t*) ()
#3  0x00000000005e55b5 in PPCInterpreterSlim_executeInstruction(PPCInterpreter_t*) ()
#4  0x00000000008e77c8 in coreinit::__OSFiberThreadEntry(void*) ()
#5  0x00007ffff7a547c0 in ?? () from /lib64/libc.so.6
#6  0x00007ffeb8f32840 in ?? ()
#7  0xdc1f280101010000 in ?? ()
Squall-Leonhart commented 1 year ago

You have a bad dump, or hard disk has bad sectors.

chriztr commented 1 year ago

Redump your game and update. The ones you have now are broken.

anon8948 commented 1 year ago

Found some time to redump it, but I'm having the same crash at the splash screen again, even though the disc works fine in a WiiU. The update data is correct, according to Cemu's integrity verification. I have even re-downloaded the update from the eShop, but again the same crash. (With and without DLC, same result.)

If the dump is bad, I wonder how can Cemu possibly tell me that the integrity verification succeeds? If I modify some bits on purpose, then the verification fails, so it sure seems that the files are indeed correct.

I'm not sure what else it can be, especially considering I've now tried multiple systems (both Linux and Windows), multiple Cemu versions, multiple hard disks, multiple dumps. The only thing there is in common is that I'm using the built-in GPU (Vega 8). However, other games work fine, and with some ugly workarounds I at least got some animations going (but not a workable game) as noted above.

anon8948 commented 1 year ago

Well, I'm not sure what the problem was, but all is working well right now. Still on the same system, with the same "old" Cemu build (2.0-25), but the game works. I just tested it again after I happened to re-install Linux for another reason, and the game works now. Not sure if it's something I'm doing differently or whether it's something else.

Shout out to the Cemu devs, you created a beautiful piece of software.