libretro / Lakka-LibreELEC

Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console.
https://www.lakka.tv
1.75k stars 289 forks source link

When using the Ozone menu driver, navigating into any submenu causes RetroArch to crash #793

Closed jholloway closed 3 years ago

jholloway commented 5 years ago

Setup details: Lakka version 2.3 installed on Raspberry Pi 4 Model B (1 GB), navigating menus with an Xbox One S Controller connected over Bluetooth to an 8bitdo Wireless Adapter, so the system sees it exactly as if it were a wired Xbox 360 pad.

On a fresh install of Lakka on a RPi4, I changed to the Ozone menu driver in the RetroArch settings, as I prefer it over XMB. I restarted RetroArch to apply the changes. The Ozone menu loads and I can navigate through the top level menu. But when I attempt to go into any deeper level of sub-menu, a graphical glitch happens and then RetroArch restarts.

I can't successfully navigate into any sub-menu level while the Ozone menu driver is active. This means I can't even access the Drivers menu under Settings to change it back. But when using SSH to manually edit the configuration file back to the XMB menu driver and restarting the RetroArch service, RetroArch starts into the XMB menu as expected.

As I said, this is a fresh install that is fairly stock. I only made a few minor changes before attempting the menu driver change. I turned on SSH, Samba, and Bluetooth. I set the system resolution to 1920x1080. That's all I remember changing.

I have attempted to verify that this issue is specific to Lakka and not RetroArch as a whole by testing RetroArch 1.7.8v4 installed on a fresh Raspbian Buster Lite image, and this issue with the Ozone menu driver does not happen on that setup.

I captured a log of me attempting to navigate into a submenu while the Ozone menu driver was active. Download lakka-rpi4-ozone-bug-log.txt or visit this gist.

The final line before core dump seems most relevant:

retroarch: ../src/broadcom/cle/v3d_packet_helpers.h:74: __gen_uint: Assertionv <= max' failed.`

I've attempted to search for a solution before posting, but I'm not finding anything that seems especially relevant to this particular problem.

Please let me know if there's any additional info I can provide or any troubleshooting steps I can perform to help track down the problem.

natinusala commented 5 years ago

Ideally I'd need a crash report but I think the issue comes from scissoring. I don't know why the bug isn't here in Raspbian though, are you using the new OpenGL driver?

Mikau28 commented 5 years ago

Can confirm the same issue on 4gb model https://github.com/libretro/Lakka-LibreELEC/issues/841

Tim-Townsend commented 4 years ago

I am unable to change back to XMB even after SSH Lakka:~ # nano /storage/.config/retroarch/retroarch.cfg

Then I changed menu_driver to "xmb", still have the issue I've done very little configuration change aside from the steps to connect xbox one remote over bluetooth

sourcerebels commented 4 years ago

You can restore "xmb" menu driver by accessing the sd card directly from your computer and editing retroarch.cfg. Via ssh I wasn't able to change it.

Falumir commented 4 years ago

I've been attempting to look into this recently. Unfortunately, a recent stack trace shows that it appears to be an issue with a driver rather than Ozone. The stack trace can be found here: https://pastebin.com/vf8yjrqG

Through trial and error, I've determined that this happens when the sidebar is pushed offscreen. On a hunch that it might have something to do with a negative X coordinate being passed to the driver, I added some logging code to ozone_sidebar.c to try and determine which draw function leads to the driver crashing. The last draw function leading up to the crash was ozone_draw_text at -339.267181, so it's likely not an issue with the X coordinate.

[INFO] ozone_draw_text - -339.267181 [INFO] ozone_draw_icon - -339.267181 [INFO] ozone_draw_text - -339.267181 retroarch: ../src/broadcom/cle/v3d_packet_helpers.h:74: __gen_uint: Assertionv <= max' failed.`

I've also determined that a crash occurs when backing out of the quick menu. This is likely related, though I haven't pulled a stack trace yet.

Ntemis commented 4 years ago

@Falumir @jholloway @Mikau28 can you use Ozone without crashes outside lakka?

tewald commented 4 years ago

Using ozone/retroarch compiled on raspbian from source works as expected. When I changed to Lakka the bug reported by OP happens. Raspberry PI 4 4GB here.

HunterAhlquist commented 4 years ago

Having the same issue.

gouchi commented 4 years ago

@Tim-Townsend @sourcerebels You did try like this comment for editing the configuration ?

@tewald How did you compile it ? On Lakka we compile it with those specific parameters for RPi4 Source

--enable-opengles --enable-opengles3 --enable-opengl_core --enable-kms --disable-x11 --disable-videocore --enable-plain_drm

@Falumir @jholloway You may try to open an issue on Mesa issue tracker to get some feedback as it looks like it is related to the driver ? Similar issue related to Intel Vulkan driver (anv) with RPCS3 but it was fixed in RPCS3 at the end.

Philps commented 4 years ago

New Install LibreElec 9.2.6 with gamestarterAddon on Raspberry Pi4 B 4GB model

RetroArch starts fine and i can navigate up and down, but as soon as i hit enter to get into a submenu it crashes and reloads kodi

Log excerpt LibreELEC:/ # tail -100 ./storage/.kodi/temp/retroarch.log

RetroArch [ADDON] :: Total RetroPlayer cores: 11 RetroArch [ADDON] :: Kodi is ready. RetroArch [ADDON] :: RPi4.arm-9.2.6 - Thu Nov 12 19:20:36 UTC 2020 RetroArch [ADDON] :: Stop kodi... RetroArch [ADDON] :: Launch Retroarch (Enable debugging and see process output in retroarch_debug.log) RetroArch [ADDON] :: Restart kodi...

tail ./storage/.kodi/temp/retroarch_debug.log ALSA lib /home/jails/home/jenkins/LE/build2/workspace/RPi4/LibreELEC.tv/build.LibreELEC-RPi4.arm-9.2.6/alsa-lib-1.1.9/src/seq/seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory [ERROR] [MIDI]: snd_seq_open failed with error -2. [ERROR] [MIDI]: Initialization failed (list of input devices unavailable). [INFO] SRAM will not be saved. [INFO] Loading history file: [/storage/.config/retroarch/content_history.lpl]. [INFO] Loading history file: [/storage/.config/retroarch/content_music_history.lpl]. [INFO] Loading history file: [/storage/.config/retroarch/content_video_history.lpl]. [INFO] Loading history file: [/storage/.config/retroarch/content_image_history.lpl]. [INFO] Loading favorites file: [/storage/.config/retroarch/content_favorites.lpl]. [INFO] [GL]: VSync => on [INFO] [GL]: VSync => on [INFO] [KMS]: New FB: 1920x1080 (stride: 7680). [INFO] [KMS]: New FB: 1920x1080 (stride: 7680). game.retroarch-RPi: ../src/broadcom/cle/v3d_packet_helpers.h:74: __gen_uint: Assertion `v <= max' failed.

Can upload full log if required.

As a workaround change menu_driver to "xmb" via ssh

LibreELEC:~ # egrep menu_driver /storage/.config/retroarch/retroarch.cfg menu_driver = "xmb"

This will load the old UI which works (still some graphical flaws but basic functionality )

ToKe79 commented 3 years ago

is this still present in the latest release / nightly? if so, please open new issue.