RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.47k stars 1.92k forks source link

[BLUS31194] Armored Core: Verdict Day access memory violation crash (120$ bounty) #13546

Open paschool opened 1 year ago

paschool commented 1 year ago

Quick summary

with the use of llvm ppu decoder, the game hit playable 30 fps in average. however, every end of the mission. the game crashed due to the access memory violation

Details

Using llvm ppu decoder, the game hit playable performance at 30 fps. however, every end of the test mode, story mission, and free battle match. there is an extremely high chance the game crashed due to the access memory violation. (·F 0:03:37.674324 {PPU[0x1000000] Thread (main_thread) [0x012e6648]} VM: Access violation writing location 0x0 (unmapped memory)), Screenshot 2023-03-13 173907 there is a low chance, however, that the game bypassed the access memory and finishing mission. but I find it difficult to reproduce it because of the extremely low chance of it happening.

opengl settings decrease the chance of the game crashing, but the crash will still happen after few games. and opengl slows the graphics loading in the game

the only possible fix is by enabling libaudio.sprx. in the firmware libraries. however, it results in no audio and the fix only works for a mission that does not trigger cutscenes ( for example, AC test mode and mission 1-1. missions that trigger a cutscene in the middle of a mission will not happen and players are unable to complete the mission)and the downsides are the mission takes longer to finish. otherwise, the game will be loading forever.

Attach a log file

RPCS3.log.gz (access memory violation crash log)

Attach capture files for visual issues

No response

System configuration

Other details

this is my first time reporting game issues. I'm very sorry if I had a mistake during the writing of this report.

diabloterrorgf commented 1 year ago

I've tried every mutagen to see if anything stops the crashing. It's strictly related to PPU LLVM or libaudio. Logs seem to indicate Dantelion 2 panic from FMOD over the resource of gat_loop3.wav.

RPCS3_2.zip

diabloterrorgf commented 1 year ago

Removed gat_loop3.wav and it just crashes on another wav(technically a mp3). Same FMOD error message

·! 0:03:06.341081 {PPU[0x1000000] Thread (main_thread) [0x0018fe60]} sys_tty: sys_tty_write(): “FMODのCallback内でメモリ確保に失敗しました。type:4194308 HeapId: 4123 allocSize: 74008 FreeSize: 485280 MaxFree: 31744 fmodsourcefile:

paschool commented 1 year ago

it could be a libaudio error, the game seems to rely on audio for triggering cutscenes and other events. i might try to look further for this

paschool commented 1 year ago

I've tried every mutagen to see if anything stops the crashing. It's strictly related to PPU LLVM or libaudio. Logs seem to indicate Dantelion 2 panic from FMOD over the resource of gat_loop3.wav.

RPCS3_2.zip

can you give us the directory of the file of the gat_loop3 wav, im having difficulties finding it

diabloterrorgf commented 1 year ago

It is stored and compressed inside the binder archive. As I said, it isnt just that file. I tried removing more and more of them but it will just crash on different mp3s loaded into fmod.

3002736585 is the FSB that wav sits in. Can open the Binder with SFExtractor and open the fsb with any fmod tool. DSSI is only tool that can replace and you must remove SYNC padding from the fsb for DSSI to not fail..

On Mon, Apr 24, 2023, 23:01 paschool @.***> wrote:

I've tried every mutagen to see if anything stops the crashing. It's strictly related to PPU LLVM or libaudio. Logs seem to indicate Dantelion 2 panic from FMOD over the resource of gat_loop3.wav.

RPCS3_2.zip https://github.com/RPCS3/rpcs3/files/11229793/RPCS3_2.zip

can you give us the directory of the file of the gat_loop3 wav, im having difficulties finding it

— Reply to this email directly, view it on GitHub https://github.com/RPCS3/rpcs3/issues/13546#issuecomment-1520217449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZYSPZ4EP73QH6PJMHXH63XC2BT3ANCNFSM6AAAAAAVY5OBYU . You are receiving this because you commented.Message ID: @.***>

diabloterrorgf commented 1 year ago

https://app.bountysource.com/issues/120181167-blus31194-armored-core-verdict-day-access-memory-violation-crash

BS posted to inspire fix before AC6's launch. ACV also has a similar issue still.

ghost commented 1 year ago
WarpZephyr commented 1 year ago

It is stored and compressed inside the binder archive. As I said, it isnt just that file. I tried removing more and more of them but it will just crash on different mp3s loaded into fmod. 3002736585 is the FSB that wav sits in. Can open the Binder with SFExtractor and open the fsb with any fmod tool. DSSI is only tool that can replace and you must remove SYNC padding from the fsb for DSSI to not fail.. On Mon, Apr 24, 2023, 23:01 paschool @.> wrote: I've tried every mutagen to see if anything stops the crashing. It's strictly related to PPU LLVM or libaudio. Logs seem to indicate Dantelion 2 panic from FMOD over the resource of gat_loop3.wav. RPCS3_2.zip https://github.com/RPCS3/rpcs3/files/11229793/RPCS3_2.zip can you give us the directory of the file of the gat_loop3 wav, im having difficulties finding it — Reply to this email directly, view it on GitHub <#13546 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZYSPZ4EP73QH6PJMHXH63XC2BT3ANCNFSM6AAAAAAVY5OBYU . You are receiving this because you commented.Message ID: @.>

SFExtractor is a program I made, but TKGP (JKAnderson on github) provided me with DVDUnbinder a little while ago and a hash dictionary for the names, I need to clean up ACV's names a bit, but Ive made improvements to ACVD's DVDUnbinder is much better and will get you the majority of important names and directories, should get almost if not all FMODs

ACVD has this same issue I removed the SYNC thing and it still fails, the SYNC thing is related to a flag I believe FSBExt calls netstream, or the ability to stream on the internet (for some reason)

The sample count can be set to 0 and avoid crashing, but that also means weapons have no sounds, people have resorted to replacing se_weapon.fsb in the DLC install folder that game loads with another working FMOD

Also the game can be somewhat patched to load loose files out of the Binder archive, it crashes on certain levels, but sure makes testing this FMOD issue easier, as you can access AcTest just fine

game_bind:/ UTF16 strings can be replaced with game:/bind/ to make them loose load, this means you do have to put them in an extra bind folder though, but its easier than moving the rest of the string it is attached to

lokxii commented 5 months ago

May I know are there any updates to this?

diabloterrorgf commented 5 months ago

May I know are there any updates to this?

There is a work around for now. You need to replace one of the sound banks in the files. Join the The AC discord and check the pins in ACVD or Fromsoft modding discord and ask a person named Natsuki.

Edit: AC Discord link to guide: https://discord.com/channels/275811274804428801/1121038697366835241/1122737411848421387

lokxii commented 5 months ago

Well I have several issues with the guides

  1. I am on Mac
  2. I only have the Japanese version of the game BLJM61014
  3. I don't have the DLC

I found someone distributing an ACVD pack (ACVD Unbound?) which includes a pre setup old rpcs3 for windows and the game iso. I don't think using that is a good solution nor a good work around for the problem. So I think I will wait for problem to be solved.

For reference, the game also crashed right before the cutscene into the first mission. Enabling /dev_flash/sys/internal/libfs_utility_init.sprx fixes the bug, but the game still crashes after the cutscene at the end of first mission.

diabloterrorgf commented 5 months ago

There is a special version of the emulator in the discord that fixed cutscene crashes

On Fri, Jun 7, 2024, 01:45 lokxii @.***> wrote:

Well I have several issues with the guides

  1. I am on Mac
  2. I only have the Japanese version of the game BLJM61014
  3. I don't have the DLC

I found someone distributing an ACVD pack (ACVD Unbound?) which includes a pre setup old rpcs3 for windows and the game iso. I don't think using that is a good solution nor a good work around for the problem. So I think I will wait for problem to be solved.

For reference, the game also crashed right before the cutscene into the first mission. Enabling /dev_flash/sys/internal/libfs_utility_init.sprx fixes the bug, but the game still crashes after the cutscene at the end of first mission.

— Reply to this email directly, view it on GitHub https://github.com/RPCS3/rpcs3/issues/13546#issuecomment-2152970475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZYSP5TGZPIETFITWHK3JTZGCGZFAVCNFSM6AAAAAAVY5OBYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSHE3TANBXGU . You are receiving this because you commented.Message ID: @.***>

lokxii commented 5 months ago

There is a special version of the emulator in the discord that fixed cutscene crashes

if that can be run on Mac...

diabloterrorgf commented 5 months ago

You would just need to ask the changes or run it through the translation layer. My friend's M1 plays some games using the windows client. ACVD is probably a step too far though.

