# Crash on R2.2 libtensorflowlite\_c.so

**URL:** <https://discuss.ai.google.dev/t/crash-on-r2-2-libtensorflowlite-c-so/32608>\
**Category:** General Discussion\
**Tags:** tflite, help\_request\
**Created:** [February 21, 2022, 5:53am UTC](https://discuss.ai.google.dev/t/crash-on-r2-2-libtensorflowlite-c-so/32608 "2022-02-21T05:53:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![four\_fan](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/four_fan/32/10560_2.png) [@four\_fan](https://discuss.ai.google.dev/u/four_fan)\
**Post date:** [February 21, 2022, 5:53am UTC](https://discuss.ai.google.dev/t/crash-on-r2-2-libtensorflowlite-c-so/32608/1 "2022-02-21T05:53:05Z")

</div>

```
  I used android-ndk-r18b to build R2.2 libtensorflowlite_c.so.But the following six crash appear on the Android platform.!

```

 ![crash](https://d3qe71uytubmmx.cloudfront.net/original/2X/c/c99f64788b3b385a76be46e0a31085892dc16ac8.png)

```
  The corresponding locations located in the "tensorflow 2.2" source code are as follows：

```

1、/tensorflow/lite/experimental/ruy/kernel\_arm32.cc:631  
// r6 has flags, r4 has row  
“add r5, r1, r4, lsl #2\n”  
“tst r6, #” RUY\_STR(RUY\_ASM\_FLAG\_HAS\_PERCHANNEL) “\n”  
“it ne\n”  
“movne r1, r5\n”  
**“vld1.32 {q10}, [r1]\n” // multiplier\_fixedpoint**

2、/tensorflow/lite/experimental/ruy/kernel\_arm.h:100  
if (dst-\>layout.cols == 1) {  
Kernel8bitNeonOutOfOrder1Col(params);  
return;  
}  
Kernel8bitNeonOutOfOrder(params);  
}

3、/tensorflow/lite/experimental/ruy/kernel\_common.h:69  
#if RUY\_OPT\_ENABLED(RUY\_OPT\_FAT\_KERNEL)  
kernel.Run(lhs, rhs, spec, start\_row, start\_col, end\_row, end\_col, dst);  
#else  
for (int col = start\_col; col \< end\_col; col += RhsLayout::kCols) {  
int block\_end\_col = std::min(col + RhsLayout::kCols, end\_col);  
for (int row = start\_row; row \< end\_row; row += LhsLayout::kCols) {  
int block\_end\_row = std::min(row + LhsLayout::kCols, end\_row);  
kernel.Run(lhs, rhs, spec, row, col, block\_end\_row, block\_end\_col, dst);  
}  
}  
4、/tensorflow/lite/experimental/ruy/trmul\_params.h:39  
void RunKernel(Tuning tuning, const SidePair& start,  
const SidePair& end) {  
run\_kernel(tuning, packed, spec, start, end, &dst);  
}

5、tensorflow/lite/experimental/ruy/thread\_pool.cc:83  
switch (new\_state) {  
case State::Ready:  
if (task\_) {  
// Doing work is part of reverting to ‘ready’ state.  
task\_-\>Run();  
task\_ = nullptr;  
}  
break;  
6、/androidndk/ndk/sources/cxx-stl/llvm-libc++/include/type\_traits:4345  
template \<class \_Fp, class …\_Args\>  
inline \_LIBCPP\_INLINE\_VISIBILITY  
auto  
\_\_invoke(\_Fp&& \_\_f, \_Args&& …\_\_args)  
\_LIBCPP\_INVOKE\_RETURN(\_VSTD::forward\<\_Fp\>(\_\_f)(\_VSTD::forward\<\_Args\>(\_\_args)…))

so I would like to know what is causing the crash and how to fix it，thanks!

---

<div class="post-metadata">

**Author:** ![Rahul\_Gaikwad](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/rahul_gaikwad/32/8151_2.png) [@Rahul\_Gaikwad](https://discuss.ai.google.dev/u/Rahul_Gaikwad)\
**Post date:** [September 12, 2024, 3:43pm UTC](https://discuss.ai.google.dev/t/crash-on-r2-2-libtensorflowlite-c-so/32608/3 "2024-09-12T15:43:22Z")

</div>

Hi, @four_fan

I apologize for the delayed response, if possible could you please try with latest version of TFLite by following these official documentation [Ref-1](https://ai.google.dev/edge/litert/build/android), [Ref-2](https://ai.google.dev/edge/litert/build/arm)

1. Install the latest version of the [Bazel build system](https://bazel.build/versions/master/docs/install.html).
2. The Android NDK is required to build the native (C/C++) LiteRT code. The current recommended version is 25b, which may be found [here](https://developer.android.com/ndk/downloads/older_releases.html#ndk-25b-downloads).
3. The Android SDK and build tools may be obtained [here](https://developer.android.com/tools/revisions/build-tools.html), or alternatively as part of [Android Studio](https://developer.android.com/studio/index.html). Build tools API \>= 23 is the recommended version for building LiteRT.

If issue still persists after trying with latest version of TFLite please let us know with updated error log to investigate this issue further and May I know on which OS are you trying please ?

Thank you for your cooperation and patience.
