vincentjames501 / libvorbis-libogg-android

JNI Android wrapper for encoding and decoding ogg/vorbis bitstreams
67 stars 39 forks source link

JNI ERROR (app bug): attempt to use stale local reference #11

Closed misopeth closed 9 years ago

misopeth commented 9 years ago

I'm trying to use this library to mix 3 ogg files; I decode the three files obtaining three short array, them mix them and then converting into a byte array. Then I encode this array to a ogg file, but the encoding fail, giving this message: 10-04 17:10:58.904: E/dalvikvm(1408): JNI ERROR (app bug): attempt to use stale local reference 0x85700021 10-04 17:10:58.904: W/dalvikvm(1408): JNI WARNING: 0x85700021 is not a valid JNI reference 10-04 17:10:58.904: W/dalvikvm(1408): in Lorg/xiph/vorbis/encoder/VorbisEncoder;.startEncodingWithBitrate:(JJJLorg/xiph/vorbis/encoder/EncodeFeed;)I (DeleteLocalRef) 10-04 17:10:58.914: I/dalvikvm(1408): "main" prio=5 tid=1 RUNNABLE 10-04 17:10:58.914: I/dalvikvm(1408): | group="main" sCount=0 dsCount=0 obj=0x40a14568 self=0x2a00b9e0 10-04 17:10:58.914: I/dalvikvm(1408): | sysTid=1408 nice=0 sched=0/0 cgrp=apps handle=1073870640 10-04 17:10:58.934: I/dalvikvm(1408): | schedstat=( 7371794597 8134632791 2824 ) utm=647 stm=90 core=0 10-04 17:10:58.934: I/dalvikvm(1408): at org.xiph.vorbis.encoder.VorbisEncoder.startEncodingWithBitrate(Native Method)

I can make the encoding work by commenting all the "DeleteLocalRef" in the method "startEncoding" in file "org_xiph_vorbis_encoder_VorbisEncoder" (but I think this shouldn't be done...).