I\'m using AndEngine with the PhysicsBox2DExtension to make a game. My game keeps crashing and I get this in the unfiltered LogCat:
07-06 13:25:27.266: I/DEB
You should use addr2line
tool as described here and lookup these two addresses in your library to find what causes the crash:
#02 pc 00026558 /data/data/com.prattia.webs.testgfx5/lib/libandenginephysicsbox2dextension.so
#03 pc 00013e7c /data/data/com.prattia.webs.testgfx5/lib/libandenginephysicsbox2dextension.so
So under Windows you should:
Copy the library from device:
adb pull /data/data/com.prattia.webs.testgfx5/lib/libandenginephysicsbox2dextension.so C:\
Run addr2line
tool for it using command line:
cd %PATH_TO_YOUR_NDK%\toolchains\arm-linux-androideabi-4.4.3\prebuilt\linux-x86\bin
arm-linux-androideabi-addr2line -C -f -e C:\libandenginephysicsbox2dextension.so
Enter adress by adress:
00026558 [ENTER]
> here will be function name and line
00013e7c [ENTER]
> and again
Note: running this tool under Windows may give you less information than under Linux, so you may choose to install the distro as a virtual machine and follow instructions from the link to original answer above.
Another (easier?) way is to use ndk-stack
:
Run ndk-stack
:
cd %PATH_TO_YOUR_NDK%
ndk-stack -sym C:\libandenginephysicsbox2dextension.so -dump C:\dump.txt
libc is experiencing a segmentation violation, almost certainly because andengine gave it a bad pointer. You probably don't have debug symbols for libc, but you can adb pull and objdump it to figure out what dynamic function is being given bad arguments. Or if your andengine library has debug symbols, you can track down the address there using the address to line tool.
You will have to figure out if it is a bug in what you are asking andengine to do, or if the bug is in andengine itself.