rive-app / rive-app/rive-android

SIGSEGV in Adreno shader compiler (QGLCLinkProgram) while building atlas render pipeline on low-end Qualcomm devices

Open
#461 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
538
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Submission checklist
  • Confirmed present in the latest version of rive-android — see note in Description
  • Searched docs/forums
  • Searched existing issues — not a duplicate
Description

Recurring native SIGSEGV on the Rive worker thread when the GL backend compiles/links the atlas render pipeline shader. It terminates inside Qualcomm's Adreno shader compiler. The crash is fatal/unhandled and is concentrated on low-end Adreno GPUs (e.g. Adreno 308) on older Android.

On versions: we observe this on 11.6.1. We have not been able to verify on 11.7.0 because we hit a separate rendering regression there (#459) and reverted, so 11.7.0 isn't running in our production builds.

Full stack trace (Rive worker thread, symbolicated Rive frames):

SIGSEGV: Segfault
  rive_android::WorkerThread::threadMain
  rive_android::WorkerImpl::doFrame
  rive_android::PLSWorkerImpl::flush
  rive::gpu::RenderContext::flush
  rive::gpu::RenderContext::setResourceSizes
  rive::gpu::RenderContextGLImpl::resizeAtlasTexture
  rive::gpu::RenderContextGLImpl::buildAtlasRenderPipelines
  rive::gpu::RenderContextGLImpl::AtlasProgram::compile
  EsxContext::LinkProgram
  EsxProgram::Link
  EsxShaderCompiler::CompileProgram
  QGLCLinkProgram

A separate device grouping terminates one frame deeper in libllvm-glnext.so (Adreno's LLVM shader compiler) — we believe it's the same crash.

Previous working version

None known; long-standing (earliest occurrences ~Aug 2025, predating 11.6.x).

Reproduction steps / code

No deterministic local repro; collected from production crash reporting. Occurs during normal rendering of standard animations on the affected GPUs.

Rive Android runtime version

11.6.1

Rive API

Legacy (RiveAnimationView). We use the Compose API in one place but have not seen this crash attributed to it.

Device

moto g6 play (Adreno 308); also Redmi, Samsung Galaxy J4+ (SM-J415x), Samsung Galaxy Tab A (SM-T380/385/387) — all low-end Adreno.

Device OS

Android 9 (range 8.1–9).

App minimum SDK level

API 26

App target SDK level

API 35

App NDK level

Not pinned (AGP default).

Other Rive runtimes affected

Unknown.

Dependencies with native libraries

Media3/ExoPlayer, LiveKit.

Additional context

Recurring and ongoing. Exclusively on low-end 32-bit (armeabi-v7a) Qualcomm/Adreno devices on older Android. The crash is in the driver's link step for Rive's atlas program, which suggests the generated GLSL (or the compile/link path) trips a bug in older Adreno shader compilers. Any way to disable/avoid the atlas pipeline, or fall back gracefully, on these GPUs would help us mitigate.

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 at RenderContextGLImpl::resizeAtlasTexture, buildAtlasRenderPipelines, and AtlasProgram::compile, using the 11.6.1 runtime and the reported Adreno 308/armeabi-v7a devices as the context. Investigate the atlas shader compile/link path and determine whether the pipeline can be avoided or safely fall back on affected GPUs. Done means a validated mitigation that prevents the fatal crash on the listed Android 8.1–9 devices.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
computer-graphics, mobile-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.