xenia-project / xenia

Xbox 360 Emulator Research Project
https://xenia.jp
Other
7.86k stars 1.11k forks source link

Mass Effect 2 demo package crashes STFS handling code #1371

Open gibbed opened 5 years ago

gibbed commented 5 years ago
xenia-vfs-dump.exe!xe::load_and_swap<unsigned char>(const void * mem) Line 236
    at src\xenia\base\memory.h(236)
xenia-vfs-dump.exe!xe::vfs::StfsContainerDevice::GetBlockHash(const unsigned char * map_ptr, unsigned int block_index, unsigned int table_offset) Line 606
    at src\xenia\vfs\devices\stfs_container_device.cc(606)
xenia-vfs-dump.exe!xe::vfs::StfsContainerDevice::ReadSTFS() Line 542
    at src\xenia\vfs\devices\stfs_container_device.cc(542)
xenia-vfs-dump.exe!xe::vfs::StfsContainerDevice::Initialize() Line 85
    at src\xenia\vfs\devices\stfs_container_device.cc(85)
xenia-vfs-dump.exe!xe::vfs::vfs_dump_main(const std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > & args) Line 35
    at src\xenia\vfs\vfs_dump.cc(35)

src/xenia/vfs/devices/stfs_container_device.cc#L606 src/xenia/vfs/devices/stfs_container_device.cc#L542 src/xenia/vfs/devices/stfs_container_device.cc#L85

When parsing all file information, eventually encounters an invalid block for the file Opening_End_Seq.bik, which is a fairly large file.

This was not broken with the merge of #1254, problem existed prior. Could be related to #617.

Gliniak commented 1 month ago

Seems to be fixed with: https://github.com/xenia-project/xenia/pull/2216

It still triggers assertions, however game works.

On master probably crashes only due to broken log in stfs code and should also trigger the same assertions as that PR is mostly about moving code instead of modyfing it.