On Fri, Jun 7, 2024, 23:50 lokxii @.***> wrote:

There is a special version of the emulator in the discord that fixed cutscene crashes

if that can be ran on Mac...

— Reply to this email directly, view it on GitHub https://github.com/RPCS3/rpcs3/issues/13546#issuecomment-2155002815, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZYSP5PQOPKEZ54YXOQ2NDZGHCCBAVCNFSM6AAAAAAVY5OBYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGAYDEOBRGU . You are receiving this because you commented.Message ID: @.***>

lokxii commented 5 months ago

I wonder why aren't the fixes merged to upstream rpcs3

WarpZephyr commented 5 months ago

I wonder why aren't the fixes merged to upstream rpcs3

They aren't fixes to RPCS3 itself.
It's a temporary fix because something is wrong in the emulator I assume.
se_weapon.fsb seems to cause problems, and we have been fixing it using dud replacements that are larger.
I recently got ACV's issue with it fixed in a better way by adding 20,000,000 (20MB) null bytes to the file.

I haven't tested that one on ACVD yet but I bet it work better.
I am known as Natsu on the AC discord and I do a lot of modding for the older AC games, including AC4, ACFA, ACV, ACVD.
You can head to the AC discord linked on reddit, or to ?ServerName? which is a FromSoftware modding server and I can answer any questions you might have probably. Another person you could ask in the AC discord is Extra Crispy, they have learned a lot about modding ACV and ACVD too.

The fix is easiest to apply when the game is loose loaded. The community is calling the loose load "ACVD Unbound".
The game is packed into a special archive FromSoftware uses normally which is a huge pain to deal with. Thankfully it can be repacked in this game without patches to the executable since it doesn't use encryption (or just loose loaded).

If you want to unpack ACV or ACVD you can use a tool on my github called DVDUnbinder, the version is DarkSouls1 (its a enum).

WarpZephyr commented 5 months ago

There is a special version of the emulator in the discord that fixed cutscene crashes

That was with ACFA, and it is not a special version of the emulator.
It's just an older version of RPCS3 that might work better, but might not.
The "packs" on the server are just RPCS3 releases configured to more quickly get new people setup.

WarpZephyr commented 5 months ago

It is stored and compressed inside the binder archive. As I said, it isnt just that file. I tried removing more and more of them but it will just crash on different mp3s loaded into fmod. 3002736585 is the FSB that wav sits in. Can open the Binder with SFExtractor and open the fsb with any fmod tool. DSSI is only tool that can replace and you must remove SYNC padding from the fsb for DSSI to not fail.. On Mon, Apr 24, 2023, 23:01 paschool @._> wrote: I've tried every mutagen to see if anything stops the crashing. It's strictly related to PPU LLVM or libaudio. Logs seem to indicate Dantelion 2 panic from FMOD over the resource of gat_loop3.wav. RPCS3_2.zip https://github.com/RPCS3/rpcs3/files/11229793/RPCS3_2.zip can you give us the directory of the file of the gatloop3 wav, im having difficulties finding it — Reply to this email directly, view it on GitHub <#13546 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZYSPZ4EP73QH6PJMHXH63XC2BT3ANCNFSM6AAAAAAVY5OBYU . You are receiving this because you commented.Message ID: @_._>

SFExtractor is a program I made, but TKGP (JKAnderson on github) provided me with DVDUnbinder a little while ago and a hash dictionary for the names, I need to clean up ACV's names a bit, but Ive made improvements to ACVD's DVDUnbinder is much better and will get you the majority of important names and directories, should get almost if not all FMODs

ACVD has this same issue I removed the SYNC thing and it still fails, the SYNC thing is related to a flag I believe FSBExt calls netstream, or the ability to stream on the internet (for some reason)

The sample count can be set to 0 and avoid crashing, but that also means weapons have no sounds, people have resorted to replacing se_weapon.fsb in the DLC install folder that game loads with another working FMOD

Also the game can be somewhat patched to load loose files out of the Binder archive, it crashes on certain levels, but sure makes testing this FMOD issue easier, as you can access AcTest just fine

game_bind:/ UTF16 strings can be replaced with game:/bind/ to make them loose load, this means you do have to put them in an extra bind folder though, but its easier than moving the rest of the string it is attached to

This message is also somewhat outdated, I didn't know the game supported loose load out of the box at the time as long as the header of the main archive was hidden (Thanks Wulf2k). The files need to be unpacked and moved around though.