whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

build : fix iOS and Android examples

Open ggerganov opened this issue 9 months ago • 4 comments
trafficstars

The mobile application builds have been lacking maintenance for a long time. The examples need to be updated:

Examples:

  • https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.android
  • https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.objc
  • https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.swiftui

Tasks:

  • Fix any existing bugs that might have occurred recently
  • Improve build instructions
  • Improve CI builds

ggerganov avatar Feb 04 '25 07:02 ggerganov

I tried to build but it requires libomp.so when trying on android, and I tried to change the cmakelist but after everything was successfully compiled everything went well but inference took 90 seconds for the jfk.wav sample

and if you run inference twice the application will close.

edit:

After I changed the processor to 1 and thread 4, now whisper runs successfully without closing.

azkadev avatar Feb 07 '25 06:02 azkadev

How about using cross-platform framework or RAD, such as flutter, MAUI, Delphi? Single codebase for Android & iOS and desktop, easier to maintain.

foldl avatar Feb 09 '25 04:02 foldl

How about using cross-platform framework or RAD, such as flutter, MAUI, Delphi?

I'm not familiar with these technologies, so don't have an opinion. The main purpose of these mobile examples is to serve as an initial step for developing your own whisper.cpp-based apps, so they should do the bare minimum without any extra dependencies, so that the user can decide which technologies to use.

ggerganov avatar Feb 09 '25 09:02 ggerganov

Can I be a maintainer for android, Linux / maybe an application?

currently I have flutter skills but for cpp / c / cmake not too good, but I will try,

Here I make a library for dart and flutter https://github.com/General-Developer/whisper_library

I tried on android and linux it runs perfectly.

I don't have another device so I can't try,

this is an example of a simple application I just made:Can I be a maintainer for android / maybe an application?

currently I have flutter skills but for cpp / c / cmake not too good, but I will try,

Here I make a library for dart and flutter https://github.com/General-Developer/whisper_library

I tried on android and linux it runs perfectly.

I don't have another device so I can't try,

this is an example of a simple application I just made:

Image

azkadev avatar Feb 10 '25 11:02 azkadev

I had no success with whisper.android.java, couldn't get gradle to cooperate with Android Studio.

whisper.android fired right up and built though. When I added the a model (even the tiniest one), it crashed with the below stack trace.

Checking out sha 6a52eaea works perfectly! So it's a recent breakage, shouldn't be too bad to fix.

I couldn't figure out how to toggle cmake build type from Gradle or Android Studio, so I just commented out these two lines from CMakeLists.txt, since the performance is horrible without it 😄

    #if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    # endif ()

Stack from latest master:

---------------------------- PROCESS STARTED (2515) for package com.whispercppdemo ----------------------------
2025-03-15 11:19:12.494  1422-1478  VSyncReactor            surfaceflinger                       I  Current= 120, Period= 120, Distance= 120
2025-03-15 11:19:12.559  1248-2199  HYPER-HAL               ven...amsung.hardware.hyper-service  I  [ResourceManager.cpp]removeResource(): [CPUMaxFreq] RemoveResource Request ID : 14690924
2025-03-15 11:19:12.559  1248-2199  HYPER-HAL               ven...amsung.hardware.hyper-service  I  [RequestManager.cpp]releaseLocked(): Released ID : 14690924
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Build fingerprint: 'samsung/p3qsqw/p3q:14/UP1A.231005.007/G998USQSEGYA5:user/release-keys'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Revision: '20'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  ABI: 'arm64'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Processor: '7'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Timestamp: 2025-03-15 11:19:12.333864390-0400
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Process uptime: 2s
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  Cmdline: com.whispercppdemo
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  pid: 2208, tid: 2443, name: DefaultDispatch  >>> com.whispercppdemo <<<
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  uid: 10399
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000070
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  Cause: null pointer dereference
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x0  0000000000000000  x1  0000000000000000  x2  0000000000000000  x3  b400006f324dab80
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x4  0000006d79cc67d0  x5  b400006f324dac10  x6  0000000000005816  x7  7f7f7f7f7f7f7f7f
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x8  0000000000000000  x9  ac5667751c4c87f3  x10 0000000000000003  x11 0000000000000001
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x12 0000000000000010  x13 0000000000000000  x14 0000000000000000  x15 0000000034155555
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x16 0000006d02955da0  x17 0000006d028444c0  x18 0000006d01e4a000  x19 b400006eb251e3a0
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x20 0000000000000000  x21 b400006eb251e460  x22 0000000000000003  x23 0000006d79cc8250
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x24 000000708b7dda40  x25 0000000000000003  x26 000000708b7d6f10  x27 0000000000000003
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x28 0000006d79cc8110  x29 0000006d79cc6830
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      lr  0000006d02842b8c  sp  0000006d79cc6820  pc  0000006d028444d4  pst 0000000060001000
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  66 total frames
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  backtrace:
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #00 pc 00000000001e04d4  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (ggml_backend_get_default_buffer_type+20) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #01 pc 00000000001deb88  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (ggml_backend_alloc_ctx_tensors+32) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #02 pc 0000000000135774  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_kv_cache_init(whisper_kv_cache&, ggml_backend*, ggml_type, long, long, int)+336) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #03 pc 0000000000134454  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_init_state+316) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #04 pc 000000000013bd98  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_init_with_params+96) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #05 pc 00000000001c8ef8  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_init_from_asset+216) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #06 pc 00000000001c8dec  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (Java_com_whispercpp_whisper_WhisperLib_00024Companion_initContextFromAsset+76) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #07 pc 000000000037ef70  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #08 pc 0000000000368774  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #09 pc 0000000000361de4  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1928) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #10 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #11 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #12 pc 0000000000001fe4  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (com.whispercpp.whisper.WhisperContext$Companion.createContextFromAsset+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #13 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #14 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #15 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #16 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #17 pc 0000000000006fec  [anon:dalvik-classes8.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (com.whispercppdemo.ui.main.MainScreenViewModel$loadBaseModel$2.invokeSuspend+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #18 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #19 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #20 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #21 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #22 pc 00000000002726e8  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #23 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #24 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #25 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #26 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #27 pc 00000000002baaac  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.DispatchedTask.run+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #28 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #29 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #30 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #31 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #32 pc 00000000002f4cd0  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.internal.LimitedDispatcher$Worker.run+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #33 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #34 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #35 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #36 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #37 pc 00000000002fc888  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.TaskImpl.run+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #38 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #39 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #40 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #41 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #42 pc 00000000002fb958  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #43 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #44 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #45 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #46 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #47 pc 00000000002fa514  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #48 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #49 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #50 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #51 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #52 pc 00000000002fa62c  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #53 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #54 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #55 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #56 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #57 pc 00000000002fa614  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #58 pc 00000000003535dc  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1932) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #59 pc 000000000037f098  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #60 pc 0000000000368774  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #61 pc 0000000000353f24  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #62 pc 0000000000947968  /apex/com.android.art/lib64/libart.so (_ZN3art9ArtMethod14InvokeInstanceILc86ETpTncJEEENS_6detail12ShortyTraitsIXT_EE4TypeEPNS_6ThreadENS_6ObjPtrINS_6mirror6ObjectEEEDpNS3_IXT0_EE4TypeE+60) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #63 pc 0000000000636878  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #64 pc 00000000000c37f4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #65 pc 000000000005d0c4  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
2025-03-15 11:19:12.876   882-882   tombstoned              tombstoned                           E  Tombstone written to: tombstone_14
2025-03-15 11:19:12.883  1059-1059  audit                   auditd                               E  type=1701 audit(1742051952.876:11365): auid=4294967295 uid=10399 gid=10399 ses=4294967295 subj=u:r:untrusted_app:s0:c143,c257,c512,c768 pid=2208 comm="DefaultDispatch" exe="/system/bin/app_process64" sig=11 res=1
2025-03-15 11:19:12.884  1579-2516  ActivityTaskManager     system_server                        W    Force finishing activity com.whispercppdemo/.MainActivity
2025-03-15 11:19:12.884  1579-2535  ActivityManager         system_server                        W  crash : com.whispercppdemo,10399

