android - AudioRecord Lollipop crash -


i have crash in app in lollipop, working perfect previous versions. crash:

f/libc    (25307): fatal signal 7 (sigbus), code 2, fault addr 0x993b260c in tid 25750 (pool-16-thread-) i/debug   (14112): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** i/debug   (14112): build fingerprint: 'google/hammerhead/hammerhead:5.0/lrx21o/1570415:user/release-keys' i/debug   (14112): revision: '11' i/debug   (14112): abi: 'arm' i/debug   (14112): pid: 25307, tid: 25750, name: pool-16-thread-  >>> de.shopnow <<< i/debug   (14112): signal 7 (sigbus), code 2 (bus_adrerr), fault addr 0x993b260c i/debug   (14112):     r0 993b260c  r1 8fd03344  r2 000006fc  r3 00000004 i/debug   (14112):     r4 00001500  r5 00000000  r6 993b2d0c  r7 9e8ed640 i/debug   (14112):     r8 00000700  r9 b591bd0c  sl 8d1ff7d4  fp 00000000 i/debug   (14112):     ip 80000000  sp 8d1ff7c0  lr b58da9b7  pc b6f4cef8  cpsr 800b0030 i/debug   (14112):  i/debug   (14112): backtrace: i/debug   (14112):     #00 pc 00012ef8  /system/lib/libc.so (__memcpy_base+59) i/debug   (14112):     #01 pc 000569b3  /system/lib/libmedia.so (android::audiorecord::read(void*, unsigned int)+82) i/debug   (14112):     #02 pc 00095dbb  /system/lib/libandroid_runtime.so i/debug   (14112):     #03 pc 00270fd7  /data/dalvik-cache/arm/system@framework@boot.oat w/debuggerd(14112): type=1400 audit(0.0:278): avc: denied { read } name="kgsl-3d0" dev="tmpfs" ino=6205 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file w/debuggerd(14112): type=1400 audit(0.0:279): avc: denied { read } name="kgsl-3d0" dev="tmpfs" ino=6205 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file w/audioflinger(  185): recordthread: buffer overflow 

any ideas?

i had same problem you, after rewriting audio recording code crashes stopped.

those steps i've taken in order fix problem:

  1. make sure not confusing byte size short size. result returned getminbuffersize in bytes, , value sets buffer size in audiorecord's constructor in bytes.
  2. i switched using 1 array data (and playing offsets) using separate buffer, don't know if solved can try it.

i'd recommend attach code next time. might people answer questions (i, example, find potential flaws in code might cause problem).

edit:

as mentioned in comment, open issue can found here, solution problem second step mentioned in answer.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -