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

CHD files don't work when using the FileProvider API from a frontend application #18919

Closed
2 of 5 tasks
leonstyhre opened this issue Mar 8, 2024 · 7 comments
Closed
2 of 5 tasks

Comments

@leonstyhre
Copy link

Game or games this happens in

All games

What area of the game / PPSSPP

When launching games from the ES-DE Frontend using the FileProvider API everything works fine, except when launching CHD files. If I use SAF URIs instead then everything works fine on my devices, but some people have reported weird/random issues with this mechanism on some devices so it would be really nice to be able to switch to the FileProvider API as the default.

What happens when attempting to launch CHD files using the FileProvider API is that the message "Could not load game. Unknown file type:" is displayed inside PPSSPP, followed by the file/content URI.

Do you perhaps have some specific logic in place to handle CHD files differently than other file formats, which could explain the behavior? PPSSPP is the only emulator I have come across that behaves like this so I don't think there is anything on my side that is causing the issue.

Many thanks in advance!

What should happen

CHD files should launch correctly when using the FileProvider API in the same way as they do when using SAF URIs.

Logs

No response

Platform

Android

Mobile device model or graphics card (GPU)

All devices

PPSSPP version affected

v1.17.1 (regular and Gold)

Last working version

No response

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@leonstyhre
Copy link
Author

leonstyhre commented Mar 8, 2024

And btw, I did not test the latest Git build, it seems like the buildbot system is not responding so I couldn't get hold of the latest build.

There is also this issue but it's not clear to me whether this is the same problem?
#18884

@GlazedBelmont
Copy link

GlazedBelmont commented Mar 8, 2024

Went ahead and built latest commit of PPSSPP, when using %ROMPROVIDER% in ES-DE, this is what I get with .chd files (created with createdvd)

Android 13
Odin 2
Roms on external storage

image

@GlazedBelmont
Copy link

Here's the log of what happens the game is launched

