libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.06k stars 1.81k forks source link

Bsnes cores crash Android RetroArch immediately on loading content. #12250

Open ghost opened 3 years ago

ghost commented 3 years ago

Description

If you choose any of the bsnes cores and try to load content, RetroArch immediately crashes. Doesn't happen with Snes9x core.

Expected behavior

The content loads.

Actual behavior

RetroArch crashes.

Steps to reproduce the bug

  1. Download and enable one of the bsnes cores.
  2. Try to load content.

Bisect Results

Happens with fresh install as well, and doesn't happen on Windows 10 20H2.

Version/Commit

You can find this information under Information/System Information

Environment information

Log

Log
RetroArch 1.9.1 (Git cf6ca2a)
=== Build =======================================
Capabilities:  NEON VFPv3 VFPv4
[INFO] Built: Mar 28 2021
[INFO] Version: 1.9.1
[INFO] Git: cf6ca2a
[INFO] =================================================
[Input]: Found input driver: "android".
[Environ]: SET_PIXEL_FORMAT: RGB565.
Version of libretro API: 1
[INFO] Compiled against API: 1
[Audio]: Set audio input rate to: 48000.00 Hz.
[Video]: Video @ 960x720
[Video]: Starting threaded video driver ...
Android EGL: GLES version = 2.
[EGL] Falling back to eglGetDisplay
[EGL]: EGL version: 1.4
[GL]: Found GL context: egl_android
[GL]: Detecting screen resolution 0x0.
[EGL]: Current context: 0xe851e400.
[GL]: Vendor: ARM, Renderer: Mali-T830.
[GL]: Version: OpenGL ES 3.2 v1.r28p0-01rel0.###other-sha0123456789ABCDEF0###.
[GL]: Using resolution 720x1280
[GL]: Default shader backend found: glsl.
[Shader driver]: Using GLSL shader backend.
[GL]: Stock GLSL shaders will be used.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GL]: Using 4 textures.
[GL]: Loaded 1 program(s).
[Joypad]: Found joypad driver: "android".
[Font]: Using font rendering backend: stb-unicode.
[Video]: Found display server: android
[OpenSL]: Requested audio latency: 128 ms.[OpenSL]: Setting audio latency: Block size = 960, Blocks = 26, Total = 24960 ...
[Display]: Found display driver: "gl".
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[SRAM]: SRAM will not be saved.
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_history.lpl].
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_music_history.lpl].
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_image_history.lpl].
[Playlist]: Loading favorites file: [/storage/emulated/0/Android/data/com.retroarch/files/content_favorites.lpl].
[Environ]: SET_SUBSYSTEM_INFO.
Subsystem ID: 0
Special game type: Super Game Boy
  Ident: sgb
  ID: 4353
  Content:
    Game Boy ROM (required)
    Super Game Boy ROM (required)
Subsystem ID: 1
Special game type: BS-X Satellaview
  Ident: bsx
  ID: 4368
  Content:
    BS-X ROM (required)
    BS-X BIOS ROM (required)
Subsystems: 2
[CONTENT LOAD]: Updating firmware status for: /data/user/0/com.retroarch/cores/bsnes_libretro_android.so on /storage/emulated/0/RetroArch/system
[CORE]: Using content: /storage/emulated/0/roms/The Legend of Zelda - A Link to the Past.sfc.
[Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[Core]: Unloading core..
[Core]: Unloading core symbols..
Threaded video stats: Frames pushed: 1085, Frames dropped: 0.
RetroArch 1.9.1 (Git cf6ca2a)
=== Build =======================================
Capabilities:  NEON VFPv3 VFPv4
[INFO] Built: Mar 28 2021
[INFO] Version: 1.9.1
[INFO] Git: cf6ca2a
[INFO] =================================================
jni_thread_destruct()
[Input]: Found input driver: "android".
[Core]: Loading dynamic libretro core from: "/data/user/0/com.retroarch/cores/bsnes_libretro_android.so"
[Overrides]: No core-specific overrides found at "/storage/emulated/0/RetroArch/config/bsnes/bsnes.cfg".
[Overrides]: No content-dir-specific overrides found at "/storage/emulated/0/RetroArch/config/bsnes/roms.cfg".
[Overrides]: No game-specific overrides found at "/storage/emulated/0/RetroArch/config/bsnes/The Legend of Zelda - A Link to the Past.cfg".
[Environ]: GET_LOG_INTERFACE.
[Environ]: SET_SUBSYSTEM_INFO.
Special game type: Super Game Boy
  Ident: sgb
  ID: 4353
  Content:
    Game Boy ROM (required)
    Super Game Boy ROM (required)
Special game type: BS-X Satellaview
  Ident: bsx
  ID: 4368
  Content:
    BS-X ROM (required)
    BS-X BIOS ROM (required)
[Environ]: SET_CONTROLLER_INFO.
Controller port: 1
   SNES Joypad (ID: 1)
   SNES Mouse (ID: 2)
Controller port: 2
   SNES Joypad (ID: 1)
   SNES Mouse (ID: 2)
   Multitap (ID: 257)
   SuperScope (ID: 260)
   Justifier (ID: 516)
   Justifiers (ID: 772)
[Environ]: SET_INPUT_DESCRIPTORS:
    RetroPad, Port 1, Button "B (bottom)" => "B"
    RetroPad, Port 1, Button "Y (left)" => "Y"
    RetroPad, Port 1, Button "Select" => "Select"
    RetroPad, Port 1, Button "Start" => "Start"
    RetroPad, Port 1, Button "D-Pad Up" => "D-Pad Up"
    RetroPad, Port 1, Button "D-Pad Down" => "D-Pad Down"
    RetroPad, Port 1, Button "D-Pad Left" => "D-Pad Left"
    RetroPad, Port 1, Button "D-Pad Right" => "D-Pad Right"
    RetroPad, Port 1, Button "A (right)" => "A"
    RetroPad, Port 1, Button "X (up)" => "X"
    RetroPad, Port 1, Button "L" => "L"
    RetroPad, Port 1, Button "R" => "R"
    RetroPad, Port 2, Button "B (bottom)" => "B"
    RetroPad, Port 2, Button "Y (left)" => "Y"
    RetroPad, Port 2, Button "Select" => "Select"
    RetroPad, Port 2, Button "Start" => "Start"
    RetroPad, Port 2, Button "D-Pad Up" => "D-Pad Up"
    RetroPad, Port 2, Button "D-Pad Down" => "D-Pad Down"
    RetroPad, Port 2, Button "D-Pad Left" => "D-Pad Left"
    RetroPad, Port 2, Button "D-Pad Right" => "D-Pad Right"
    RetroPad, Port 2, Button "A (right)" => "A"
    RetroPad, Port 2, Button "X (up)" => "X"
    RetroPad, Port 2, Button "L" => "L"
    RetroPad, Port 2, Button "R" => "R"
    RetroPad, Port 3, Button "B (bottom)" => "B"
    RetroPad, Port 3, Button "Y (left)" => "Y"
    RetroPad, Port 3, Button "Select" => "Select"
    RetroPad, Port 3, Button "Start" => "Start"
    RetroPad, Port 3, Button "D-Pad Up" => "D-Pad Up"
    RetroPad, Port 3, Button "D-Pad Down" => "D-Pad Down"
    RetroPad, Port 3, Button "D-Pad Left" => "D-Pad Left"
    RetroPad, Port 3, Button "D-Pad Right" => "D-Pad Right"
    RetroPad, Port 3, Button "A (right)" => "A"
    RetroPad, Port 3, Button "X (up)" => "X"
    RetroPad, Port 3, Button "L" => "L"
    RetroPad, Port 3, Button "R" => "R"
    RetroPad, Port 4, Button "B (bottom)" => "B"
    RetroPad, Port 4, Button "Y (left)" => "Y"
    RetroPad, Port 4, Button "Select" => "Select"
    RetroPad, Port 4, Button "Start" => "Start"
    RetroPad, Port 4, Button "D-Pad Up" => "D-Pad Up"
    RetroPad, Port 4, Button "D-Pad Down" => "D-Pad Down"
    RetroPad, Port 4, Button "D-Pad Left" => "D-Pad Left"
    RetroPad, Port 4, Button "D-Pad Right" => "D-Pad Right"
    RetroPad, Port 4, Button "A (right)" => "A"
    RetroPad, Port 4, Button "X (up)" => "X"
    RetroPad, Port 4, Button "L" => "L"
    RetroPad, Port 4, Button "R" => "R"
    RetroPad, Port 5, Button "B (bottom)" => "B"
    RetroPad, Port 5, Button "Y (left)" => "Y"
    RetroPad, Port 5, Button "Select" => "Select"
    RetroPad, Port 5, Button "Start" => "Start"
    RetroPad, Port 5, Button "D-Pad Up" => "D-Pad Up"
    RetroPad, Port 5, Button "D-Pad Down" => "D-Pad Down"
    RetroPad, Port 5, Button "D-Pad Left" => "D-Pad Left"
    RetroPad, Port 5, Button "D-Pad Right" => "D-Pad Right"
    RetroPad, Port 5, Button "A (right)" => "A"
    RetroPad, Port 5, Button "X (up)" => "X"
    RetroPad, Port 5, Button "L" => "L"
    RetroPad, Port 5, Button "R" => "R"
[Environ]: SET_VARIABLES.
[Remaps]: Remap directory: "/storage/emulated/0/RetroArch/config/remaps".
[Overrides]: Redirecting save file to "/storage/emulated/0/RetroArch/saves/The Legend of Zelda - A Link to the Past.srm".
[Overrides]: Redirecting save state to "/storage/emulated/0/RetroArch/states/The Legend of Zelda - A Link to the Past.state".
[CONTENT LOAD]: Content loading skipped. Implementation will load it on its own.
[Environ]: GET_VARIABLE bsnes_aspect_ratio:
    Auto
[Environ]: GET_VARIABLE bsnes_blur_emulation:
    OFF
[Environ]: GET_VARIABLE bsnes_hotfixes:
    OFF
[Environ]: GET_VARIABLE bsnes_entropy:
    Low
[Environ]: GET_VARIABLE bsnes_cpu_overclock:
    100
[Environ]: GET_VARIABLE bsnes_cpu_fastmath:
    OFF
[Environ]: GET_VARIABLE bsnes_cpu_sa1_overclock:
    N/A
[Environ]: GET_VARIABLE bsnes_cpu_sfx_overclock:
    N/A
[Environ]: GET_VARIABLE bsnes_ppu_fast:
    ON
[Environ]: GET_VARIABLE bsnes_ppu_deinterlace:
    ON
[Environ]: GET_VARIABLE bsnes_ppu_no_sprite_limit:
    OFF
[Environ]: GET_VARIABLE bsnes_ppu_no_vram_blocking:
    OFF
[Environ]: GET_VARIABLE bsnes_ppu_show_overscan:
    OFF
[Environ]: GET_VARIABLE bsnes_mode7_scale:
    1x
[Environ]: GET_VARIABLE bsnes_mode7_perspective:
    ON
[Environ]: GET_VARIABLE bsnes_mode7_supersample:
    OFF
[Environ]: GET_VARIABLE bsnes_mode7_mosaic:
    ON
[Environ]: GET_VARIABLE bsnes_dsp_fast:
    ON
[Environ]: GET_VARIABLE bsnes_dsp_cubic:
    OFF
[Environ]: GET_VARIABLE bsnes_dsp_echo_shadow:
    OFF
[Environ]: GET_VARIABLE bsnes_coprocessor_delayed_sync:
    ON
[Environ]: GET_VARIABLE bsnes_coprocessor_prefer_hle:
    ON
[Environ]: GET_VARIABLE bsnes_sgb_bios:
    SGB1.sfc
[Environ]: GET_VARIABLE bsnes_run_ahead_frames:
    OFF
[Environ]: GET_VARIABLE bsnes_touchscreen_lightgun:
    ON
[Environ]: GET_VARIABLE bsnes_touchscreen_lightgun_superscope_reverse:
    OFF
[Environ]: SET_GEOMETRY: 512x448, aspect: 1.143.
[Environ]: GET_SAVE_DIRECTORY.
[SRAM]: Skipping SRAM load..
Version of libretro API: 1
[INFO] Compiled against API: 1
[Cheats]: Load game-specific cheatfile: /storage/emulated/0/RetroArch/cheats/bsnes/The Legend of Zelda - A Link to the Past.cht
[Audio]: Set audio input rate to: 47921.08 Hz.
[Video]: Video @ 1755x1344
[Video]: 0RGB1555 pixel format is deprecated, and will be slower. For 15/16-bit, RGB565 format is preferred.
[Video]: Starting threaded video driver ...
Android EGL: GLES version = 2.
[EGL] Falling back to eglGetDisplay
[EGL]: EGL version: 1.4
[GL]: Found GL context: egl_android
[GL]: Detecting screen resolution 0x0.
[EGL]: Current context: 0xe851e400.
[GL]: Vendor: ARM, Renderer: Mali-T830.
[GL]: Version: OpenGL ES 3.2 v1.r28p0-01rel0.###other-sha0123456789ABCDEF0###.
[GL]: Using resolution 720x1280
[GL]: Default shader backend found: glsl.
[Shader driver]: Using GLSL shader backend.
[GL]: Stock GLSL shaders will be used.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GL]: Using 4 textures.
[GL]: Loaded 1 program(s).
[Joypad]: Found joypad driver: "android".
[Font]: Using font rendering backend: stb-unicode.
[Video]: Found display server: android
[OpenSL]: Requested audio latency: 128 ms.[OpenSL]: Setting audio latency: Block size = 960, Blocks = 26, Total = 24960 ...
[Display]: Found display driver: "gl".
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Environ]: SET_SUBSYSTEM_INFO.
Subsystem ID: 0
Special game type: Super Game Boy
  Ident: sgb
  ID: 4353
  Content:
    Game Boy ROM (required)
    Super Game Boy ROM (required)
Subsystem ID: 1
Special game type: BS-X Satellaview
  Ident: bsx
  ID: 4368
  Content:
    BS-X ROM (required)
    BS-X BIOS ROM (required)
Subsystems: 2
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Font]: Using font rendering backend: stb-unicode.
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_history.lpl].
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_music_history.lpl].
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_image_history.lpl].
[Playlist]: Loading favorites file: [/storage/emulated/0/Android/data/com.retroarch/files/content_favorites.lpl].
[Playlist]: Written to playlist file: /storage/emulated/0/Android/data/com.retroarch/files/content_history.lpl
bslenul commented 3 years ago

Crashing for me too on load content, with a Samsung Galaxy A5 2016 (it's a bit old, still running with Android 7, 32bit), I got a crash log by using adb logcat *:F, I think it's the right way?:

--------- beginning of crash
04-08 15:57:19.574  8711  8733 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7c in tid 8733 (Thread-5)
04-08 15:57:19.810  8857  8857 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-08 15:57:19.810  8857  8857 F DEBUG   : Build fingerprint: 'samsung/a5xeltexx/a5xelte:7.0/NRD90M/A510FXXS8CTI7:user/release-keys'
04-08 15:57:19.810  8857  8857 F DEBUG   : Revision: '4'
04-08 15:57:19.810  8857  8857 F DEBUG   : ABI: 'arm'
04-08 15:57:19.810  8857  8857 F DEBUG   : pid: 8711, tid: 8733, name: Thread-5  >>> com.retroarch.ra32 <<<
04-08 15:57:19.810  8857  8857 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7c
04-08 15:57:19.811  8857  8857 F DEBUG   :     r0 d5fe2480  r1 ca6273e0  r2 ca6274e0  r3 00000000
04-08 15:57:19.811  8857  8857 F DEBUG   :     r4 ca919a88  r5 ca6271ec  r6 00000000  r7 00000002
04-08 15:57:19.811  8857  8857 F DEBUG   :     r8 0001d7cc  r9 000236f8  sl 00000001  fp eaa7f7e8
04-08 15:57:19.811  8857  8857 F DEBUG   :     ip eaa7f7ab  sp eaa7f7a0  lr ca584a67  pc ca54f000  cpsr 60010030
04-08 15:57:19.828  8857  8857 F DEBUG   :
04-08 15:57:19.828  8857  8857 F DEBUG   : backtrace:
04-08 15:57:19.831  8857  8857 F DEBUG   :     #00 pc 0002a000  /data/data/com.retroarch.ra32/cores/bsnes_libretro_android.so
04-08 15:57:19.831  8857  8857 F DEBUG   :     #01 pc 0005fa63  /data/data/com.retroarch.ra32/cores/bsnes_libretro_android.so
04-08 15:57:19.831  8857  8857 F DEBUG   :     #02 pc 000481d5  /data/data/com.retroarch.ra32/cores/bsnes_libretro_android.so
04-08 15:57:19.831  8857  8857 F DEBUG   :     #03 pc 005295a4  /data/app/com.retroarch.ra32-1/lib/arm/libretroarch-activity.so (core_run+292)
04-08 15:57:19.831  8857  8857 F DEBUG   :     #04 pc 00510538  /data/app/com.retroarch.ra32-1/lib/arm/libretroarch-activity.so (runloop_iterate+1640)
04-08 15:57:19.831  8857  8857 F DEBUG   :     #05 pc 0050fbcc  /data/app/com.retroarch.ra32-1/lib/arm/libretroarch-activity.so (rarch_main+1044)
04-08 15:57:19.831  8857  8857 F DEBUG   :     #06 pc 00752880  /data/app/com.retroarch.ra32-1/lib/arm/libretroarch-activity.so
04-08 15:57:19.831  8857  8857 F DEBUG   :     #07 pc 00618498  /data/app/com.retroarch.ra32-1/lib/arm/libretroarch-activity.so
04-08 15:57:19.831  8857  8857 F DEBUG   :     #08 pc 00047f93  /system/lib/libc.so (_ZL15__pthread_startPv+22)
04-08 15:57:19.832  8857  8857 F DEBUG   :     #09 pc 0001a161  /system/lib/libc.so (__start_thread+6)

Tested with Super Mario World, I even added the BIOS files just in case but I don't think they're required for SMW.

edit: Would have been better to post in bsnes repo however: https://github.com/libretro/bsnes/issues ;)

andiandi13 commented 3 years ago

Not crashing for me on Android 9 (Nokia 8) with last Retroarch (1.9.1) (Tested with Super Street Fighter II - The New Challengers)

ds22x commented 3 years ago

Actually better to post the issue here though: https://github.com/libretro/bsnes-libretro/issues

https://github.com/libretro/bsnes/issues isn't used anymore.