Rive.init() throws UnsatisfiedLinkError: dlopen failed - librive-android.so has invalid shdr offset/size
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
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
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rive-app/rive-android
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
rive-app/rive-android#475 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rive-app/rive-android#471 ·
-
SIGSEGV in libGLESv2_mtk.so on FCNT arrows We2 devicesPossibly taken @ErikUggeldahl claimed this 18 days ago. Openbug confirmed
Difficulty 4/5 3-5 days Newbie friendliness 30/100
rive-app/rive-android#468 · 6 comments · 3 reactions · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
rive-app/rive-android#462 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
rive-app/rive-android#461 · 1 comment · 1 reaction ·
All issues in rive-app/rive-android
Similar issues
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
djazairdev/wilayas#23 ·
Maintainers usually reply within 1 day
-
[BUG] Navigation drawer drops library-name suffixes without ellipsis (1.0.8, NVIDIA Shield)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
damontecres/Wholphin#2069 ·
Maintainers usually reply within 1 day
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
margelo/react-native-vision-camera#4217 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
saisaharsh3/Leftovers#13 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100
navikt/esyfo-narmesteleder#700 ·
Maintainers usually reply within 1 day