Skip to content

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

Open

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.

Activity

  1. sebastian-gallese-speak commented on Jul 22, 2026

    @sebastian-gallese-speak
    Author

    Some additional root-cause detail from reading rive-runtime's GL backend, in case it helps triage: in render_context_gl_impl.cpp, Adreno series < 600 forces m_platformFeatures.alwaysFeatherToAtlas = true (the workaround for the Adreno 308 instanced-draw crash). Our crashes are in exactly that path — RenderContextGLImpl::resizeAtlasTexture → buildAtlasRenderPipelines → AtlasProgram::compile → QGLCLinkProgram → libllvm-glnext.so — i.e. the atlas fallback that's mandatory on these GPUs is itself tripping the old driver's shader compiler at program-link time. So on Adreno 3xx/5xx there's currently no configuration that avoids the crashing compile. We're mitigating by routing these devices to RendererType.Canvas. A possible upstream fix could be pre-validating the atlas program link (or falling back to Canvas) when the driver is a known-bad libllvm-glnext version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions