libretro / libretro/RetroArch

Android: ANR triggered because the UI is blocked while loading game and shader

Open
#17,838 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Is there an existing issue for this?
  • This is a bug in RetroArch frontend
  • I have searched the existing issues
Description

On my retroid pocket 5, loading a game and applying a shader to it often results in Android triggering ANR messages.

It is possible to partially workaround that by use the automatic shader delay function, so that the UI is at least responsive affter loading the game and start compiling the shader, but this is not always resolutive, since some shaders may take more than 5 seconds to compile, and that is enough for android to trigger the message.

To make thing worse, even if the UI becomes responsive, Android (13) will continue to spam you with the very same message.

I've no skill to correct that, but I suppose that the main ui should stay responsive or at least reply to the Android system somehow.

Expected behavior

No response

Steps to reproduce the bug

Install retroarch to an Android system.
setup an heavy shader override for a big game (MegaBezel?)
Load a big game

Version/Commit

1.20.0

Bisect Results

No response

Present in the nightly version

Yes, this is reproduced in the nightly build

Platform & operating system

Android 13

Affected Cores

No response

Environment information

No response

Relevant log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the ANR on Android 13 with a heavy shader override and a large game, then trace the loading and shader-compilation path responsible for blocking the UI. Done means the UI remains responsive during compilation and Android no longer reports the application as unresponsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
mobile-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.