Android Question Snowboy crashes

Discussion in 'Android Questions' started by Multiverse app, Mar 20, 2019.

  1. Multiverse app

    Multiverse app Active Member Licensed User

    This problem is regarding the Snowboy library that @DonManfred wrapped.

    Snowboy recently trained universal hotword for us:
    upload_2019-3-20_22-12-56.png

    The issue we are facing is that we are not able to initialize the Snowboy object with any .udml file.
    When the following method is called, the app crashes with no logs:
    Code:
    snowboy.Initialize("Snowboy"File.Combine(File.DirInternal, "snowboy/common.res"), models, sensivity)
    Same for the hotword "jarvis":
    upload_2019-3-20_22-15-8.png


    When the .pmdl files of the same hotword are used, it works fine: upload_2019-3-20_22-17-25.png
    However, the "pmdl" files are trained by only a single user, and can't be used for all users.

    All the help is appreciated
     
    Last edited: Apr 11, 2019
  2. DonManfred

    DonManfred Expert Licensed User

    There is no such thing in Android!

    There MUST be an entry in the LOG. Check the unfiltered log as the crash maybe happens in the native library
     
  3. Multiverse app

    Multiverse app Active Member Licensed User

    Code:
    snowboy is file
    java.io.FileNotFoundException: snowboy
        at android.content.res.AssetManager.nativeOpenAsset(Native Method)
        at android.content.res.AssetManager.open(AssetManager.java:
    796)
        at android.content.res.AssetManager.open(AssetManager.java:
    773)
        at ai.kitt.snowboy.AppResCopy.copyFilesFromAssets(AppResCopy.java:
    44)
        at ai.kitt.snowboy.AppResCopy.copyResFromAssetsToSD(AppResCopy.java:
    65)
        at de.donmanfred.SnowBoyWrapper.Initialize(SnowBoyWrapper.java:
    93)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.shell.Shell.runVoidMethod(
    Shell.java:777)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:354)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:255)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    144)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    176)
        at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:
    22)
        at anywheresoftware.b4a.keywords.Common$
    13.run(Common.java:1690)
        at android.os.Handler.handleCallback(Handler.java:
    873)
        at android.os.Handler.dispatchMessage(Handler.java:
    99)
        at android.os.Looper.loop(Looper.java:
    214)
        at android.app.ActivityThread.main(ActivityThread.java:
    7045)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:
    493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    964)
    Need 
    to enable context aware info
    native_setup
    constructor
    setListener
    TVQE init sucess!
     jni/tvqe_java.c, 
    167
    --------- beginning of crash
    Fatal signal 
    6 (SIGABRT), code -6 (SI_TKILL) in tid 18245 (ltiverse.jarvis), pid 18245 (ltiverse.jarvis)
    obtaining output fd from tombstoned, 
    type: kDebuggerdTombstone
    received crash request 
    for pid 18245
    performing dump of process 
    18245 (target tid = 18245)
    !@   
    8,0 r 11561949 382679276 w 3942895 85802852 d 372393 53289176 f 1120188 1136223 iot 5560716 4511242 th 279112 0 0 pt 0 inp 0 0 176681.858
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 
    'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXU4DSBA:user/release-keys'
    Revision: '10'
    ABI: 'arm'
    pid: 18245, tid: 18245, name: ltiverse.jarvis  >>> com.multiverse.jarvis <<<
    signal 
    6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
        r0  
    00000000  r1  00004745  r2  00000006  r3  00000008
        r4  
    00004745  r5  00004745  r6  ffdae814  r7  0000010c
        r8  c366b120  r9  b0ce9ed8  r10 
    00000000  r11 b0cf2154
        ip  ffdae7b0  sp  ffdae800  lr  e5b6fe71  pc  e5b66e62
    backtrace:
        
    #00 pc 0001ce62  /system/lib/libc.so (abort+58)
        
    #01 pc 000beb3b  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so (__gnu_cxx::__verbose_terminate_handler()+226)
        
    #02 pc 000882b5  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so (__cxxabiv1::__terminate(void (*)())+4)
        
    #03 pc 0008792f  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so
        
    #04 pc 000880c9  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so
        
    #05 pc 000c9a40  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so
        
    #06 pc 000c9c2c  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so (__gnu_Unwind_RaiseException+148)
        
    #07 pc 000ca748  /data/app/com.multiverse.jarvis-KNTOv67HOJ31vWTwhkPRmg==/lib/arm/libsnowboy-detect-android.so (___Unwind_RaiseException+20)
    AudioPolicyManager:setRecordSilenced(uid:
    10005, silenced:1)
     
  4. DonManfred

    DonManfred Expert Licensed User

    It is not much info.
    The crash happens inside the .so file. Not much i can do about...

    I checked their website about a update. The sources are available on Github but unfortunately no precompiled Android .so File for Version 1.3.
    I´m not able to compile it. Don´t know how to compile a C++ Library to .so
     
  5. Multiverse app

    Multiverse app Active Member Licensed User

  6. Multiverse app

    Multiverse app Active Member Licensed User

    Let me put a request for this
     
  7. wes58

    wes58 Active Member Licensed User

    On Github https://github.com/kitt-ai/snowboy there is an app SnowboyAlexaDemo.apk. If you open it with 7zip (for example) you can find a precompiled libsnowboy-detect-android.so, which I believe is the latest version.
     
    Multiverse app likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice