Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rive.init() throws UnsatisfiedLinkError: dlopen failed - librive-android.so has invalid shdr offset/size

Open
#472 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start at Rive.kt:57 and the ReLinker loading path shown in the stack trace, then compare it with the call from BackgroundThreadInitialisation.kt:242. Investigate why librive-android.so can reach System.load with an invalid ELF section header on the reported Android device. Done means the crash cause is identified and a reliable fix or mitigation is verified against native-library loading.

Written by the indexing model from the issue text.

Description

Submission checklist
  • I have confirmed the issue is present in the latest version of rive-android
  • I have searched the documentation and forums and could not find an answer
  • I have searched existing issues and this is not a duplicate
Description

Rive.init() throws a fatal java.lang.UnsatisfiedLinkError when loading librive-android.so, with the specific message has invalid shdr offset/size: 4404512/1160. This indicates the ELF section header table of the extracted native library is corrupted/malformed on-device. The load is delegated through ReLinker (ReLinkerInstance.loadLibrary → System.load → dlopen). Full stack trace:

Fatal Exception: java.lang.UnsatisfiedLinkError:
dlopen failed: "/data/data/in.swiggy.android/app_lib/librive-android.so" has invalid shdr offset/size: 4404512/1160
at java.lang.Runtime.load0(Runtime.java:928)
at java.lang.System.load(System.java:1621)
at com.getkeepsafe.relinker.SystemLibraryLoader.loadPath(SystemLibraryLoader.java:31)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:206)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:92)
at app.rive.runtime.kotlin.core.Rive.init(Rive.kt:57)
at in.swiggy.android.application.BackgroundThreadInitialisation.init(BackgroundThreadInitialisation.kt:242)
at in.swiggy.android.application.BackgroundThreadInitialisation.doInitialise(BackgroundThreadInitialisation.kt:201)
at in.swiggy.android.CommonAppApplication.initSdksInBackGroundThread$lambda$0(CommonAppApplication.java:378)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Rive.init() is called once, on a background thread, during app startup — never on the main thread.

Previous working version

No response

Reproduction steps / code

/*Not minimally reproducible locally — this is storage/extraction-corruption-dependent, not a deterministic code path. Init call site:
*/
Rive.init(context = app.applicationContext, defaultRenderer = RendererType.Rive)
/*Called from BackgroundThreadInitialisation.kt:242, itself called from doInitialise() on a background ThreadPoolExecutor worker during CommonAppApplication startup.
*/

Upload your reproduction files / stack trace

in.swiggy.android_issue_09311a0db7f70d04f5d6762997bd73a0_crash_session_6AA8816D03DA00015613BE22DFB53EAD_DNE_0_v2_stacktrace.txt

Source .riv / .rev file

No response

Screenshots / video

No response

Rive Android runtime version

11.1.2

Rive API

Both

Device

Redmi 8A Dual

Device OS

Android 9+

App minimum SDK level

No response

App target SDK level

No response

App NDK level

No response

Other Rive runtimes affected

No response

Dependencies with native libraries

No response

Additional context

No response

Dominant language
Kotlin
Stars
543
Forks
68
Avg merge
19m
Merged PRs (30d)
1

Getting set up

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.

More from rive-app/rive-android

All issues in rive-app/rive-android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.