gallery icon indicating copy to clipboard operation
gallery copied to clipboard

[BUG] App crashes immediately after model launch

Open redd-96 opened this issue 6 months ago • 5 comments

Describe the bug:
Immediate crash after pressing "try it" when choosing Gemma-3n biggest (4.4 GB) model

To Reproduce:
Go to "AI Chat" or any other -> choose "Gemma-3n" -> "try it"

Expected behavior:
it should launch the conversation window and let me write a prompt. Instead it immediately crashes the app

Smartphone (please complete Gems the following information):

  • Device: Samsung S20+ (SM-G986U)
  • OS: Android 13
  • Browser: Google Chrome
  • Version: last one

redd-96 avatar Jun 05 '25 17:06 redd-96

I've observed similar behaviour:

  • Device: OnePlus 6T
  • Cpu: Snapdragon 845
  • OS: Android 11
  • Version: 1.0.3

Log:

AGNewReleaseNotification            curRelease: 1.0.3, newRelease: 1.0.3, isNewer: false
AGLlmSingleTurnScreen               Initializing model 'Qwen2.5-1.5B-Instruct q8' from LlmsingleTurnScreen launched effect
AGModelManagerViewModel             Initializing model 'Qwen2.5-1.5B-Instruct q8'...
AGLlmChatModelHelper                Initializing...
AGResponsePanel                     Pager settled on model 'Qwen2.5-1.5B-Instruct q8' from 'Qwen2.5-1.5B-Instruct q8'. Updating selected model.
.aiedge.galler                      Compiler allocated 10MB to compile void com.google.ai.edge.gallery.ui.llmsingleturn.PromptTemplatesPanelKt.PromptTemplatesPanel(com.google.ai.edge.gallery.data.Model, com.google.ai.edge.gallery.ui.llmsingleturn.LlmSingleTurnViewModel, com.google.ai.edge.gallery.ui.modelmanager.ModelManagerViewModel, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, androidx.compose.ui.Modifier, androidx.compose.runtime.Composer, int, int)
tflite                              Initialized TensorFlow Lite runtime.
libc                                Access denied finding property "ro.hardware.chipname"
tflite                              Created TensorFlow Lite XNNPACK delegate for CPU.
tflite                              XNNPack weight cache loaded from '/storage/emulated/0/Android/data/com.google.aiedge.gallery/files/Qwen2_5_1_5B_Instruct_q8/20250514/Qwen2.5-1.5B-Instruct_multi-prefill-seq_q8_ekv1280.task.xnnpack_cache'.
tflite                              Replacing 1239 out of 1359 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 172 partitions for subgraph 0.
tflite                              Cannot reserve space in a cache that isn't building.
libc                                Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20809 (drishti/20809), pid 11204 (.aiedge.gallery)
DEBUG                               pid: 11204, tid: 20809, name: drishti/20809  >>> com.google.aiedge.gallery <<<
DEBUG                                     #01 pc 000000000077cde8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #02 pc 0000000000906cdc  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #03 pc 00000000008a3e94  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #04 pc 00000000008a5894  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #05 pc 00000000008a5948  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #06 pc 000000000088cbd0  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #07 pc 0000000000881830  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #08 pc 00000000007790d8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #09 pc 0000000000999e50  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #10 pc 0000000000999750  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #11 pc 00000000009993e8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #12 pc 0000000000766c9c  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #13 pc 000000000099e28c  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #14 pc 000000000099f088  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #15 pc 0000000000993830  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #16 pc 00000000003acfcc  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #17 pc 00000000003ac834  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #18 pc 00000000003ac488  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #19 pc 00000000003aab14  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #20 pc 0000000000535f48  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #21 pc 0000000000524e80  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #22 pc 0000000000524d90  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #23 pc 0000000000967250  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #24 pc 0000000000966fd8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)

But it works fine on a more recent Android 15 device 👍

RobinKanis avatar Jun 11 '25 13:06 RobinKanis

I've observed similar behaviour:

  • Device: OnePlus 6T
  • Cpu: Snapdragon 845
  • OS: Android 11
  • Version: 1.0.3

Log:

AGNewReleaseNotification            curRelease: 1.0.3, newRelease: 1.0.3, isNewer: false
AGLlmSingleTurnScreen               Initializing model 'Qwen2.5-1.5B-Instruct q8' from LlmsingleTurnScreen launched effect
AGModelManagerViewModel             Initializing model 'Qwen2.5-1.5B-Instruct q8'...
AGLlmChatModelHelper                Initializing...
AGResponsePanel                     Pager settled on model 'Qwen2.5-1.5B-Instruct q8' from 'Qwen2.5-1.5B-Instruct q8'. Updating selected model.
.aiedge.galler                      Compiler allocated 10MB to compile void com.google.ai.edge.gallery.ui.llmsingleturn.PromptTemplatesPanelKt.PromptTemplatesPanel(com.google.ai.edge.gallery.data.Model, com.google.ai.edge.gallery.ui.llmsingleturn.LlmSingleTurnViewModel, com.google.ai.edge.gallery.ui.modelmanager.ModelManagerViewModel, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, androidx.compose.ui.Modifier, androidx.compose.runtime.Composer, int, int)
tflite                              Initialized TensorFlow Lite runtime.
libc                                Access denied finding property "ro.hardware.chipname"
tflite                              Created TensorFlow Lite XNNPACK delegate for CPU.
tflite                              XNNPack weight cache loaded from '/storage/emulated/0/Android/data/com.google.aiedge.gallery/files/Qwen2_5_1_5B_Instruct_q8/20250514/Qwen2.5-1.5B-Instruct_multi-prefill-seq_q8_ekv1280.task.xnnpack_cache'.
tflite                              Replacing 1239 out of 1359 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 172 partitions for subgraph 0.
tflite                              Cannot reserve space in a cache that isn't building.
libc                                Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20809 (drishti/20809), pid 11204 (.aiedge.gallery)
DEBUG                               pid: 11204, tid: 20809, name: drishti/20809  >>> com.google.aiedge.gallery <<<
DEBUG                                     #01 pc 000000000077cde8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #02 pc 0000000000906cdc  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #03 pc 00000000008a3e94  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #04 pc 00000000008a5894  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #05 pc 00000000008a5948  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #06 pc 000000000088cbd0  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #07 pc 0000000000881830  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #08 pc 00000000007790d8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #09 pc 0000000000999e50  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #10 pc 0000000000999750  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #11 pc 00000000009993e8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #12 pc 0000000000766c9c  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #13 pc 000000000099e28c  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #14 pc 000000000099f088  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #15 pc 0000000000993830  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #16 pc 00000000003acfcc  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #17 pc 00000000003ac834  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #18 pc 00000000003ac488  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #19 pc 00000000003aab14  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #20 pc 0000000000535f48  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #21 pc 0000000000524e80  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #22 pc 0000000000524d90  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #23 pc 0000000000967250  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)
DEBUG                                     #24 pc 0000000000966fd8  /data/app/~~fNr78wn1LcvtLMTJAF62DQ==/com.google.aiedge.gallery-uCIdwwAWkCinOpChzkGBhg==/base.apk!libllm_inference_engine_jni.so (offset 0x169c000) (BuildId: dec4aa7d9079fe4b4836e6c6fa251187)

But it works fine on a more recent Android 15 device 👍

I found out that the problem is about incorrect settings ‼️

Don't select "support images" + choose CPU only + make sure there is enough RAM available for the model to load.

If you follow these steps LLM should work without issues 👍

redd-96 avatar Jun 12 '25 02:06 redd-96

I found out that the problem is about incorrect settings ‼️

Don't select "support images" + choose CPU only + make sure there is enough RAM available for the model to load.

If you follow these steps LLM should work without issues 👍

Stupid question: where do I find those settings?! In the settings menu, I see only a Theme selection and an option to clear the HuggingFace access token...

I get the same crash on a current Pixel 9a, just updated to Android 16...

tobiasdruenerEPG avatar Jun 12 '25 08:06 tobiasdruenerEPG

This consistently happens with 3n-E2B for me, but not any other models, including 3n-E4B. I'm using a Pixel 6a with Android 15.

Eiim avatar Jun 12 '25 18:06 Eiim

Hello all,

Apologies for the delayed response. Thank you all for providing your device information and valuable feedback.

We have noted this bug and have been tracking it. We appreciate your help in documenting this issue.

Thanks!

dpknag avatar Jul 10 '25 08:07 dpknag