3

I've been trying to debug my android app on a Sony Experia e4g phone (usb debugging is enabled on the device) but with no luck. The error message I get is the following:

10-20 18:19:49.760 9504-9511/com.jeronimo.superfan I/dalvikvm: Debugger is active

10-20 18:19:50.202 9504-9511/com.jeronimo.superfan A/libc: Fatal signal 11 (SIGSEGV) at 0x0000000a (code=1), thread 9511 (JDWP)

This happens immediately after the debugger attaches itself as you can see from the timestamp.

The app runs perfectly ok on the phone and on the emulator and I can debug it on the emulator.

I've searched on the internet a lot and found that this has to do with the devices memory but nothing I have tried works.

I'm developing on a Win 8.1 pro machine with Android Studio 1.4 and the latest SDK.

I've even created a new project with a blank activity (template from Android studio) and the same thing happens.

It's driving me mad because I can't finish my project. Any ideas are greatly appreciated.

Aspicas
  • 4,498
  • 4
  • 30
  • 53
sonarclick
  • 73
  • 8
  • Make sure you have the latest drivers, and have no other instances of Android Studio open. – em_ Oct 20 '15 at 15:54
  • probebly related to native code (libc). this might help http://stackoverflow.com/a/14023479/1500988 – Kuldeep Dhaka Oct 20 '15 at 18:56
  • @ElliotM - I have the latest drivers and only one instance of Android Studio is open. I have killed adb and restarted it, restarted the phone and windows to no avail. The weird thing is that in DDMS I can see the device and app (on port 8600 / 8700 - and when I use the app I see network traffic as expected so it must be connected) but the green bug is inactive (greyed out). I'm using JDK 8 and I think I might downgrade to 7 and see if this goes away but I see no logic in it since it works with the emulator. – sonarclick Oct 21 '15 at 07:47
  • @Kuldeep - I haven't got any C/C++ code in the app. If any java libraries are causing this wouldn't it show up in emulator debugging as well? I receive this error before the app shows its first screen. – sonarclick Oct 21 '15 at 07:55
  • @sonarclick you emulator probebly run on a x86_64 (or x86) machine and your phone has a ARM based processor. so, internally there are difference in compilation, targetted for diferrent arch. my recommendation is to replicate the problem on a 3rd device (not an emulator and preferably not from the same vendor). if the problem persists, probebly there is something else causing problem. afaik SIGSEGV is served when the kernel detect that your code is trying to do something bad (like accessing invalid memory etc...). also, as you stated try to change JDK version. try variation to see a pattern. – Kuldeep Dhaka Oct 21 '15 at 11:35
  • @Kuldeep - Thanks for your efforts. I tried downgrading to JDK 7 (80) but it made no difference. I have come to the same conclusion as you and will try to find another device (not Sony) to test. If it works then it's a Sony xperia specific issue. – sonarclick Oct 21 '15 at 12:41
  • 1
    Thanks everyone for your suggestions. I got a Samsung Galaxy Core Prime phone and everything works as it should without changing any settings (enabled developer options, set usb debugging to on and the debugger attached first time with no problems). Therefore, I believe this is a Sony Xperia e4g specific issue. I just hope that this will help someone else. – sonarclick Oct 23 '15 at 17:44

0 Answers0