libretro / LRPS2

GNU General Public License v2.0
159 stars 47 forks source link

Loading 7z compressed ISO fails #148

Open obbardc opened 2 years ago

obbardc commented 2 years ago

PCSX2 version:

latest development HEAD 9ebb8710e749a63d68b0651278b41efdb171f332 with retroarch 1.9.9

PCSX2 options:

none

Plugins used:

none

Description of the issue:

Loading a PS2 ISO contained in a compressed 7z archive fails to load, instead launches a blank window and crashes.

$ flatpak run org.libretro.RetroArch
[INFO] RetroArch 1.9.9 (Git 3688861)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Sep  6 2021
[INFO] Version: 1.9.9
[INFO] Git: 3688861
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ 960x720
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 3840x2160.
[INFO] [GLX]: Window manager is Xfwm4.
[INFO] [GLX]: X = 0, Y = 0, W = 960, H = 720.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) UHD Graphics 620 (WHL GT2).
[INFO] [GL]: Version: 3.0 Mesa 21.1.4 (git-ac105a8e6e).
[INFO] [GL]: Using resolution 960x720
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 24576.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_favorites.lpl].
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [PulseAudio]: Pausing.
[INFO] [CONTENT LOAD]: Updating firmware status for: /home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/cores/pcsx2_libretro.so on /home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/system
[INFO] [CORE]: Using content: /home/obbardc/Downloads/Gran Turismo 4 (USA).7z.
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 3.
[INFO] [XINERAMA]: Saved monitor #2.
[INFO] [Video]: Average monitor Hz: 59.815767 Hz. (19.606 % frame time deviation, based on 2048 last samples).
[INFO] RetroArch 1.9.9 (Git 3688861)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Sep  6 2021
[INFO] Version: 1.9.9
[INFO] Git: 3688861
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Core]: Loading dynamic libretro core from: "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/cores/pcsx2_libretro.so"
[INFO] [Overrides]: No core-specific overrides found at "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/config/pcsx2 (alpha)/pcsx2 (alpha).cfg".
[INFO] [Overrides]: No content-dir-specific overrides found at "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/config/pcsx2 (alpha)/Downloads.cfg".
[INFO] [Overrides]: No game-specific overrides found at "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/config/pcsx2 (alpha)/Gran Turismo 4 (USA).cfg".
[INFO] [Environ]: SET_SUPPORT_NO_GAME: yes.
[INFO] [Remaps]: Remap directory: "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/config/remaps".
[INFO] [Overrides]: Redirecting save file to "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/saves/Gran Turismo 4 (USA).srm".
[INFO] [Overrides]: Redirecting save state to "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/states/Gran Turismo 4 (USA).state".
[INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Environ]: GET_MESSAGE_INTERFACE_VERSION.
[INFO] [Environ]: SYSTEM_DIRECTORY: "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/system".
[INFO] [Environ]: GET_SAVE_DIRECTORY.
[libretro INFO] Bios Found: USA     v01.60(07/02/2002)  Console
[INFO] [Environ]: GET_CORE_OPTIONS_VERSION.
[INFO] [Environ]: SET_CORE_OPTIONS.
[libretro INFO] Applying preset n: 1
[libretro INFO] Reserving memory for recompilers...
[libretro INFO] (FileMcd) Creating new 8MB memory card: /home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/saves/pcsx2/Slot 1/Shared Memory Card (8 MB).ps2
[INFO] [Environ]: SET_DISK_CONTROL_EXT_INTERFACE.
[INFO] [CONTENT LOAD]: Content loading skipped. Implementation will load it on its own.
[libretro INFO] Loading selected BIOS:  /home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/system/pcsx2/bios/scph39001.bin
[INFO] [Environ]: SYSTEM_DIRECTORY: "/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/system".
[libretro INFO] Bios Found: USA     v01.60(07/02/2002)  Console
[libretro INFO] Detected BIOS: USAv01.60(07/02/2002)Console 
[libretro INFO] HLE Notice: ELF does not have a path.
[libretro INFO] Closing GS
[libretro WARN] Patches: No CRC found, using 00000000 instead.
[libretro INFO] Game Loaded
[INFO] [Environ]: GET_RUMBLE_INTERFACE.
[INFO] [Environ]: SET_CONTROLLER_INFO.
[libretro INFO] options renderer: Auto
[INFO] [Environ]: GET_PREFERRED_HW_RENDER, video driver name: gl.
[INFO] [Environ]: GET_PREFERRED_HW_RENDER - Context callback set to RETRO_HW_CONTEXT_OPENGL.
[INFO] [Environ]: SET_HW_RENDER, context type: glcore.
[INFO] Requesting core OpenGL context (3.3).
[INFO] Reached end of SET_HW_RENDER.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48048.00 Hz.
[INFO] [Video]: Video @ 1439x1080
[INFO] [Video]: Using HW render, glcore driver forced.
[INFO] [Video]: "gl" saved as cached driver.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GLCore]: Found GL context: x
[INFO] [GLCore]: Detecting screen resolution 3840x2160.
[INFO] [GLX]: Window manager is Xfwm4.
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 3.
[INFO] [GLX]: Using Xinerama on screen #2.
[INFO] [GLX]: X = 0, Y = 0, W = 1439, H = 1080.
[INFO] [GLX]: Creating context for requested version 3.3.
[INFO] [GLX]: Creating shared HW context.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GLCore]: Initializing HW render (1024 x 1024).
[INFO] [GLCore]: Max texture size: 16384 px, renderbuffer size: 16384 px.
[INFO] [GLCore]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) UHD Graphics 620 (WHL GT2).
[INFO] [GLCore]: Version: 4.6 (Core Profile) Mesa 21.1.4 (git-ac105a8e6e).
[INFO] [GLCore]: Using resolution 1439x1019
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [GLCore]: Loading stock shader.
[INFO] [slang]: Building pass #0 (N/A)
[INFO] [GLCore]: Not using frame history.
[INFO] [GLCore]: Not using framebuffer feedback.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Found display server: x11
[libretro INFO] Selected Renderer: OGL_HW
OpenGL information. GPU: Mesa DRI Intel(R) UHD Graphics 620 (WHL GT2). Vendor: Intel Open Source Technology Center. Driver: (Core Profile) Mesa 21.1.4 (git-ac105a8e6e)
INFO: GL_ARB_sparse_texture is NOT SUPPORTED
INFO: GL_ARB_sparse_texture2 is NOT SUPPORTED
INFO: GL_ARB_gpu_shader5 is available
INFO: GL_ARB_shader_image_load_store is available
INFO: GL_ARB_compute_shader is available
INFO: GL_ARB_shader_storage_buffer_object is available
INFO: GL_ARB_texture_view is available
INFO: GL_ARB_vertex_attrib_binding is available
INFO: GL_ARB_clear_texture is available
INFO: GL_ARB_multi_bind is available
INFO: GL_ARB_direct_state_access is available
INFO: GL_ARB_texture_barrier is available
INFO: GL_ARB_get_texture_sub_image is available
[libretro INFO] Launching with Renderer:OpenGL
[libretro ERROR] No extenstion supported to get available memory. Use default value !
[libretro ERROR] Available VRAM/RAM:3840MB for textures
GSdx Lookup CRC:00000000
[libretro INFO] isoFile open ok: /home/obbardc/Downloads/Gran Turismo 4 (USA).7z
[libretro INFO] Image type  = Audio CD
[libretro ERROR] isoFile: Invalid layer0 Primary Volume Descriptor
[libretro INFO]  * CDVD Disk Open: DVD, Single layer or unknown:
[libretro INFO]  * * Track 1: Data (Mode 1) (1718903 sectors)
[libretro ERROR] (IsoFS) Invalid partition descriptor encountered at block 0x10: 'x�'�X�'
GSdx Lookup CRC:00000000
[libretro INFO] Closing GS
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 24576.
[INFO] [Display]: Found display driver: "glcore".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_favorites.lpl].
[INFO] [Playlist]: Written to playlist file: /home/obbardc/.var/app/org.libretro.RetroArch/config/retroarch/content_history.lpl
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.

How to reproduce the issue:

Launch the core with a 7z compressed ISO.

Last known version to work:

none

PC specifications:

see log

Sanaki commented 2 years ago

Looks like you attempted to load the 7z directly, presumably via command line. 7z isn't a supported extension of the core, so this is somewhat expected from any unsupported random data. The only real improvement possible would be gracefully exiting rather than crashing. There's a reason the frontend wouldn't allow this by default. The only supported compressed formats for the core (in order of general preference) are chd, cso, and gz. Of those, gz will have to produce an index on run to allow direct seeking, and it'll run slower than the other two.

While retroarch theoretically could load the file via browse by extracting it to cache to be run, in practice this isn't advisable (or often even functional) for any optical images, especially with ones the size of PS2's DVDs. I recommend converting to chd if you want to use compressed files.