haydenflinner avatar Mar 15 '25 15:03 haydenflinner

I had no success with whisper.android.java, couldn't get gradle to cooperate with Android Studio.

whisper.android fired right up and built though. When I added the a model (even the tiniest one), it crashed with the below stack trace.

Checking out sha 6a52eaea works perfectly! So it's a recent breakage, shouldn't be too bad to fix.

I couldn't figure out how to toggle cmake build type from Gradle or Android Studio, so I just commented out these two lines from CMakeLists.txt, since the performance is horrible without it 😄

    #if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    # endif ()

Stack from latest master:

---------------------------- PROCESS STARTED (2515) for package com.whispercppdemo ----------------------------
2025-03-15 11:19:12.494  1422-1478  VSyncReactor            surfaceflinger                       I  Current= 120, Period= 120, Distance= 120
2025-03-15 11:19:12.559  1248-2199  HYPER-HAL               ven...amsung.hardware.hyper-service  I  [ResourceManager.cpp]removeResource(): [CPUMaxFreq] RemoveResource Request ID : 14690924
2025-03-15 11:19:12.559  1248-2199  HYPER-HAL               ven...amsung.hardware.hyper-service  I  [RequestManager.cpp]releaseLocked(): Released ID : 14690924
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Build fingerprint: 'samsung/p3qsqw/p3q:14/UP1A.231005.007/G998USQSEGYA5:user/release-keys'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Revision: '20'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  ABI: 'arm64'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Processor: '7'
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Timestamp: 2025-03-15 11:19:12.333864390-0400
2025-03-15 11:19:12.857  2512-2512  DEBUG                   crash_dump64                         A  Process uptime: 2s
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  Cmdline: com.whispercppdemo
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  pid: 2208, tid: 2443, name: DefaultDispatch  >>> com.whispercppdemo <<<
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  uid: 10399
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000070
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  Cause: null pointer dereference
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x0  0000000000000000  x1  0000000000000000  x2  0000000000000000  x3  b400006f324dab80
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x4  0000006d79cc67d0  x5  b400006f324dac10  x6  0000000000005816  x7  7f7f7f7f7f7f7f7f
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x8  0000000000000000  x9  ac5667751c4c87f3  x10 0000000000000003  x11 0000000000000001
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x12 0000000000000010  x13 0000000000000000  x14 0000000000000000  x15 0000000034155555
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x16 0000006d02955da0  x17 0000006d028444c0  x18 0000006d01e4a000  x19 b400006eb251e3a0
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x20 0000000000000000  x21 b400006eb251e460  x22 0000000000000003  x23 0000006d79cc8250
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x24 000000708b7dda40  x25 0000000000000003  x26 000000708b7d6f10  x27 0000000000000003
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      x28 0000006d79cc8110  x29 0000006d79cc6830
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A      lr  0000006d02842b8c  sp  0000006d79cc6820  pc  0000006d028444d4  pst 0000000060001000
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  66 total frames
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A  backtrace:
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #00 pc 00000000001e04d4  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (ggml_backend_get_default_buffer_type+20) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #01 pc 00000000001deb88  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (ggml_backend_alloc_ctx_tensors+32) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #02 pc 0000000000135774  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_kv_cache_init(whisper_kv_cache&, ggml_backend*, ggml_type, long, long, int)+336) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #03 pc 0000000000134454  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_init_state+316) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #04 pc 000000000013bd98  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_init_with_params+96) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #05 pc 00000000001c8ef8  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (whisper_init_from_asset+216) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #06 pc 00000000001c8dec  /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk!libwhisper_v8fp16_va.so (offset 0xee5000) (Java_com_whispercpp_whisper_WhisperLib_00024Companion_initContextFromAsset+76) (BuildId: 75b6b0999c3cf868816321be83653c65e000be99)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #07 pc 000000000037ef70  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #08 pc 0000000000368774  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #09 pc 0000000000361de4  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1928) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #10 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #11 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #12 pc 0000000000001fe4  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (com.whispercpp.whisper.WhisperContext$Companion.createContextFromAsset+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #13 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #14 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #15 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #16 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #17 pc 0000000000006fec  [anon:dalvik-classes8.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (com.whispercppdemo.ui.main.MainScreenViewModel$loadBaseModel$2.invokeSuspend+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #18 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #19 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #20 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #21 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #22 pc 00000000002726e8  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #23 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #24 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #25 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #26 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #27 pc 00000000002baaac  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.DispatchedTask.run+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #28 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #29 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #30 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #31 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #32 pc 00000000002f4cd0  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.internal.LimitedDispatcher$Worker.run+0)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #33 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #34 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #35 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #36 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.858  2512-2512  DEBUG                   crash_dump64                         A        #37 pc 00000000002fc888  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.TaskImpl.run+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #38 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #39 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #40 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #41 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #42 pc 00000000002fb958  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #43 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #44 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #45 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #46 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #47 pc 00000000002fa514  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #48 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #49 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #50 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #51 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #52 pc 00000000002fa62c  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #53 pc 0000000000354250  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.16344227474899595276)+428) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #54 pc 0000000000362678  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4124) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #55 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #56 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #57 pc 00000000002fa614  [anon:dalvik-classes9.dex extracted in memory from /data/app/~~h6aDmgN6L0EOl8AKIp1Z6w==/com.whispercppdemo-YXSYYgcrAuQw6V6bwEbuhQ==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+0)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #58 pc 00000000003535dc  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1932) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #59 pc 000000000037f098  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #60 pc 0000000000368774  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #61 pc 0000000000353f24  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #62 pc 0000000000947968  /apex/com.android.art/lib64/libart.so (_ZN3art9ArtMethod14InvokeInstanceILc86ETpTncJEEENS_6detail12ShortyTraitsIXT_EE4TypeEPNS_6ThreadENS_6ObjPtrINS_6mirror6ObjectEEEDpNS3_IXT0_EE4TypeE+60) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #63 pc 0000000000636878  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #64 pc 00000000000c37f4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
2025-03-15 11:19:12.859  2512-2512  DEBUG                   crash_dump64                         A        #65 pc 000000000005d0c4  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
2025-03-15 11:19:12.876   882-882   tombstoned              tombstoned                           E  Tombstone written to: tombstone_14
2025-03-15 11:19:12.883  1059-1059  audit                   auditd                               E  type=1701 audit(1742051952.876:11365): auid=4294967295 uid=10399 gid=10399 ses=4294967295 subj=u:r:untrusted_app:s0:c143,c257,c512,c768 pid=2208 comm="DefaultDispatch" exe="/system/bin/app_process64" sig=11 res=1
2025-03-15 11:19:12.884  1579-2516  ActivityTaskManager     system_server                        W    Force finishing activity com.whispercppdemo/.MainActivity
2025-03-15 11:19:12.884  1579-2535  ActivityManager         system_server                        W  crash : com.whispercppdemo,10399

also have same issu how to fix it?

jikun2008 avatar Mar 20 '25 08:03 jikun2008

I think this issue might be completed since the following PRs have been merged:

  • whisper.android: https://github.com/ggerganov/whisper.cpp/commit/996581c5e2cc5af24496fbc5c0e73703d3bd536f
  • whisper.objc: https://github.com/ggerganov/whisper.cpp/commit/83b14c357c71b68cd489fb7b555767eec1a30a01
  • whisper.swiftui: https://github.com/ggerganov/whisper.cpp/commit/5bb1d58c6ad0838b26e45215dc3c6d3f8733b0a0

There might be other commits related to these examples as well, but the we have gone through them and verified that they are working.

And objc, swiftui, and android examples are build as part of CI, and android.java has an open PR.

danbev avatar Mar 28 '25 09:03 danbev

On my end there is an issue with the SwiftUI example where the record button does not do anything (https://github.com/ggerganov/whisper.cpp/pull/2921#issuecomment-2751504209)

But, I am not sure if it's a configuration problem on my system. Does it work for you?

Edit: seems like a problem on my end - ignore.

ggerganov avatar Mar 28 '25 15:03 ggerganov