Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Erro ocorrendo em JNI (libc)

Após uma grande ajuda do Thiago, consegui rodar o comando abaixo e obter onde está sendo gerado o erro na JNI

c:\Users\gorio>adb logcat | ndk-stack -sym C:\Users\gorio\Documents\Projetos\Gorio\gorio-app\mobile\build\intermediates\ndk\debug\obj\local\armeabi > C:\Users\gorio\foo.txt

********** Crash dump: **********
Build fingerprint: 'samsung/klteub/klte:4.4.2/KOT49H/G900MUBU1ANCE:user/release-keys'
pid: 4948, tid: 4961, name: Timer-0  >>> com.gorio.android <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
Stack frame 02-12 10:12:56.643   291   291 F DEBUG   :     #00 pc 000012e6  /data/app/com.gorio.android-1/lib/arm/libandroid_jni.so: Routine getProcessName at C:\Users\gorio\Documents\Projetos\Gorio\gorio-app\mobile\src\main\jni/android_jni.c:87
Stack frame 02-12 10:12:56.643   291   291 F DEBUG   :     #01 pc 000016f7  /data/app/com.gorio.android-1/lib/arm/libandroid_jni.so: Routine getIPV6OpenConnections at C:\Users\gorio\Documents\Projetos\Gorio\gorio-app\mobile\src\main\jni/android_jni.c:207
Stack frame 02-12 10:12:56.643   291   291 F DEBUG   :     #02 pc 000017b7  /data/app/com.gorio.android-1/lib/arm/libandroid_jni.so (Java_com_gorio_android_JNI_getRunningConnections+46): Routine Java_com_gorio_android_JNI_getRunningConnections at C:\Users\gorio\Documents\Projetos\Gorio\gorio-app\mobile\src\main\jni/android_jni.c:263

​Agora preciso ver o motivo desses erros..

​Obrigado​

Atenciosamente

Gorio
(www.gorio.eng.br)

 


Em 12 de fevereiro de 2016 06:25, Thiago Lopes Rosa <thiago.rosa@gmail.com> escreveu:
Este é o famoso "segmentation fault", uma referência inválidada de memória...

Utilize o ndk-stack para ver o stacktrace completo (e em qual linha aconteceu o erro)!



2016-02-11 17:18 GMT-02:00 Gorio <goriofab@gmail.com>:
Boa.. vou monitorar esses métodos..

Na verdade não foram criados por mim, mas vou colocar um logger neles..

Muito Obrigado

Atenciosamente

Gorio


Em 11 de fevereiro de 2016 17:14, Márcio Oliveira <prof.mro@gmail.com> escreveu:
Ok, eu não conheço JNI direito, mas parece que você esta fazendo alguma chamada de uma API da libc que está retornando um objeto nulo ou invalido, talvez fazendo um check nos retornos de funções possa fazer com que não crashe mais...

Em 11 de fevereiro de 2016 16:46, Gorio <goriofab@gmail.com> escreveu:
​é rootado 

Não acredito ser erro de permissão, pois hora o código funciona, hora gera o erro.

OBS.: Estou rodando isso em background (Service) com TimerTask

Atenciosamente

Gorio


Em 11 de fevereiro de 2016 16:40, Márcio Oliveira <prof.mro@gmail.com> escreveu:
É rooteado? Você consegue executar este comando no shell? Pode ser alguma coisa relacionado a permissões....

2016-02-11 16:19 GMT-02:00 Gorio <goriofab@gmail.com>:
Boa tarde,

Agora que consegui fazer rodar o código JNI está ocorrendo outro erro.

Alguém poderia me dar uma luz do que seria esse erro ?

02-11 15:43:35.912 10323-10323/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x33312f67 in tid 10323 (lockbit.android)
02-11 15:43:37.921 11946-11946/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x33312f67 in tid 11946 (lockbit.android)
02-11 15:43:39.810 12050-12050/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x33312f67 in tid 12050 (lockbit.android)
02-11 16:04:47.319 20556-20556/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 20556 (lockbit.android)
02-11 16:04:49.318 21603-21603/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x33312f67 in tid 21603 (lockbit.android)
02-11 16:08:25.967 21906-21906/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 21906 (lockbit.android)
02-11 16:09:28.620 25927-25927/com.gorio.android A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x222c2265 in tid 25927 (lockbit.android)

O que o código da JNI faz ? Rodo um comando netstat em busca de dados de conexões para saber o que esta se conectando e onde estou me conectando.

Atenciosamente

Gorio

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário