libretro / RetroArch

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

[ARM v7] 1.7.3 100% consistent crash when launching 'Enable menu audio' #6746

Open BananaRama203 opened 6 years ago

BananaRama203 commented 6 years ago

Description

Users are able to launch Enable menu audio on the 1.7.3 interface on the (S)NESC and it will crash retroarch. (Other processes remain functional)

Expected behavior

Enable menu audio?

Actual behavior

Freeze.

Steps to reproduce the bug

  1. Load up core.
  2. Open RA menu.
  3. Select enable menu audio
  4. crash.

Bisect Results

Started happening on 1.7.3

Stuff n Things

I have attached a verbose log for one instance of the crashing and I also included the STRACE for another instance.

strace.log Batman_The_Video_GameUSA.nes.7z_RetroArch.log

We are using standard ALSA libs that are supplied on the (S)NESC

RobLoach commented 6 years ago

Which audio driver are you on? This happens for me on Pulse audio driver... Even without a loaded core.

BananaRama203 commented 6 years ago

@RobLoach We are justing using the default ALSA libraries (libasound) provided by the console. Nothing fancy.

droople commented 6 years ago

Same here, audio driver opensl, no core loaded, free when tried to enable menu audio. android 7.0, ARM MT8176

Enverex commented 6 years ago

Not sure this is ARM specific. I'm on x86_64 Linux and it just locked up RetroArch when I enabled the option (having never seen it before). I am using PulseAudio. Had F-Zero loaded in SNES9x at the time.

inactive123 commented 6 years ago

It works fine on ALSA without Pulse. Maybe the issue is that despite you using ALSA, it is actually using PulseAudio under the hood.

Anyway, I don't know how to fix it, and I don't use PulseAudio on my own Linux system. Make it a bounty, maybe somebody with some experience with PulseAudio could look into it and attempt to fix it. It will have to be fixed on the audio driver side.

lonkelle commented 5 years ago

Same here.

Audio Driver: opensl (on Android 32-bit), CoreAudio (on macOS, Metal Version) Android: Any core loaded, if there is no core loaded it turns on and off without freezing but nothing happens. MacOS: No core even has to be loaded, it freezes immediately after enabling the option.

This happens on Android 8.0 AND macOS - which uses the CoreAudio plugin (same resampler though) so it MAY NOT be an Audio plugin issue.

But, maybe even more importantly, no freezing ever happens when using RetroArch64 (64-bit version) on Android (despite everything being configured, at default with a couple cores downloaded, the same as the 32-bit version). Though despite it not freezing there still is no menu audio anyway. I may misunderstand the option, but I figured it meant like, tiny clicks would happen when navigating the menu. Either way, the 64-bit version doesn't freeze, but also doesn't appear to do anything.

Note: Discovered this when writing this ticket: #7624

3XistencE commented 4 years ago

[UPDATE and HOW TO SOLVE THE PROBLEM] I managed to return the audio in the menu, this is just a workaround but points the problem directly to the OpenSl audio and the configuration file (in my opinion). [How to return the audio on Android 32bit devices] Go on configuration/settings-->audio use the "start" button (or the one that resets to the default value the options) on any voice in the audio settings tab (also inside the audio mixer for all the channels). Go on audio driver and set another one different from OpenSL (doesn't matter if it doesn't work). Exit retroarch (to save configuration). Run RA and run any game (you will not have audio). Close the content and change audio driver to opensl again. At this point go on audio and turn on all the voices for the menu sounds (it will not freeze/crash). Exit retroarch to save configuration. Run RA and Voila': there's the sound.

[Problem] RetroArch on Android 32 (Pie 9) I Need, sadly, to add also myself into the users with this annoying problem. I can explain better, until two days ago i had normally the menu sounds, the background music etc...

[what's the problem?] Turning on the audio mix stream in the menu make freeze retroarch and crash. Without that option there's no menu sound, no background music in RA but works normally on games.

[was always like that?] No, few days ago i had the great idea to change render from opengl to vulkan: i obtained the permanent black screen of death. In order to save all my configurations etc... i though to erase the configuration file of retroarch (not sure if it was the right one on "storage/emulated/0/Android/thelongaddressofretroarch/data/ " the file name was retroarch.cfg and in the same directory there was a retroarchcore.cfg or similar (probably that defines the configuration for single cores). After erasing RetroArch finally started (no more black screen caused by using/searching vulkan), i tried to check something on RA mixer single channels (play/play(loop)/stop/etc...) just in order to understand what it does. I tried to change the audio driver also, and i tried to turn on the sounds and, sadly, i forget to set all the RA directories so the program was without Assets.

After all setting up i had no sounds and this freeze when i try to turn on the in menu sounds.

I'm pretty sure that there's also some config file somewhere (the main problem is that RA install itself and is cores etc... into a "protected zone" memory "/user/data/" and it's impossible to access them into a non-rooted device (mine).

Can it be related to some residual data or configuration file? Or related to audio driver. Funny thing is that worked before so i will be happy to understand if some users with this problem did also some actions like mine: change audio driver, turn on the menu audio without having the assets installed (no assets=no audio and on ALL android 32bit versions seems bugged the script to extract/download/update Assets.zip: it just download but fail everytime to extract and install), erased some configuration file and reinstalled RetroArch? I also maybe turned off the android developer function about transmit audio over usb (that was to verify another problem on RA core GME).

I also tried to uninstall and install again RA but without any success in order to solve this problem. I'm also pretty sure that there's some configuration file somewhere i can't access that may cause the problem or that there's some part missing into the actual configuration file that makes RA freeze and crash (maybe by erasing manually the RetroArch.cfg file it doesn't regenerate it from zero and some important part are missing)?

Those are my ideas.

carloshvcristo commented 3 years ago

3XistencE thanks a lot!! U just find the solution!! Works at an Android 6.0 with RA 1.9.0... just did your trick changing driver and exiting.. and changing back to opensl... otherwise it will freeze!! Thanks a lot!!!

zulhailmie commented 3 years ago

3XistencE's workaround worked for me too. However there is no need to run a game or core on my part. 1) Set audio driver to null 2) Restart retroarch 3) Enable menu sounds 4) Switch back to the preferred audio driver 5) Restart retroarch