문제

I am trying to develop an application in which I use bump API. Everything works fine for the first time. Somehow if I press home button and came back to the application it gets crashed without any exception (sometimes it works fine for 2 or 3 times). When I checked the logcat I got following stack trace:

16:33:18.915: I/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-11 16:33:18.915: I/DEBUG(31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
07-11 16:33:18.915: I/DEBUG(31): pid: 280, tid: 338  >>> dig.app.com <<<
07-11 16:33:18.915: I/DEBUG(31): signal 11 (SIGSEGV), fault addr 4897c000
07-11 16:33:18.915: I/DEBUG(31):  r0 4897bfe0  r1 4897bfe8  r2 ffecb094  r3 00000000
07-11 16:33:18.915: I/DEBUG(31):  r4 00000000  r5 00000000  r6 00000000  r7 00000000
07-11 16:33:18.915: I/DEBUG(31):  r8 00000000  r9 00000000  10 00000000  fp 00000000
07-11 16:33:18.915: I/DEBUG(31):  ip 00000000  sp 480cadf8  lr 00000010  pc afd0f234  cpsr a0000010
07-11 16:33:19.025: I/DEBUG(31):          #00  pc 0000f234  /system/lib/libc.so
07-11 16:33:19.061: W/dalvikvm(280): JNI WARNING: native code passing in bad object 0x4003fc78 0x4003fc78 (Check_SetFloatField)
07-11 16:33:19.061: W/dalvikvm(280):              in Landroid/graphics
/Path;.native_computeBounds (ILandroid/graphics/RectF;)V (SetFloatField)
07-11 16:33:19.061: I/dalvikvm(280): "main" prio=5 tid=1 RUNNABLE
07-11 16:33:19.061: I/dalvikvm(280):   | group="main" sCount=0 dsCount=0 s=N obj=0x4001d8e0 self=0xccb0
07-11 16:33:19.061: I/dalvikvm(280):   | sysTid=280 nice=0 sched=0/0 cgrp=default handle=-1345026008
07-11 16:33:19.061: I/dalvikvm(280):   | schedstat=( 955496474453 102439081045 208084 )
07-11 16:33:19.061: I/dalvikvm(280):   at android.graphics.Path.native_computeBounds(Native Method)
07-11 16:33:19.135: I/DEBUG(31):          #01  pc 00051e22  /data/data/dig.app.com/lib/libandroid-api.so
07-11 16:33:19.135: I/DEBUG(31):          #02  pc 0005401a  /data/data/dig.app.com/lib/libandroid-api.so
07-11 16:33:19.135: I/DEBUG(31):          #03  pc 0005609e  /data/data/dig.app.com/lib/libandroid-api.so
07-11 16:33:19.135: I/DEBUG(31):          #04  pc 000512fe  /data/data/dig.app.com/lib/libandroid-api.so
07-11 16:33:19.135: I/DEBUG(31):          #05  pc 0001103c  /system/lib/libc.so
07-11 16:33:19.135: I/DEBUG(31):          #06  pc 00010b20  /system/lib/libc.so
07-11 16:33:19.135: I/DEBUG(31): code around pc:
07-11 16:33:19.135: I/DEBUG(31): afd0f214 e2522020 3a00004d e35c0018 0a000033 
07-11 16:33:19.135: I/DEBUG(31): afd0f224 e35c0008 0a000018 e491c004 e1a0400c 
07-11 16:33:19.135: I/DEBUG(31): afd0f234 e8b10fe0 f5d1f040 e2522020 2491c004 
07-11 16:33:19.135: I/DEBUG(31): afd0f244 e1833804 e1a04824 e1844805 e1a05825 
07-11 16:33:19.135: I/DEBUG(31): afd0f254 e1855806 e1a06826 e1866807 e1a07827 
07-11 16:33:19.145: I/DEBUG(31): code around lr:
07-11 16:33:19.145: I/DEBUG(31): stack:
07-11 16:33:19.145: I/DEBUG(31):     480cadb8  00000000  
07-11 16:33:19.145: I/DEBUG(31):     480cadbc  005cc628  [heap]
07-11 16:33:19.145: I/DEBUG(31):     480cadc0  00000000  
07-11 16:33:19.145: I/DEBUG(31):     480cadc4  afd103f0  /system/lib/libc.so
07-11 16:33:19.145: I/DEBUG(31):     480cadc8  00000003  
07-11 16:33:19.145: I/DEBUG(31):     480cadcc  afd41724  /system/lib/libc.so
07-11 16:33:19.145: I/DEBUG(31):     480cadd0  00562878  [heap]
07-11 16:33:19.145: I/DEBUG(31):     480cadd4  c0000000  
07-11 16:33:19.145: I/DEBUG(31):     480cadd8  0007d0c4  [heap]
07-11 16:33:19.145: I/DEBUG(31):     480caddc  0007d0c0  [heap]
07-11 16:33:19.145: I/DEBUG(31):     480cade0  488470a1  
07-11 16:33:19.145: I/DEBUG(31):     480cade4  afd0c741  /system/lib/libc.so
07-11 16:33:19.145: I/DEBUG(31):     480cade8  80a7cdd9  /data/data/dig.app.com/lib/libandroid-api.so
07-11 16:33:19.145: I/DEBUG(31):     480cadec  005cc5e0  [heap]
07-11 16:33:19.145: I/DEBUG(31):     480cadf0  df002777  
07-11 16:33:19.145: I/DEBUG(31):     480cadf4  e3a070ad  
07-11 16:33:19.145: I/DEBUG(31): #00 480cadf8  fffffffe  
07-11 16:33:19.145: I/DEBUG(31):     480cadfc  48847099  
07-11 16:33:19.145: I/DEBUG(31):     480cae00  480cae4c  
07-11 16:33:19.145: I/DEBUG(31):     480cae04  0007d0c4  [heap]
07-11 16:33:19.155: I/DEBUG(31):     480cae08  0007d0c0  [heap]
07-11 16:33:19.155: I/DEBUG(31):     480cae0c  488470a1  
07-11 16:33:19.155: I/DEBUG(31):     480cae10  00000002  
07-11 16:33:19.155: I/DEBUG(31):     480cae14  48847098  
07-11 16:33:19.155: I/DEBUG(31):     480cae18  48847008  
07-11 16:33:19.155: I/DEBUG(31):     480cae1c  80a51e25  /data/data/dig.app.com/lib/libandroid-api.so
07-11 16:33:19.155: I/DEBUG(31): #01 480cae20  00000000  
07-11 16:33:19.155: I/DEBUG(31):     480cae24  480cae4c  

The bump API is included as a native library into my application (libandroid-api.so). In order to connect to the bump server I’m using a service and during the onStop (when I press home button) I am unBinding the service and during onStart (when resuming it from background) I will be Binding the service. So if I continue this UnBinding and Binding for 2 or 3 times I am getting this error.

I have done some searching about this signal 11 (SIGSEGV), fault addr, and found out it is happening when application makes an invalid memory reference. I didn’t have any access to this native library. I don’t know what to do.

도움이 되었습니까?

해결책

I had the same problem, the fact is the first api.configure is working fine, the next attempt just crash the application.

I posted what I believe the same problem here: Bump API Android crash

I resolved it myself, I built a singleton around the bump api, so I ensure that the api is configured just one time and then it is only returned once already configured. You'll find the code in my question.

다른 팁

You should only call configure once per app run on the singleton.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top