Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems running Pocketsphinx demo project, segmentation fault?
    primarykey
    data
    text
    <p>I'm new here and I hope I could get some help with an Android App using Pocketsphinx (with NDK).</p> <p>I am doing this work for a school projekt where we are making a GPS and we wanted to add some offline voice recognition, Pocketsphinx seems to be the way to go so I downloaded the libraris sphinxbase and pocketsphinx as well as the demoproject they have. </p> <p>After quiet a lot of fixing and trying (first of installing and getting used to Ubuntu, fixing errors I got when trying to compile the libraries, errors from trying to build the libraries with the NDK to get the .so file, problems with the project not having right libraries for Android and transforming it to a 2.1 project to test on my phone) I was able to get the program to run(though for some reason I have to lanch it 2 ro 3 times before it shows up on my phone).</p> <p>My problem appears when I try to use the demo project, for those that don't know how it looks it's just a simple text area and a button, you press the button so it starts recording and then you speak and the inputed speech should appear as text in the area, as soon as I click this button it closes. It doesn't crash, the process dies but I don't get a stacktrace. From what I can see from the debug information it starts the recording process but then crashes after this, my guess is it crashes once it is about to start doing the work with the native code.</p> <p>What I can understand from the unclear debug information I get is that the Native enviroment is being closed, I get a message from the debug with the tag Zygote and the message being "Process X terminated by signal(11)". From my searching I have learnt that this most likely means a segmentation fault (SIGSEGV). </p> <p>This is as far as I have gotten, I have no real understanding of what segmentation fault means or how to resolve this problem. Below I'll add a part of the log, this is what I see before the program dies, if you need anymore information from the logs plese tell me what and how to get it as I am very unsure what information will be helpful. </p> <p>I am working on Ubuntu 11.10 with Eclipse and the Android pluggins, my phone is a Sony Ericsson Xperia if that's relevant, running some Sony Ericsson version of Android 2.1, the sphinx libraries are the latest version from the Sphinx projects website. </p> <p>Hope someone here can give me some way to keep working on this, I am mostly a Java developer but I have done some work in C++ so if I have to I'll dig into the C code as well but I hope it won't go that far.</p> <p>Here is the log extract:</p> <pre><code>03-20 11:37:22.676: D/edu.cmu.pocketsphinx.demo.RecognizerTask(385): signalling START 03-20 11:37:22.676: D/edu.cmu.pocketsphinx.demo.RecognizerTask(385): signalled START 03-20 11:37:22.676: D/edu.cmu.pocketsphinx.demo.RecognizerTask(385): gotSTART 03-20 11:37:22.676: D/edu.cmu.pocketsphinx.demo.RecognizerTask(385): START 03-20 11:37:22.806: D/edu.cmu.pocketsphinx.demo.PocketSphinxDemo(385): Showing Dialog 03-20 11:37:22.826: I/AudioHardwareQSD(1066): AudioHardware PCM record is going to standby. 03-20 11:37:22.836: I/AudioHardwareQSD(1066): AudioHardware PCM record is going to standby. 03-20 11:37:22.836: D/dalvikvm(385): +++ not scanning '/system/lib/libwebcore.so' for 'Decoder_startUtt__SWIG_0' (wrong CL) 03-20 11:37:22.836: D/dalvikvm(385): +++ not scanning '/system/lib/libexif.so' for 'Decoder_startUtt__SWIG_0' (wrong CL) 03-20 11:37:22.846: I/DEBUG(1063): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 03-20 11:37:22.846: I/DEBUG(1063): Build fingerprint: 'SEMC/X10i_1234-9753/X10i/es209ra:2.1-update1/2.1.A.0.435/TP7d:user/release-keys' 03-20 11:37:22.846: I/DEBUG(1063): pid: 385, tid: 395 &gt;&gt;&gt; edu.cmu.pocketsphinx.demo &lt;&lt;&lt; 03-20 11:37:22.846: I/DEBUG(1063): signal 11 (SIGSEGV), fault addr 0000001c 03-20 11:37:22.846: I/DEBUG(1063): r0 00000000 r1 00000000 r2 00000154 r3 8c6d703c 03-20 11:37:22.846: I/DEBUG(1063): r4 00000000 r5 81356e14 r6 475c8d6c r7 00000000 03-20 11:37:22.846: I/DEBUG(1063): r8 475c8d6c r9 00000154 10 43117f40 fp 00123e08 03-20 11:37:22.846: I/DEBUG(1063): ip 8130c191 sp 475c8d18 lr 8130c1a1 pc 8130d568 cpsr 40000030 03-20 11:37:22.866: I/DEBUG(1063): #00 pc 0000d568 /data/data/edu.cmu.pocketsphinx.demo/lib/libpocketsphinx_jni.so 03-20 11:37:22.866: I/DEBUG(1063): #01 pc 0000c19c /data/data/edu.cmu.pocketsphinx.demo/lib/libpocketsphinx_jni.so 03-20 11:37:22.876: I/DEBUG(1063): #02 pc 0000edb4 /system/lib/libdvm.so 03-20 11:37:22.876: I/DEBUG(1063): code around pc: 03-20 11:37:22.876: I/DEBUG(1063): 8130d558 447db089 1c0458ab 681b1c0f 93074691 03-20 11:37:22.876: I/DEBUG(1063): 8130d568 2b0069c3 e0d3d100 36301c06 f0331c30 03-20 11:37:22.876: I/DEBUG(1063): code around lr: 03-20 11:37:22.876: I/DEBUG(1063): 8130c190 b083b500 21001c10 93019200 f9d6f001 03-20 11:37:22.876: I/DEBUG(1063): 8130c1a0 bd00b003 b084b510 93019200 23001c10 03-20 11:37:22.876: I/DEBUG(1063): 8130c1b0 93022400 f0009403 f030fe3b 9903fc47 03-20 11:37:22.876: I/DEBUG(1063): stack: 03-20 11:37:22.876: I/DEBUG(1063): 475c8cd8 7fffffff 03-20 11:37:22.876: I/DEBUG(1063): 475c8cdc ab227f0f /system/lib/libmedia.so 03-20 11:37:22.876: I/DEBUG(1063): 475c8ce0 afe3db7c 03-20 11:37:22.876: I/DEBUG(1063): 475c8ce4 afe0f130 /system/lib/libc.so 03-20 11:37:22.876: I/DEBUG(1063): 475c8ce8 afe3db7c 03-20 11:37:22.876: I/DEBUG(1063): 475c8cec afe0f130 /system/lib/libc.so 03-20 11:37:22.876: I/DEBUG(1063): 475c8cf0 00000000 03-20 11:37:22.876: I/DEBUG(1063): 475c8cf4 afe0f048 /system/lib/libc.so 03-20 11:37:22.876: I/DEBUG(1063): 475c8cf8 afe3d9c4 03-20 11:37:22.876: I/DEBUG(1063): 475c8cfc 00002004 03-20 11:37:22.876: I/DEBUG(1063): 475c8d00 00000001 03-20 11:37:22.876: I/DEBUG(1063): 475c8d04 078bcd20 03-20 11:37:22.876: I/DEBUG(1063): 475c8d08 00000209 03-20 11:37:22.886: I/DEBUG(1063): 475c8d0c b0000463 /system/bin/linker 03-20 11:37:22.886: I/DEBUG(1063): 475c8d10 df002777 03-20 11:37:22.886: I/DEBUG(1063): 475c8d14 e3a070ad 03-20 11:37:22.886: I/DEBUG(1063): #00 475c8d18 00000000 03-20 11:37:22.886: I/DEBUG(1063): 475c8d1c afe0f048 /system/lib/libc.so 03-20 11:37:22.886: I/DEBUG(1063): 475c8d20 afe3d9c4 03-20 11:37:22.886: I/DEBUG(1063): 475c8d24 0014bac0 [heap] 03-20 11:37:22.886: I/DEBUG(1063): 475c8d28 003952b8 [heap] 03-20 11:37:22.886: I/DEBUG(1063): 475c8d2c 0000a000 [heap] 03-20 11:37:22.886: I/DEBUG(1063): 475c8d30 ad00ef40 /system/lib/libdvm.so 03-20 11:37:22.886: I/DEBUG(1063): 475c8d34 8c6d703c 03-20 11:37:22.886: I/DEBUG(1063): 475c8d38 0014ba78 [heap] 03-20 11:37:22.886: I/DEBUG(1063): 475c8d3c 475c8d6c 03-20 11:37:22.886: I/DEBUG(1063): 475c8d40 43117f54 03-20 11:37:22.886: I/DEBUG(1063): 475c8d44 475c8d90 03-20 11:37:22.886: I/DEBUG(1063): 475c8d48 00000004 03-20 11:37:22.886: I/DEBUG(1063): 475c8d4c 458ad8c8 /mspace/dalvik-heap/2 (deleted) 03-20 11:37:22.886: I/DEBUG(1063): 475c8d50 43117f60 03-20 11:37:22.886: I/DEBUG(1063): 475c8d54 8130c1a1 /data/data/edu.cmu.pocketsphinx.demo/lib/libpocketsphinx_jni.so 03-20 11:37:22.886: I/DEBUG(1063): #01 475c8d58 00000000 03-20 11:37:22.886: I/DEBUG(1063): 475c8d5c 00000000 03-20 11:37:22.886: I/DEBUG(1063): 475c8d60 430fdfae /data/dalvik-cache/data@app@edu.cmu.pocketsphinx.demo.apk@classes.dex 03-20 11:37:22.886: I/DEBUG(1063): 475c8d64 ad00edb8 /system/lib/libdvm.so 03-20 11:37:23.026: D/Zygote(1065): Process 385 terminated by signal (11) 03-20 11:37:23.056: I/ActivityManager(1140): Process edu.cmu.pocketsphinx.demo (pid 385) has died. 03-20 11:37:23.056: I/UsageStats(1140): Unexpected resume of com.android.launcher while already resumed in edu.cmu.pocketsphinx.demo 03-20 11:37:23.056: I/WindowManager(1140): WIN DEATH: Window{45f50c48 edu.cmu.pocketsphinx.demo/edu.cmu.pocketsphinx.demo.PocketSphinxDemo paused=false} 03-20 11:37:23.086: I/AudioHardwareQSD(1066): AudioHardware PCM record is going to standby. 03-20 11:37:23.116: W/InputManagerService(1140): Got RemoteException sending setActive(false) notification to pid 385 uid 10106 </code></pre> <p>I have been trying to find an answer and most threads I found asked to look in the log file from the app and those were usually the end of the thread, my project doens't give me a log file (even if the code to create one is there). I am at a loss of where to look next and I hope someone here can give me a hand.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload