0

I'm creating an app with audio but I have created the native audio player in OPENES SL and I'm setting its playback-rate so its giving unusual error and after this app dies and I will show the log

  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  I/DEBUG(17995): Build fingerprint: 'SEMC/MK16i_1249-7510/MK16i:4.0.4/4.1.B.0.587      
 /tL1_3w:user/release-keys'
 I/DEBUG(17995): pid: 30880, tid: 30880  >>> PACKAGE NAME <<<
 I/DEBUG(17995): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
 I/DEBUG(17995):  r0 00000000  r1 00000002  r2 25545b4e  r3 25545b4e
 I/DEBUG(17995):  r4 3b7f2004  r5 00000002  r6 00000000  r7 364e3cc8
 I/DEBUG(17995):  r8 7e9346a8  r9 364e3cc0  10 00000000  fp 7e9346bc
 I/DEBUG(17995):  ip 2aaae108  sp 7e934698  lr 3b7ee8a5  pc 3b7ee8aa  cpsr 00000030
 I/DEBUG(17995):  d0  6472656767756265  d1  69616475536f6928
 I/DEBUG(17995):  d2  2f6d796172685363  d3  726576696563656f
 I/DEBUG(17995):  d4  367815f8367815c0  d5  3678166836781630
 I/DEBUG(17995):  d6  367816d8367816a0  d7  3678174836781710
 I/DEBUG(17995):  d8  0000000000000000  d9  0000000000000000
 I/DEBUG(17995):  d10 0000000000000000  d11 0000000000000000
 I/DEBUG(17995):  d12 0000000000000000  d13 0000000000000000
 I/DEBUG(17995):  d14 0000000000000000  d15 0000000000000000
 I/DEBUG(17995):  d16 000000012b54c880  d17 4010000000000000
 I/DEBUG(17995):  d18 0000000000000000  d19 0000000000000000
 I/DEBUG(17995):  d20 3f1155e54e7e8408  d21 0000000000000000
 I/DEBUG(17995):  d22 0000000000000000  d23 3fede16b9c24a98f
 I/DEBUG(17995):  d24 3e66376972bea4d0  d25 3fc39a09d078c69f
 I/DEBUG(17995):  d26 0000000000000000  d27 0000000000000000
 I/DEBUG(17995):  d28 0000000000000000  d29 0000000000000000
 I/DEBUG(17995):  d30 0000000000000000  d31 0000000000000000
 I/DEBUG(17995):  scr 60000012
 I/DEBUG(17995):          #00  pc 000018aa  /mnt/asec/Package Name-1/lib/libaudio-tools.so (Java_Package Name_receiver_AudioReceiver_NsetRate)
 I/DEBUG(17995):          #01  pc 0001ec30  /system/lib/libdvm.so (dvmPlatformInvoke)
 I/DEBUG(17995):          #02  pc 00058c70  /system/lib/libdvm.so (_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
 I/DEBUG(17995): code around pc:
 I/DEBUG(17995): 3b7ee888 4c0ab538 447c1c15 2b006923 4908d00c  8..L..|D#i.+...I
 I/DEBUG(17995): 3b7ee898 20044a08 447a4479 edc4f7ff 04296a20  .J. yDzD.... j).
 I/DEBUG(17995): 3b7ee8a8 68031409 4798681b 46c0bd38 00003772  ...h.h.G8..Fr7..
 I/DEBUG(17995): 3b7ee8b8 000016b8 00001736 4b09b510 2000b082  ....6......K... 
 I/DEBUG(17995): 3b7ee8c8 6a1a447b d0082a00 466c6813 685b3406  {D.j.*...hlF.4[h
 I/DEBUG(17995): code around lr:
 I/DEBUG(17995): 3b7ee884 00003790 4c0ab538 447c1c15 2b006923  .7..8..L..|D#i.+
 I/DEBUG(17995): 3b7ee894 4908d00c 20044a08 447a4479 edc4f7ff  ...I.J. yDzD....
 I/DEBUG(17995): 3b7ee8a4 04296a20 68031409 4798681b 46c0bd38   j)....h.h.G8..F
 I/DEBUG(17995): 3b7ee8b4 00003772 000016b8 00001736 4b09b510  r7......6......K
 I/DEBUG(17995): 3b7ee8c4 2000b082 6a1a447b d0082a00 466c6813  ... {D.j.*...hlF
 I/DEBUG(17995): stack:
 I/DEBUG(17995):     7e934658  3b9add97  /system/lib/libwilhelm.so
 I/DEBUG(17995):     7e93465c  00000000  
 I/DEBUG(17995):     7e934660  7e9346a8  [stack]
 I/DEBUG(17995):     7e934664  364e3cc4  
 I/DEBUG(17995):     7e934668  00000000  
 I/DEBUG(17995):     7e93466c  001af51c  [heap]
 I/DEBUG(17995):     7e934670  00000000  
 I/DEBUG(17995):     7e934674  25545b4e  
 I/DEBUG(17995):     7e934678  00000000  
 I/DEBUG(17995):     7e93467c  3b7f2004  /mnt/asec/Package name-1/lib/libaudio-tools.so
 I/DEBUG(17995):     7e934680  00000002  
 I/DEBUG(17995):     7e934684  00000000  
 I/DEBUG(17995):     7e934688  364e3cc8  
 I/DEBUG(17995):     7e93468c  3b7ee8a5  /mnt/asec/Package name-1/lib/libaudio-tools.so
 I/DEBUG(17995):     7e934690  df0027ad  
 I/DEBUG(17995):     7e934694  00000000  
 I/DEBUG(17995): #00 7e934698  364e3d28  
 I/DEBUG(17995):     7e93469c  3677dd08  /dev/ashmem/dalvik-LinearAlloc (deleted)
 I/DEBUG(17995):     7e9346a0  00012b68  [heap]
 I/DEBUG(17995):     7e9346a4  2b2bdc34  /system/lib/libdvm.so
 I/DEBUG(17995): #01 7e9346a8  364e3cbc  
 I/DEBUG(17995):     7e9346ac  00000001  
 I/DEBUG(17995):     7e9346b0  2bdea110  /dev/ashmem/dalvik-heap (deleted)
 I/DEBUG(17995):     7e9346b4  00012b78  [heap]
 I/DEBUG(17995):     7e9346b8  7e934938  [stack]
 I/DEBUG(17995):     7e9346bc  2b2f7c73  /system/lib/libdvm.so
 I/BootReceiver(283): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
 I/ActivityManager(283): Process PACKAGE NAME (pid 30880) has died.

And below is my ndk code of setting rate

JNIEXPORT void Java_PACKAGE NAME_receiver_AudioReceiver_NsetRate(
    JNIEnv* env, jclass clazz, jint rate) {
if (NULL != fdPlayerPlay) {

    SLresult result;
    LOGI("SET RATE");
    result = (*fdPlaybackRate)->SetRate(fdPlaybackRate, rate);

    assert(SL_RESULT_SUCCESS == result);

}
}

SO PLEASE ANYONE CAN TELL ME WHAT IS THIS ERROR AND HOW CAN I RESOLVE IT?

EDIT:

I have taken the native player code from here but its still giving the same error please help me out ,I can't figure it out what the error is :(

Community
  • 1
  • 1

1 Answers1

-1

Use NDK addr2line to translate pc 000018aa to line number in your code.

It's not clear what fdPlayerPlay and fdPlaybackRate stand for, and how these are declared. But it's possible that the following line has a typo. Instead of

result = (*fdPlaybackRate)->SetRate(fdPlaybackRate, rate);

it should maybe read

result = (*fdPlayerPlay)->SetRate(fdPlaybackRate, rate);

if (NULL != fdPlayerPlay) {

it should maybe read

if (NULL != fdPlaybackRate) {

(as in OpenSLEngine.cpp:165)

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • I have tried this also but it gives error that fdPlayerPlay doesn't have method SetRate –  Jan 27 '14 at 04:21
  • _Let me repeat:_ It's not clear what `fdPlayerPlay` and `fdPlaybackRate` stand for, and how these are declared. _And how they are initialized._ – Alex Cohn Jan 27 '14 at 09:37
  • you can have a look at the link I have in my question –  Jan 27 '14 at 09:39
  • I don't see `fdPlayerPlay` on the page http://stackoverflow.com/questions/11094377/android-how-to-change-playback-rate-of-music-using-opensl-es. If you don't want to be cooperative, there is no reason to post your crash stack on this site. – Alex Cohn Jan 27 '14 at 09:46
  • ok fdPlayerPlay is a variable name of SLPlayItf which is a audio player in native and fdPlaybackRate is a variable name of SLPlaybackRateItf which is the the rate of the speed of the audio –  Jan 27 '14 at 09:52