Android libc.so crash?

后端 未结 2 1275
感情败类
感情败类 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
      

提交回复
热议问题