Android libc.so crash?

后端 未结 2 1261
感情败类
感情败类 2020-12-24 04:09

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         


        
相关标签:
2条回答
  • 2020-12-24 04:42

    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:

    1. Copy the library from device:

      adb pull /data/data/com.prattia.webs.testgfx5/lib/libandenginephysicsbox2dextension.so C:\
      
    2. 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
      
    3. 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.

    Update

    Another (easier?) way is to use ndk-stack:

    1. As previously
    2. Save your dump into file. Let's call it 'dump.txt'.
    3. Run ndk-stack:

      cd %PATH_TO_YOUR_NDK%
      ndk-stack -sym C:\libandenginephysicsbox2dextension.so -dump C:\dump.txt
      
    0 讨论(0)
  • 2020-12-24 04:47

    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.

    0 讨论(0)
提交回复
热议问题