mlc-llm
mlc-llm copied to clipboard
[Android] Crashing when sending a message
Crashes when sending a message on the exynos version of the s22 ultra on android 13, prompt length doesnt matter
Device Info
Device
--------------------------------------------------------
Device Name : Galaxy S22 Ultra
Model : SM-S908B
Manufacturer : samsung
Device : b0s
Board : s5e9925
Hardware : s5e9925
Brand : samsung
System
--------------------------------------------------------
Android Version : 13
Version Name : T
Released Date : August 15, 2022
Code Name : Android 13
API Level : 33
One UI : 5.1
Security Patch Level : 2023-04-01
Bootloader : S908BXXU4CWCG
Baseband : S908BXXU4CWCH,S908BXXU4CWCH
Java VM : 2.1.0
Kernel : 5.10.136-android12-9-26203352-abS908BXXU4CWCG
Language : English (en_US)
OpenGL ES : 3.2
Root Management Apps : No Apps Detected
SELinux : Unable to determine
Google Play Services : 23.16.13 (190400-527363516)
Vulkan : Supported (1.1)
Treble : Supported
Seamless Updates : Not Supported
CPU
--------------------------------------------------------
SoC : Samsung Exynos 2200
(4 nm)
1 x Cortex-X2 (2.9 GHz)
3 x Cortex-A710 (2.7 GHz)
4 x Cortex-A510 (2.1 GHz)
Processor : Samsung s5e9925
CPU Architecture : 1 x 2.80 GHz
3 x 2.52 GHz
4 x 1.82 GHz
Supported ABIs : arm64-v8a, armeabi-v7a, armeabi
CPU Hardware : s5e9925
CPU Type : 64 Bit
CPU Governor : energy_aware
Cores : 8
CPU Frequency : 400 MHz - 2803 MHz
GPU Renderer : ANGLE (Samsung Xclipse 920) on Vulkan 1.1.179
GPU Vendor : Samsung Electronics Co., Ltd.
GPU Version : OpenGL ES 3.2 ANGLE git hash: 50101db6df97
Memory
--------------------------------------------------------
Random Access Memory
------------------
Type : LPDDR5 3200 MHz
Total : 10515.0MB
Available : 4611.0MB
Used : 6065.0MB
Used Percentage : 56%
System Storage
------------------
Total : 5.33GB
Available : 0.00GB
Used : 5.33GB
Used Percentage : 99%
Internal Storage
------------------
Total : 463.02GB
Available : 371.59GB
Used : 91.43GB
Used Percentage : 19%
I've got this error for S21 Ultra on Android 13 too.
In addition, Seeing that it doesn't work on Pixel, I think it's because it's Exynos.
Qualcomm device is work.
In addition, Seeing that it doesn't work on Pixel, I think it's because it's Exynos.
Qualcomm device is work.
It's also not working on POCO F3
Same here (model is downloaded in local successfully, but crash when sending the first message), my device is Huawei P30 Pro with Kirin 980 chipset, 8G RAM.
According to the logcat error, it's more like a UI level crash instead of mlc/model level.
Detailed Logs
2023-05-10 17:42:02.137 28061-28061/? I/QarthLog: [PatchStore] create disable file for ai.mlc.mlcchat uid is 11163 2023-05-10 17:42:02.148 28061-28061/? E/AndroidRuntime: FATAL EXCEPTION: main Process: ai.mlc.mlcchat, PID: 28061 android.view.InflateException: Binary XML file line #27 in ai.mlc.mlcchat:layout/user_message: Binary XML file line #27 in ai.mlc.mlcchat:layout/user_message: Error inflating classTL;DR
android.view.InflateException: Binary XML file line https://github.com/mlc-ai/mlc-llm/issues/27 in ai.mlc.mlcchat:layout/user_message: Binary XML file line https://github.com/mlc-ai/mlc-llm/issues/27 in ai.mlc.mlcchat:layout/user_message: Error inflating class Caused by: android.view.InflateException: Binary XML file line https://github.com/mlc-ai/mlc-llm/issues/27 in ai.mlc.mlcchat:layout/user_message: Error inflating class Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method)
Thanks for the feedbacks, we didn't get our hand on other phones, but would love to continue improve. There is a recent update to reduce the RAM usage of APK to ~4.5G (previous due to an OpenCL issue the memory usage can be unreasonably high), so if you crashed due to memory issue, feel free to try out (redownload from same apk link will work). We are aware it is not yet working on Pixel.
Same here (model is downloaded in local successfully, but crash when sending the first message), my device is Huawei P30 Pro with Kirin 980 chipset, 8G RAM.
According to the logcat error, it's more like a UI level crash instead of mlc/model level.
Detailed Logs TL;DR
android.view.InflateException: Binary XML file line #27 in ai.mlc.mlcchat:layout/user_message: Binary XML file line #27 in ai.mlc.mlcchat:layout/user_message: Error inflating class Caused by: android.view.InflateException: Binary XML file line #27 in ai.mlc.mlcchat:layout/user_message: Error inflating class Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method)
The same issue, did you manage to solve it later?
Samsung Galaxy Note 10 Snapdragon crashing whenever I hit send. Can't get a single message through before crash.
same issue with samsung S10
--------- beginning of crash 2023-05-25 14:17:16.110 451-555/? A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 555 (pool-4-thread-1), pid 451 (ai.mlc.mlcchat) 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Build fingerprint: 'samsung/beyond1qltezc/beyond1q:12/SP1A.210812.016/G9730ZCU8HVL2:user/release-keys' 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Revision: '17' 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: ABI: 'arm64' 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Processor: '7' 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Timestamp: 2023-05-25 14:17:16.168176132+0800 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Process uptime: 31s 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Cmdline: ai.mlc.mlcchat 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: pid: 451, tid: 555, name: pool-4-thread-1 >>> ai.mlc.mlcchat <<< 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: uid: 10609 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 2023-05-25 14:17:16.714 1406-1406/? A/DEBUG: Abort message: 'terminating with uncaught exception of type tvm::runtime::InternalError: [14:17:16] /Users/houbohan/relax/include/tvm/runtime/device_api.h:291: unknown type =0 Stack trace not available when DMLC_LOG_STACK_TRACE is disabled at compile time.
Also not working on Samsung Note 8 with 10GB swap file.
Thanks for the feedbacks, we didn't get our hand on other phones, but would love to continue improve. There is a recent update to reduce the RAM usage of APK to ~4.5G (previous due to an OpenCL issue the memory usage can be unreasonably high), so if you crashed due to memory issue, feel free to try out (redownload from same apk link will work). We are aware it is not yet working on Pixel.
I have a Pixel. Can I help get this working on Pixel devices?
Getting crash on Redmi K20 Pro as well, Android 13.
07-27 13:43:43.949 29805 29805 E AndroidRuntime: FATAL EXCEPTION: main
07-27 13:43:43.949 29805 29805 E AndroidRuntime: Process: ai.mlc.mlcchat, PID: 29805
07-27 13:43:43.949 29805 29805 E AndroidRuntime: java.lang.IllegalArgumentException: Failed requirement.
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at ai.mlc.mlcchat.AppViewModel$ChatState.requestReloadChat(AppViewModel.kt:401)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at ai.mlc.mlcchat.AppViewModel$ModelState.startChat(AppViewModel.kt:337)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at ai.mlc.mlcchat.StartViewKt$ModelView$1$1$3.invoke(StartView.kt:191)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at ai.mlc.mlcchat.StartViewKt$ModelView$1$1$3.invoke(StartView.kt:189)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$1$2.invoke-k-4lQ0M(Clickable.kt:167)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$1$2.invoke(Clickable.kt:156)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:566)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.dispatchPointerEvent(SuspendingPointerInputFilter.kt:456)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:469)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.node.BackwardsCompatNode.onPointerEvent-H0pRuoY(BackwardsCompatNode.kt:374)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:314)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:183)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:102)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:98)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1361)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1307)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1246)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:500)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1910)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.app.Activity.dispatchTouchEvent(Activity.java:4320)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:458)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.View.dispatchPointerEvent(View.java:15269)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6761)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6557)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6013)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6070)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6036)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6201)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6044)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6258)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6017)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6070)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6036)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6044)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6017)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:9114)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:9065)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:9034)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9237)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:267)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.os.MessageQueue.nativePollOnce(Native Method)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.os.MessageQueue.next(MessageQueue.java:335)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:161)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7926)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
07-27 13:43:43.949 29805 29805 E AndroidRuntime: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@d90501e, androidx.compose.runtime.BroadcastFrameClock@40f70ff, StandaloneCoroutine{Cancelling}@33afecc, AndroidUiDispatcher@788d515]
07-27 13:43:43.954 3694 4597 W ActivityTaskManager: Force finishing activity ai.mlc.mlcchat/.MainActivity
07-27 13:43:43.974 3694 4597 D ActivityTrigger: ActivityTrigger activityPauseTrigger
Please check out the latest apk and feel free to open new issues