RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

"Explore" button Crashing Retroarch app on Xbox Series X

Open Xannia945 opened this issue 4 years ago • 3 comments

  • Only RetroArch bugs should be filed here. Not core bugs or game bugs
  • This is not a forum or a help section, this is strictly developer oriented

scrolling over Explore button Crashing RA app on Xbox Series X (retail)

[Description of the bug] after importing content a certain way, whenever scrolling down past Explore button, Retro arch will immediately crash

Expected behavior - I was wanting to import my PS2 ISO's into the quick menu to add thumbnail images

Actual behavior

[Funny rocket ship Image with ps2 instead of Playstation 2 Remote showing up in the quick menu, as well as the app crashing whenever trying to move past the Explore button]

Steps to reproduce the bug

  1. [Import Content > Manual Scan > Set Content directory to : Q:\Users\UserMgr0\AppData\Local\Packages\57243GoldenFox69.RetroArch-UWP4_xj9rf77f6yv4p\LocalState\Games\PS2\ > <Scan This Directory> ]
  2. set System Name to [Sony - Playstation 2]
  3. set Default Core to - Sony Playstation 2 (PCSX2)
  4. After changing those settings I started the scan, and my result looked like this

photo_2021-10-10_16-15-24

  • RetroArch: [version/commit] -1.9.10 msvc2019 - no core (not sure if this is correct, I apologize for my ignorance

Environment information

  • OS: Xbox Series X OS version 10.0.22000.2285 (xb_flt_2109co.210920-1845)

I was shown how to hide the Explore button in the UI settings from a discord help chat, they also requested I make a post here.

Xannia945 avatar Oct 10 '21 21:10 Xannia945

Hey there, thanks for reporting this.

I tried to recreate the PS2 playlist as seen in the screenshot and didn't get a crash on Windows (no Xbox here to test). But it could be some weird database field related to any of your playlists so it's hard to say.

If you have full file access to your Xbox Series X and can upload a ZIP with a copy of everything in the folder <RetroArch >\playlists to this issue here, it would help a lot in diagnosing this. It'll tell us if it's Xbox specific or a problem with some data connection.

Thanks.

schellingb avatar Oct 11 '21 10:10 schellingb

Hello,

I have the same issue as well on a Xbox One X (crashing when navigating to "Explore"). I have attached the files from my playlist folder: playlist.zip

Regards.

dmspot avatar Feb 06 '22 18:02 dmspot

Yo what's up! When this happened to me (i was trying to create Playlists on the Xbox) it was ridiculous. I tried everything. Reset xbox, close all apps ect ect ect. Turns out I created something that was causing the problem when I accidentally chose "scan directly" instead of "manual scan" in "import content" I think. My solution. 1.Choose Settings 2.Choose playlists 3.Manage playlists 4.Choose the Playlist you created. (Probably most recent one you made) 5. Towards the bottom once you have selected the problem Playlist hit "x delete playlist"

Hope this helps!

Dehvey avatar Aug 09 '22 00:08 Dehvey

@Dehvey I'm still looking for help to fix this problem that seems to be specific to Xbox even though nothing about the Explore feature should behave different on just one platform. If you can still reproduce this crash, could you upload all your playlists from your Xbox? I feel like it's a combination of one or more playlists and the installed databases, so the more information I can gather the better I'll be equipped to get to the root of this mysterious crash...

schellingb avatar Aug 21 '22 18:08 schellingb

@Dehvey I'm still looking for help to fix this problem that seems to be specific to Xbox even though nothing about the Explore feature should behave different on just one platform. If you can still reproduce this crash, could you upload all your playlists from your Xbox? I feel like it's a combination of one or more playlists and the installed databases, so the more information I can gather the better I'll be equipped to get to the root of this mysterious crash...

I've managed to reproduce the crash but only after importing all of my playlists which I have attached here: playlists.zip. The issue appears to be related to a read access violation pointing towards Line 537 in the rmsgpack.c file in libretro-db.

Debugging in Visual Studio results in the following error log:

'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\dxilconv.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\D3DSCache.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\profext.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Unloaded 'C:\Windows\System32\dxilconv.dll'
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'M:\windows\system32\newbe_xs.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\MFPalSra.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\Windows.System.UserDeviceAssociation.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryPS.dll'. 
onecoreuap\xbox\devices\api\winrt\gipdevice.cpp(641)\Windows.Gaming.Input.dll!00007FFFAB9DA338: (caller: 00007FFFA43D6BBB) ReturnHr(2) tid(f80) 80070005 Access is denied.
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\AudioSes.dll'. 
'RetroArch-msvc2019-UWP.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. 
onecore\base\AppModel\Runtime\Src\PackagePath.hpp(144)\kernelbase.dll!00007FFFB1F1575D: (caller: 00007FFFB1F1532E) ReturnHr(2) tid(10f8) 80073D5B The package does not have a mutable directory.
Exception thrown: read access violation.
**fd** was nullptr.

TheRhysWyrill avatar Aug 23 '22 14:08 TheRhysWyrill

@TheRhysWyrill In Visual Studio, when the crash happens, does it pause? Can you switch to menu DEBUG -> Windows -> Call Stack, then select the entire list in the "Call Stack" window and copy paste it here?

Oh, btw, thank you so much for this information already!!

schellingb avatar Aug 23 '22 14:08 schellingb

@TheRhysWyrill In Visual Studio, when the crash happens, does it pause? Can you switch to menu DEBUG -> Windows -> Call Stack, then select the entire list in the "Call Stack" window and copy paste it here?

Oh, btw, thank you so much for this information already!!

Basically yeah, RetroArch appears to just completely lock up, here's the information from the Call Stack, here's hoping I've not messed up what you're asking for:

 	[Inline Frame] RetroArch-msvc2019-UWP.exe!rmsgpack_dom_read(RFILE *) Line 418	C
 	RetroArch-msvc2019-UWP.exe!libretrodb_cursor_read_item(libretrodb_cursor * cursor, rmsgpack_dom_value * out) Line 378	C
 	RetroArch-msvc2019-UWP.exe!menu_explore_build_list(const char * directory_playlist, const char * directory_database) Line 599	C
 	RetroArch-msvc2019-UWP.exe!task_menu_explore_init_handler(retro_task * task) Line 149	C
 	RetroArch-msvc2019-UWP.exe!threaded_worker(void * userdata) Line 517	C
 	RetroArch-msvc2019-UWP.exe!thread_wrap(void * data_) Line 144	C
 	[External Code]

TheRhysWyrill avatar Aug 23 '22 15:08 TheRhysWyrill

@schellingb Small update, the good news is that the explore tab no longer crashes RetroArch using the newest RA master but it would appear that the Explore tab is now basically empty as you can see here Screenshot_2022-08-23_19-34-49

TheRhysWyrill avatar Aug 23 '22 18:08 TheRhysWyrill

Ok, cool, thank you for helping out here, finally this was found and fixed.

The Explore view depends on having meta data from the RDB databases. All your playlists are not linked to the databases so there's nothing the Explore view can show.

It depends on how the playlists are generated. Also what databases exist during scanning might affect the outcome I think. For example, the entries in your "Super Nintendo.lpl" have this line:

"db_name": "Super Nintendo.lpl"

To get the explore view to show something, the value of db_name instead should be "Nintendo - Super Nintendo Entertainment System.rdb" or "Nintendo - Super Nintendo Entertainment System.lpl". Ideally the crc32 fields would also be filled out but the Explore view can look up games by name - as long as it knows which database to search in.

This was actually the reason for the crash. The Explore view tried to open an RDB database file named "Super Nintendo" which doesn't exist and then the RDB open code crashed because it didn't handle not existing files correctly on the UWP/Xbox platform.

Hope that clarifies things.

schellingb avatar Aug 25 '22 03:08 schellingb

I had a feeling that it was to do with my playlists not being linked to any databases, just wanted to double check it was intended and not some form of error, certainly sounds like this issue has been solved though, thanks!

TheRhysWyrill avatar Aug 25 '22 09:08 TheRhysWyrill

Can now be closed thankfully.

LibretroAdmin avatar Sep 01 '22 19:09 LibretroAdmin