03-08 17:47:00.667 10255 10255 I PpssppActivity: Found Shortcut Parameter in data: content://org.es_de.frontend.files/root/storage/30FC-BE41/Games/psp/Jeanne%20d'Arc.chd
03-08 17:47:00.669 10255 10255 I PPSSPP  : EARLY: NativeApp.setDisplayParameters(1920 x 1025, dpi=369, refresh=60.00)
03-08 17:47:00.669 10255 10255 I PPSSPP  : EARLY: RecalcDPI: display_xres=1920 display_yres=1025 pixel_xres=1920 pixel_yres=1080
03-08 17:47:00.669 10255 10255 I PPSSPP  : EARLY: RecalcDPI: g_dpi=369.000000 g_dpi_scale_x=0.650406 g_dpi_scale_y=0.650406 dp_xres=1248 dp_yres=666
03-08 17:47:00.670 10255 10255 D PPSSPPNativeActivity: Landscape: true
03-08 17:47:00.675 10255 10255 I PPSSPPNativeActivity: Ext storage: mounted /storage/emulated/0
03-08 17:47:00.675 10255 10255 I PPSSPPNativeActivity: Ext files dir: /storage/emulated/0/Android/data/org.ppsspp.ppsspp/files
03-08 17:47:00.675 10255 10255 I PPSSPPNativeActivity: getSdCardPaths: Attempting fallback
03-08 17:47:00.676 10255 10255 I PPSSPPNativeActivity: SD card: /storage/30FC-BE41
03-08 17:47:00.676 10255 10255 I PPSSPPNativeActivity: End of storage paths
03-08 17:47:00.676 10255 10255 I PPSSPP  : NativeApp.init() -- begin
03-08 17:47:00.680 10255 10255 I PPSSPP  : NativeApp.init(): device name: 'AYN:Odin2'
03-08 17:47:00.680 10255 10255 I PPSSPP  : Additional storage: /storage/30FC-BE41
03-08 17:47:00.680 10255 10255 I PPSSPP  : Additional storage: /storage/30FC-BE41
03-08 17:47:00.680 10255 10255 I PPSSPP  : Additional storage: /storage/30FC-BE41
03-08 17:47:00.680 10255 10255 I PPSSPP  : Additional storage: /storage/30FC-BE41
03-08 17:47:00.680 10255 10255 I PPSSPP  : NativeApp.init(): External storage path: /storage/emulated/0
03-08 17:47:00.680 10255 10255 I PPSSPP  : NativeApp.init(): Launch shortcut parameter: "content://org.es_de.frontend.files/root/storage/30FC-BE41/Games/psp/Jeanne%20d'Arc.chd"
03-08 17:47:00.680 10255 10255 I PPSSPP  : EARLY: ThreadManager::Init(compute threads: 8, all: 16)
03-08 17:47:00.683 10255 10255 I PPSSPP  : EARLY: Reading '/data/user/0/org.ppsspp.ppsspp/files/memstick_dir.txt' to find memstick dir.
03-08 17:47:00.685 10255 10255 I PPSSPP  : EARLY: Memstick Directory from memstick_dir.txt: 'content://com.android.externalstorage.documents/tree/30FC-BE41%3Appsspp/document/30FC-BE41%3Appsspp'
03-08 17:47:00.762 10255 10255 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (Initialize)
03-08 17:47:00.762 10255 10255 I PPSSPPNativeActivity: OpenGL ES 3.0 detected.
03-08 17:47:00.763 10255 10255 I PPSSPPNativeActivity: InfraredHelper exception: java.lang.Exception: No Ir Emitter
03-08 17:47:00.764 10255 10255 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onCreate)
03-08 17:47:00.765 10255 10255 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
03-08 17:47:00.765 10255 10255 I NativeSurfaceView: NativeSurfaceView
03-08 17:47:00.767 10255 10255 I NativeSurfaceView: MOGA initialized
03-08 17:47:00.767 10255 10255 I PPSSPPNativeActivity: setcontentview before
03-08 17:47:00.768 10255 10255 I PPSSPPNativeActivity: setcontentview after
03-08 17:47:00.768 10255 10255 W PPSSPPNativeActivity: startRenderLoopThread - not starting thread, needs surface
03-08 17:47:00.769 10255 10255 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onResume)
03-08 17:47:00.769 10255 10255 I PPSSPPNativeActivity: onResume
03-08 17:47:00.779 10255 10255 W PPSSPPNativeActivity: startRenderLoopThread - not starting thread, needs surface
03-08 17:47:00.782 10255 10255 I PPSSPPNativeActivity: onAttachedToWindow
03-08 17:47:00.786 10255 10255 W PPSSPPNativeActivity: startRenderLoopThread: Starting thread
03-08 17:47:00.786 10255 10255 I PPSSPPNativeActivity: Setting desired framerate to 60.0 Hz method=1
03-08 17:47:00.891 10255 13774 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
03-08 17:47:00.918 10255 13785 I PPSSPP  : [BOOT] PPSSPP v1.17.1-35-g0159102a1
03-08 17:47:00.922 10255 13785 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
03-08 17:47:00.923 10255 13785 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
03-08 17:47:00.924 10255 13785 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
03-08 17:47:00.928 10255 13785 E PpssppActivity: openContentUri exception: java.lang.IllegalArgumentException: Failed to determine if 30FC-BE41:ppsspp/PSP/SYSTEM/compat.ini is child of 30FC-BE41:ppsspp: java.io.FileNotFoundException: Missing file for 30FC-BE41:ppsspp/PSP/SYSTEM/compat.ini at /storage/30FC-BE41/ppsspp/PSP/SYSTEM/compat.ini
03-08 17:47:00.929 10255 13785 I PPSSPP  : [G3D] UnitsPerMeter for HOME00000: 0.000000
03-08 17:47:00.931 10255 13785 E PpssppActivity: openContentUri exception: java.lang.IllegalArgumentException: Failed to determine if 30FC-BE41:ppsspp/PSP/SYSTEM/compatvr.ini is child of 30FC-BE41:ppsspp: java.io.FileNotFoundException: Missing file for 30FC-BE41:ppsspp/PSP/SYSTEM/compatvr.ini at /storage/30FC-BE41/ppsspp/PSP/SYSTEM/compatvr.ini
03-08 17:47:00.941 10255 13785 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
03-08 17:47:00.941 10255 13785 E PPSSPP  : [LOADER] Unknown file type: content://org.es_de.frontend.files/root/storage/30FC-BE41/Games/psp/Jeanne%20d'Arc.chd ()
03-08 17:47:00.941 10255 13785 E PPSSPP  : [SCEKERNEL] Can't shut down kernel - not running
03-08 17:47:00.942 10255 13785 E PPSSPP  : [BOOT] InitStart bootGame error: Unknown file type: content://org.es_de.frontend.files/root/storage/30FC-BE41/Games/psp/Jeanne%20d'Arc.chd

@hrydgard
Copy link
Owner

#18924 probably fixes this. Please re-open if not.

@GlazedBelmont
Copy link

I can confirm it works now, thanks!

@leonstyhre
Copy link
Author

@hrydgard Thanks for fixing it so quickly!

@hrydgard
Copy link
Owner

No problem, thanks for testing, glad it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants