[android-developers] Re: Help! Process down after loadlibrary in Service

2009-04-01 Thread ambrosehua

It seems that the process(26719) shut down, rather than the service
(26726);
Do you mean whether  the service which loaded the .so shut down or
after service loaded .so, the process(26719) which maybe use the
service got killed?

On 4月1日, 下午4时32分, herain  wrote:
> I need to load a .so library in my Service onCreate method, but the
> process just down after System.load. On the other hand, the same code
> can work in Activity.
> Are there some differences between activity and service in the way of
> load .so file.
>
> My code:
> class AisoundService extends Service{
> @Override
> public void onCreate() {
> Log.d(TAG, "> TestService.onCreate");
> String libFile = "/data/nativelib/libAisound4.so";
> Log.d(TAG, "Trying to load "+libFile);
> System.load(libFile);
> Log.d(TAG, "Load "+libFile+" Succes");
> }
>
> }
>
> This is Logcat record:
> 04-01 07:57:25.761: DEBUG/AisoundService(26726): >
> TestService.onCreate
> 04-01 07:57:25.771: DEBUG/AisoundService(26726): Trying to load /data/
> nativelib/libAisound4.so
> 04-01 07:57:25.771: DEBUG/dalvikvm(26726): Trying to load lib /data/
> nativelib/libAisound4.so 0x42fc5230
> 04-01 07:57:25.781: DEBUG/dalvikvm(26726): Added shared lib /data/
> nativelib/libAisound4.so 0x42fc5230
> 04-01 07:57:25.901: INFO/DEBUG(26719): *** *** *** *** *** *** *** ***
> *** *** *** *** *** *** *** ***
> 04-01 07:57:25.901: INFO/DEBUG(26719): Build fingerprint: 'tmobile/
> kila/dream/trout:1.1/PLAT-RC33/126986:user/ota-rel-keys,release-keys'
> 04-01 07:57:25.901: INFO/DEBUG(26719): pid: 26726, tid: 26726  >>>
> com.iflytek.service <<<
> 04-01 07:57:25.901: INFO/DEBUG(26719): signal 11 (SIGSEGV), fault addr
> 0018
> 04-01 07:57:25.901: INFO/DEBUG(26719):  r0   r1 ad0665f0  r2
> fffee5cc  r3 c33578a5
> 04-01 07:57:25.901: INFO/DEBUG(26719):  r4 802cc814  r5 ad07edf8  r6
>   r7 802cc7e0
>
> Thanks for any help!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Help! Process down after loadlibrary in Service

2009-04-01 Thread fadden

On Apr 1, 1:32 am, herain  wrote:
> I need to load a .so library in my Service onCreate method, but the
> process just down after System.load. On the other hand, the same code
> can work in Activity.
[...]
> 04-01 07:57:25.901: INFO/DEBUG(26719): pid: 26726, tid: 26726  >>>
> com.iflytek.service <<<
> 04-01 07:57:25.901: INFO/DEBUG(26719): signal 11 (SIGSEGV), fault addr
> 0018
> 04-01 07:57:25.901: INFO/DEBUG(26719):  r0   r1 ad0665f0  r2
> fffee5cc  r3 c33578a5
> 04-01 07:57:25.901: INFO/DEBUG(26719):  r4 802cc814  r5 ad07edf8  r6
>   r7 802cc7e0
>

What's on the next 4 lines?

I'm curious to see if it's crashing inside your library, e.g. in
JNI_OnLoad.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---