Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecyclerView -A/libc: Fatal signal Crash #273

Closed
Niell-A opened this issue Nov 10, 2022 · 8 comments
Closed

RecyclerView -A/libc: Fatal signal Crash #273

Niell-A opened this issue Nov 10, 2022 · 8 comments
Assignees
Labels
tentative A fix has been merged and awaits confirmation

Comments

@Niell-A
Copy link

Niell-A commented Nov 10, 2022

Description

I would like to use rive animations in a recycler view. Using the RecyclerActivity example provided from the rive GitHub page, found on this path: rive-android-master/app/src/main/java/app/rive/runtime/example/RecyclerActivity.kt

The only change I made was to change the size of the RiveAnimationView in the activity_recycler_item.xml from
android:layout_width="wrap_content" android:layout_height="match_parent"
to
android:layout_width="64dp" android:layout_height="56dp"

This means that view holders would be smaller than in the original example. Scrolling too fast when running leads to a fatal signal crash.

I have tested on 2 emulators and my own physical device.

My device (Samsung s9+ running android 10) and one of the Emulators (Pixel A3 running API 33) received this crash:
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb4000075a584d590 A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10 in tid 16256 (Thread-2), pid 16216 (rive-android-master) E/Surface: getSlotFromBufferLocked: unknown buffer: 0x0

The other emulator (Pixel API 22) received this crash:
Fatal signal 6 (SIGABRT), code -6 in tid 17229 (Thread-582)

I used the following version of the rive SDK: implementation 'app.rive:rive-android:4.0.0'

Source .riv/.rev file

The source was the circle_move.riv file in the examples

@Niell-A
Copy link
Author

Niell-A commented Nov 23, 2022

Bump

@ptsekov
Copy link

ptsekov commented Nov 24, 2022

We have a similar issue in our app which uses the AndroidX Leanback library. We use RiveAnimationView in a child view displayed in androidx.leanback.widget.HorizontalGridView (which inherits from RecyclerView). Scrolling around fast causes a crash in the native Rive code.

I've built the rive-android library 4.2.1 with debug symbols and without optimizations (-O0 -g) to produce meaningful stacktraces. I can provide tombstones if necessary. It is interesting that the crash occurs at different locations.

I am attaching a couple of stacktraces from Amazon Fire TV Cube (2nd Gen) and Chromecast with Google TV.

@ptsekov
Copy link

ptsekov commented Nov 24, 2022

Build fingerprint: 'Amazon/raven/raven:9/PS7608.3614N/0025468739072:user/amz-p,release-keys'
Revision: '0'
ABI: 'arm'
pid: 23523, tid: 23969, oom: 0, name: Thread-30  >>> com.bulsat.android.bbox <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    r0  00000000  r1  00005da1  r2  00000006  r3  00000008
    r4  00005be3  r5  00005da1  r6  c96ff84c  r7  0000010c
    r8  00005be3  r9  00005be3  r10 d10d26e4  r11 c96ff868
    ip  c96ff7e8  sp  c96ff838  lr  f42e4ee1  pc  f42dcd2e

backtrace:
    #00 pc 0001cd2e  /system/lib/libc.so (abort+58)
    #01 pc 000ee7bc  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (rive_android::Settings::addListener(std::__ndk1::function<void ()>)+40)
    #02 pc 000f0ea0  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (std::__ndk1::deque<rive_android::WorkerThread<rive_android::EGLThreadState>*, std::__ndk1::allocator<rive_android::WorkerThread<rive_android::EGLThreadState>*>>::__maybe_remove_back_spare(bool)+112)
    #03 pc 000f0dc8  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (std::__ndk1::__deque_base<rive_android::WorkerThread<rive_android::EGLThreadState>*, std::__ndk1::allocator<rive_android::WorkerThread<rive_android::EGLThreadState>*>>::size()+16)
    #04 pc 000f0c90  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (std::__ndk1::stack<rive_android::WorkerThread<rive_android::EGLThreadState>*, std::__ndk1::deque<rive_android::WorkerThread<rive_android::EGLThreadState>*, std::__ndk1::allocator<rive_android::WorkerThread<rive_android::EGLThreadState>*>>>::top()+28)
    #05 pc 000f0bdc  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (std::__ndk1::stack<rive_android::WorkerThread<rive_android::EGLThreadState>*, std::__ndk1::deque<rive_android::WorkerThread<rive_android::EGLThreadState>*, std::__ndk1::allocator<rive_android::WorkerThread<rive_android::EGLThreadState>*>>>::empty() const+8)
    #06 pc 000f0bb8  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (rive_android::ThreadManager::acquireThread(char const*)+140)
    #07 pc 000f0b5c  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (rive_android::ThreadManager::acquireThread(char const*)+48)
    #08 pc 000f072c  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (rive_android::setAffinity(rive_android::Affinity)+200)
    #09 pc 000633e5  /system/lib/libc.so (__pthread_start(void*)+22)
    #10 pc 0001def1  /system/lib/libc.so (__start_thread+24)

@ptsekov
Copy link

ptsekov commented Nov 24, 2022

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Amazon/raven/raven:9/PS7608.3614N/0025468739072:user/amz-p,release-keys'
Revision: '0'
ABI: 'arm'
pid: 28150, tid: 28338, oom: 0, name: Thread-37  >>> com.bulsat.android.bbox <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    r0  cc77f668  r1  f4270520  r2  d1af1c80  r3  00000002
    r4  00000000  r5  00000000  r6  00000000  r7  d5a562b0
    r8  00000000  r9  00000000  r10 00000000  r11 00000000
    ip  00000000  sp  cc77f64c  lr  00000001  pc  f4251332

backtrace:
    #00 pc 0006e332  /system/lib/libgui.so (std::__1::__hash_table<std::__1::__hash_value_type<unsigned long long, unsigned long long>, std::__1::__unordered_map_hasher<unsigned long long, std::__1::__hash_value_type<unsigned long long, unsigned long long>, std::__1::hash<unsigned long long>, true>, std::__1::__unordered_map_equal<unsigned long long, std::__1::__hash_value_type<unsigned long long, unsigned long long>, std::__1::equal_to<unsigned long long>, true>, std::__1::allocator<std::__1::__hash_value    #01 pc 00072505  /system/lib/libgui.so (unsigned int std::__1::__hash_table<std::__1::__hash_value_type<unsigned int, int>, std::__1::__unordered_map_hasher<unsigned int, std::__1::__hash_value_type<unsigned int, int>, std::__1::hash<unsigned int>, true>, std::__1::__unordered_map_equal<unsigned int, std::__1::__hash_value_type<unsigned int, int>, std::__1::equal_to<unsigned int>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned int, int>>>::__erase_unique<unsigned int>(unsigned int cons    #02 pc 00071d65  /system/lib/libgui.so (android::flushDataToEve(unsigned int)+464)
    #03 pc 0007242d  /system/lib/libgui.so (android::GuiEveDestroySurfaceNativeCallback(android::Surface const*)+28)
    #04 pc 00073921  /system/lib/libgui.so (android::surface_fosExt_notifyDestroySurfaceNative(android::Surface const*)+32)
    #05 pc 000615c5  /system/lib/libgui.so (android::Surface::~Surface()+36)
    #06 pc 0006181b  /system/lib/libgui.so (android::Surface::~Surface()+2)
    #07 pc 00009863  /system/lib/libutils.so (android::RefBase::decStrong(void const*) const+66)
    #08 pc 000f82e0  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (_ZNSt6__ndk113move_backwardIPPNS_8functionIFvPN12rive_android14EGLThreadStateEEEES8_EET0_T_SA_S9_+76)
    #09 pc 000e5ff0  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (Java_app_rive_runtime_kotlin_core_LayerState_cppIsBlendStateDirect+40)
    #10 pc 000e5fbc  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (bool rive::Core::is<rive::BlendState1D>() const+40)
    #11 pc 000e5f84  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (Java_app_rive_runtime_kotlin_core_LayerState_cppIsBlendState1D+44)
    #12 pc 000e5f40  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (bool rive::Core::is<rive::BlendState>() const+28)
    #13 pc 000e5f1c  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (Java_app_rive_runtime_kotlin_core_LayerState_cppIsBlendState+52)
    #14 pc 000ee7a8  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (rive_android::Settings::addListener(std::__ndk1::function<void ()>)+20)
    #15 pc 000ee748  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (_ZNSt6__ndk122__compressed_pair_elemIPNS_8functionIFvvEEELi0ELb0EEC2IDnvEEOT_+36)
    #16 pc 000f5874  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (std::__ndk1::deque<std::__ndk1::function<void (rive_android::EGLThreadState*)>, std::__ndk1::allocator<std::__ndk1::allocator>>::__add_back_capacity()+28)
    #17 pc 000f5820  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (std::__ndk1::deque<std::__ndk1::function<void (rive_android::EGLThreadState*)>, std::__ndk1::allocator<std::__ndk1::allocator>>::__back_spare() const+8)
    #18 pc 000f57d0  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (_ZNSt6__ndk15dequeINS_8functionIFvPN12rive_android14EGLThreadStateEEEENS_9allocatorIS6_EEE12emplace_backIJZNS2_12WorkerThreadIS3_E12releaseQueueENS1_IFvvEEEEUlS4_E_EEERS6_DpOT_+96)
    #19 pc 000f5774  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (_ZNSt6__ndk15dequeINS_8functionIFvPN12rive_android14EGLThreadStateEEEENS_9allocatorIS6_EEE12emplace_backIJZNS2_12WorkerThreadIS3_E12releaseQueueENS1_IFvvEEEEUlS4_E_EEERS6_DpOT_+4)
    #20 pc 000f5738  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (_ZZN12rive_android12WorkerThreadINS_14EGLThreadStateEE12releaseQueueENSt6__ndk18functionIFvvEEEENUlPS1_E_D2Ev+4)
    #21 pc 000f06e0  /data/app/com.bulsat.android.bbox-NuJBCFGpPpuKxCOtNdBMpw==/lib/arm/libjnirivebridge.so (offset 0xb2000) (rive_android::setAffinity(rive_android::Affinity)+124)
    #22 pc 00a72efe  [anon:libc_malloc:be200000]

@ptsekov
Copy link

ptsekov commented Nov 24, 2022

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sabrina_prod_stable/sabrina:12/STTE.220621.019.A2/9082754:user/release-keys'
Revision: '0'
ABI: 'arm'
Timestamp: 2022-11-24 02:23:30.629410427+0200
Process uptime: 0s
Cmdline: com.bulsat.android.bbox
pid: 18256, tid: 18489, name: Thread-71  >>> com.bulsat.android.bbox <<<
uid: 10106
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
Cause: null pointer dereference
    r0  b8d0bfd0  r1  00000000  r2  00000018  r3  000000aa
    r4  b30c40f0  r5  b30c41c0  r6  b30c41c0  r7  00000078
    r8  00004750  r9  f04ac2cc  r10 ff98ebd0  r11 b30c40d0
    ip  bd4e580c  sp  b30c40b8  lr  bd2c9d74  pc  bd2ca30c

backtrace:
      #00 pc 000f230c  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (std::__ndk1::__function::__value_func<void (rive_android::EGLThreadState*)>::__value_func(std::__ndk1::__function::__value_func<void (rive_android::EGLThreadState*)> const&)+132)
      #01 pc 000f1d70  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (std::__ndk1::function<void (rive_android::EGLThreadState*)>::function(std::__ndk1::function<void (rive_android::EGLThreadState*)> const&)+32)
      #02 pc 000f1c74  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (rive_android::WorkerThread<rive_android::EGLThreadState>::threadMain()+140)
      #03 pc 000f1bdc  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()::operator()() const+24)
      #04 pc 000f1bb8  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (decltype(std::__ndk1::forward<rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()>(fp)()) std::__ndk1::__invoke<rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()>(rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()&&)+24)
      #05 pc 000f1b5c  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (void std::__ndk1::__thread_execute<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()>(std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()>&, std::__ndk1::__tuple_indices<>)+28)
      #06 pc 000f172c  /data/app/~~Rt7N6E4zGvDCsI5_eVzM3A==/com.bulsat.android.bbox-SAPlCcO0t6CpH4_eBJ960w==/lib/arm/libjnirivebridge.so (void* std::__ndk1::__thread_proxy<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, rive_android::WorkerThread<rive_android::EGLThreadState>::launchThread()::'lambda'()> >(void*)+72)
      #07 pc 000a8d07  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: a70940c7c44a263890cd8656fe04d6bc)
      #08 pc 00061d13  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: a70940c7c44a263890cd8656fe04d6bc)

@Niell-A
Copy link
Author

Niell-A commented Mar 1, 2023

I have tested this issue on the latest 4.0.0 version of the library, but I am still getting the Fatal signal 11 crash on recycler views.

@umberto-sonnino
Copy link
Contributor

Hey @Niell-A and @ptsekov, after hunting it down for a while, we just released several new fixes for tackling some RecyclerViews issues specifically!

Can you give 4.3.2 a go to see if this fixes your crashes?

@umberto-sonnino umberto-sonnino self-assigned this Apr 3, 2023
@umberto-sonnino umberto-sonnino added the tentative A fix has been merged and awaits confirmation label Apr 11, 2023
@umberto-sonnino
Copy link
Contributor

Going to close this issue for now - feel free to reopen if the issue is pops up again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tentative A fix has been merged and awaits confirmation
Projects
None yet
Development

No branches or pull requests

3 participants