Description
I am newer use the WhisperCpp in Android.
I use Android Studio Koala 2024.1.1 compile the "whisper.cpp\examples\whisper.android", then build the APK is ok but it will crash where Android 10 real phone and Android API 35 x86_64 emu. Any one have met the issue?
2025-03-17 17:50:28.419 8052-8052 LibWhisper com.whispercppdemo D Primary ABI: x86_64
2025-03-17 17:50:28.420 8052-8052 LibWhisper com.whispercppdemo D Loading libwhisper.so
2025-03-17 17:50:28.584 8052-8052 nativeloader com.whispercppdemo D Load /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!/lib/x86_64/libwhisper.so using ns clns-6 from class loader (caller=/data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!classes2.dex): ok
2025-03-17 17:50:28.622 8052-8075 MainScreenViewModel com.whispercppdemo V Processing samples/samples_jfk.wav...
2025-03-17 17:50:28.626 8052-8075 MainScreenViewModel com.whispercppdemo V Copying samples/samples_jfk.wav to /data/user/0/com.whispercppdemo/files/samples/samples_jfk.wav...
2025-03-17 17:50:28.805 8052-8072 EGL_emulation com.whispercppdemo I Opening libGLESv1_CM_emulation.so
2025-03-17 17:50:28.813 8052-8072 EGL_emulation com.whispercppdemo I Opening libGLESv2_emulation.so
2025-03-17 17:50:28.835 8052-8072 HWUI com.whispercppdemo W Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2025-03-17 17:50:28.837 8052-8072 HWUI com.whispercppdemo W Failed to initialize 101010-2 format, error = EGL_SUCCESS
2025-03-17 17:50:28.840 8052-8058 .whispercppdemo com.whispercppdemo I Compiler allocated 5155KB to compile void android.view.ViewRootImpl.performTraversals()
2025-03-17 17:50:28.902 8052-8072 Gralloc4 com.whispercppdemo I mapper 4.x is not supported
2025-03-17 17:50:29.250 8052-8052 .whispercppdemo com.whispercppdemo W Method boolean androidx.compose.runtime.snapshots.SnapshotStateList.conditionalUpdate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2025-03-17 17:50:29.250 8052-8052 .whispercppdemo com.whispercppdemo W Method java.lang.Object androidx.compose.runtime.snapshots.SnapshotStateList.mutate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2025-03-17 17:50:29.250 8052-8052 .whispercppdemo com.whispercppdemo W Method void androidx.compose.runtime.snapshots.SnapshotStateList.update(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2025-03-17 17:50:29.741 8052-8058 .whispercppdemo com.whispercppdemo I Compiler allocated 5155KB to compile void android.view.ViewRootImpl.performTraversals()
2025-03-17 17:50:29.842 8052-8066 HWUI com.whispercppdemo I Davey! duration=2524ms; Flags=1, FrameTimelineVsyncId=55498, IntendedVsync=2924728823594, Vsync=2924728823594, InputEventId=0, HandleInputStart=2924744638100, AnimationStart=2924744702400, PerformTraversalsStart=2924744744600, DrawStart=2927130262600, FrameDeadline=2924745490260, FrameInterval=2924744608100, FrameStartTime=16666666, SyncQueued=2927147101300, SyncStart=2927174192500, IssueDrawCommandsStart=2927176065700, SwapBuffers=2927257490000, FrameCompleted=2927280456300, DequeueBufferDuration=40700, QueueBufferDuration=394800, GpuCompleted=2927280456300, SwapBuffersCompleted=2927271987400, DisplayPresentTime=72904454231359566, CommandSubmissionCompleted=2927257490000,
2025-03-17 17:50:29.862 8052-8052 Choreographer com.whispercppdemo I Skipped 132 frames! The application may be doing too much work on its main thread.
2025-03-17 17:50:29.912 8052-8066 HWUI com.whispercppdemo I Davey! duration=2253ms; Flags=0, FrameTimelineVsyncId=55520, IntendedVsync=2925095490246, Vsync=2927295490158, InputEventId=0, HandleInputStart=2927311051700, AnimationStart=2927311169100, PerformTraversalsStart=2927321943500, DrawStart=2927322236200, FrameDeadline=2927312156824, FrameInterval=2927309855500, FrameStartTime=16666666, SyncQueued=2927323329000, SyncStart=2927323623500, IssueDrawCommandsStart=2927323796900, SwapBuffers=2927329606100, FrameCompleted=2927348820200, DequeueBufferDuration=40300, QueueBufferDuration=814200, GpuCompleted=2927348820200, SwapBuffersCompleted=2927331687100, DisplayPresentTime=144115222452437076, CommandSubmissionCompleted=2927329606100,
2025-03-17 17:50:30.022 8052-8075 MainScreenViewModel com.whispercppdemo V Copied samples/samples_jfk.wav to /data/user/0/com.whispercppdemo/files/samples/samples_jfk.wav
2025-03-17 17:50:30.342 8052-8077 JNI com.whispercppdemo I Loading model from asset 'models/ggml-tiny.bin'
2025-03-17 17:50:31.769 8052-8077 libc com.whispercppdemo A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x70 in tid 8077 (DefaultDispatch), pid 8052 (.whispercppdemo)
2025-03-17 17:50:32.305 8052-8072 EGL_emulation com.whispercppdemo D app_time_stats: avg=301.96ms min=6.36ms max=1788.47ms count=8
2025-03-17 17:50:32.362 8088-8088 DEBUG crash_dump64 A Cmdline: com.whispercppdemo
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A pid: 8052, tid: 8077, name: DefaultDispatch >>> com.whispercppdemo <<<
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #00 pc 00000000001eecc0 /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (ggml_backend_get_default_buffer_type+16) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #1 pc 00000000001ed520 /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (ggml_backend_alloc_ctx_tensors+32) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #2 pc 00000000001419a8 /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (whisper_kv_cache_init(whisper_kv_cache&, ggml_backend*, ggml_type, long, long, int)+392) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #3 pc 0000000000140220 /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (whisper_init_state+400) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #4 pc 00000000001496dd /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (whisper_init_with_params+125) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #5 pc 00000000001d6d6c /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (whisper_init_from_asset+252) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.363 8088-8088 DEBUG crash_dump64 A #6 pc 00000000001d6c40 /data/app/~~vCph6xZhx6y7BBB0Db2qlw==/com.whispercppdemo-cGcDemqo-XaNUo26wdf1zA==/base.apk!libwhisper.so (offset 0x31000) (Java_com_whispercpp_whisper_WhisperLib_00024Companion_initContextFromAsset+80) (BuildId: 40d2039a3ce17403bf18f703f83612826b31a082)
2025-03-17 17:50:32.366 8088-8088 DEBUG crash_dump64 A #19 pc 0000000000006f6c anonymous:7cc95687f000 (com.whispercppdemo.ui.main.MainScreenViewModel$loadBaseModel$2.invokeSuspend+0)
---------------------------- PROCESS ENDED (8052) for package com.whispercppdemo ----------------------------