Looking up source line numbers from a native crash reported by Google Play - android-ndk

Google Play reports crashes in my NDK native Android app.
These reports include a callstack.
Good so far, but I would like to know line numbers as well, not just which function it crashed in.
Example report from Google Play:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.steenriver.buggy <<<
backtrace:
#00 pc 00000000001cf97c /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so (SoundEngineStart+1500)
#01 pc 00000000001cc7f8 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so
#02 pc 00000000001e42f8 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so (_Z7nfy_msgPKc+120)
#03 pc 00000000001d657c /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so
#04 pc 00000000001e42f8 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so (_Z7nfy_msgPKc+120)
#05 pc 00000000001c4ae0 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so (_Z14view_touchDowniiPiPfS0_+824)
#06 pc 00000000001465a8 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so
#07 pc 00000000001f3d18 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so
#08 pc 0000000000145b8c /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so (android_main+368)
#09 pc 00000000001f3b84 /data/app/com.steenriver.buggy-1/lib/arm/libbuggy.so
#10 pc 0000000000046eb3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
#11 pc 0000000000019acd /system/lib/libc.so (__start_thread+6)
I would like to know which line number SoundEngineStart+1500 maps to.
I did find the utility ndk-stack but if I feed it my crash, there are no line numbers shown, and ndk-stack just passes through the crash info as-is.
My NDK binary is build in latest AndroidStudio using cmake external build. I do not use any obfuscation like proguard.

Related

While i am running my emulator on android studio i frequently get this error and them the system starts restarting

Emulator: emulator: WARNING: System.cpp:1139: Ignoring invalid parameter detected in function: 0000000000000000 file: 0000000000000000, line: 0, expression: 0000000000000000
got the same Error message....
Emulator: emulator: WARNING: System.cpp:1142: Ignoring invalid parameter detected in function: 0000000000000000 file: 0000000000000000, line: 0, expression: 0000000000000000
Solved it by going into Tools>AVD Manager, selecting the device emulator I was working with and doing wipe data.

Chrome remote desktop AND android emulator

I remote(chrome remote) to my desktop which runs android studio. When I try to run the emulator from android studio, i see the window with the virtual device open. But the device doesn't power on. This is not the behavior when I use the desktop directly to run the android project. Could this behavior be because of the remoting? If so how do i change it?
My need is to work on android studio on a remote connection, if there is a way to achieve it, kindly advise.
This is the AVD log
C:\Users\xxx\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_21 -netspeed full -netdelay none
emulator: device fd:1228
HAX is working and emulator runs in fast virt mode
creating window 61 83 462 820
logcat
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 E/libprocessgroup﹕ failed to make and chown /acct/uid_10053: Read-only file system
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 W/Zygote﹕ createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
04-29 12:06:39.078 1966-1966/com.example.xxx.four4 I/art﹕ Not late-enabling -Xcheck:jni (already on)
04-29 12:06:39.183 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Render dirty regions requested: true
04-29 12:06:39.186 1966-1966/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607f4c0, tid 1966
04-29 12:06:39.319 1966-1966/com.example.xxx.four4 D/Atlas﹕ Validating map...
04-29 12:06:40.050 1966-1966/com.example.xxx.four4 I/Choreographer﹕ Skipped 42 frames! The application may be doing too much work on its main thread.
04-29 12:06:40.184 1966-1986/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607fa60, tid 1986
04-29 12:06:40.231 1966-1986/com.example.xxx.four4 I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-29 12:06:40.469 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Enabling debug mode 0
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/EGL_emulation﹕ eglSurfaceAttrib not implemented
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa6083580, error=EGL_SUCCESS
04-29 12:07:12.637 1966-1973/com.example.xxx.four4 W/art﹕ Suspending all threads took: 13.570ms
Thanks.
I have the same issue using a remote desktop. I solved it using another remote access application TeamViewer (http://teamviewer.com)
Using TeamViewer you can run any Android Emulator like x86, x86_64 or arm.
The Android emulator is not using all of your cpu capabilities but rather a single thread and my guess is that the remote desktop and the emulator are sharing the same thread thus preventing from your emulator to run while using the remote desktop. the solution is to use a stronger cpu or a different remote desktop as user2839592 said.

dlopen failed: cannot locate symbol "signal"

I am developing an Android app using NDK.
I have built OpenSSL as static libraries, libcrypto.a and libssl.a, which I linked with my custom C code.
When I try to load the library at runtime I get:
dlopen failed: cannot locate symbol "signal"...
Any idea how to fix this?
Thanks!
Update:
This comes from libcrypto:
libcrypto.a:
00000000 *UND* 00000000 signal
In my .so I see:
libtest.so:
NEEDED libc.so
...
00040240 <signal#plt>:
40240: e28fc601 add ip, pc, #1048576 ; 0x100000
40244: e28cca80 add ip, ip, #128, 20 ; 0x80000
40248: e5bcfd64 ldr pc, [ip, #3428]! ; 0xd64
So why is it complaining about "signal"?

Android· L release SoundPool have bug

The Android L release has a bug in SoundPool. I want to know how I can fix it.
The error occurs when I Release a sound resource using SoundPool.release(). It gets stuck in this function.
Here are parts of the log from traces.txt:
native: #00 pc 00012c00 /system/lib/libc.so (short+28)
native: #01 pc 000159dd /system/lib/libc.so (__pthread_cond_timedwait_relative(pthread_cond_t*, pthread_mutex_t*, timespec const*)+52)
native: #02 pc 00172660 [heap] (???)
at android.media.SoundPool$SoundPoolImpl.release(Native method)
at android.media.SoundPool.release(SoundPool.java:405)***

SKMapViewHolder crashes on Nexus 5

After adding the libraries to the project and instantiating everything according to the getting started guide (http://developer.skobbler.com/getting-started/android#) and the demo (http://developer.skobbler.com/support#download) I am running into some strange problems.
After adding the SKMapViewHolder to an activity, the app crashes and logcat returns the following:
06-05 14:22:48.388 1976-2013/com.x.app E/Adreno-ES11﹕ <qglDrvAPI_glDeleteTextures:371>: GL_INVALID_VALUE
06-05 14:22:48.388 1976-2013/com.x.app A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1), thread 2013 (Thread-885)
This is happening on a USB Nexus 5 and N5 emulator. On running it with an N7 (2012) emulator it's just returning the second libc error.

Resources