简体   繁体   English

无法从logcat提取堆栈跟踪

[英]Can't extract stack trace from logcat

I've encountered my first SIGSEGV on my Android app project and I'm trying to get the reason behind this error. 我在我的Android应用程序项目中遇到了我的第一个SIGSEGV,并且我试图找出导致此错误的原因。

My project is a webapp packaged using PhoneGap and works fine on Android 2.2. 我的项目是一个使用PhoneGap打包的webapp,并且在Android 2.2上运行良好。 On 2.1, it launches, passes the splashscreen, displays part of the first screen (toolbar, fields, but no images) and crashes. 在2.1上,它启动,通过启动屏幕,显示第一个屏幕的一部分(工具栏,字段,但没有图像)并崩溃。

I tried passing the logcat addresses entries to stack.py and parse_stack, but with no success. 我尝试将logcat地址条目传递给stack.py和parse_stack,但没有成功。 I must be doing something wrong... 我一定做错了什么...

stack.py stack.py

macbookair:Dropbox alexandre$ python stack.py crash.log
make: build/core/envsetup.mk: No such file or directory
make: *** No rule to make target `build/core/envsetup.mk'.  Stop.
Searching for native crashes in crash.log
Reading symbols from 
pid: 249, tid: 255  >>> com.xxxxxx.xxxxx <<<
signal 11 (SIGSEGV), fault addr 00000000
  r0 00000000  r1 00000001  r2 00000000  r3 00000000
  r4 0056c0b8  r5 4693f90c  r6 ac1435a4  r7 0056c140
  r8 00000001  r9 0056c140  10 00000001  fp 4693f970
  ip 00000001  sp 4693f8d8  lr 00000001  pc ac03f030
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found
sh: arm-eabi-addr2line: command not found

Stack Trace:
  ADDR      FUNCTION   FILE:LINE
  0003f030  (unknown)  (unknown)
  0003e188  (unknown)  (unknown)
  00043b78  (unknown)  (unknown)
  00043388  (unknown)  (unknown)
  000433fc  (unknown)  (unknown)
  00086c88  (unknown)  (unknown)
  0004c54c  (unknown)  (unknown)
  0011f046  (unknown)  (unknown)
  00113c6e  (unknown)  (unknown)
  00113f6e  (unknown)  (unknown)
  00113f80  (unknown)  (unknown)
  0011ec68  (unknown)  (unknown)
  0011a246  (unknown)  (unknown)
  00118564  (unknown)  (unknown)
  00155612  (unknown)  (unknown)
  0014ff28  (unknown)  (unknown)
  0014ff7c  (unknown)  (unknown)
  001503d2  (unknown)  (unknown)
  00148536  (unknown)  (unknown)
  00145844  (unknown)  (unknown)
  00184854  (unknown)  (unknown)
  00138b26  (unknown)  (unknown)
  0013a67a  (unknown)  (unknown)
  0018be6e  (unknown)  (unknown)
  00167686  (unknown)  (unknown)
  001454b6  (unknown)  (unknown)
  001485b4  (unknown)  (unknown)
  00145844  (unknown)  (unknown)
  00169354  (unknown)  (unknown)
  001453ee  (unknown)  (unknown)
  001454c4  (unknown)  (unknown)
  001485b4  (unknown)  (unknown)

Stack Data:
  ADDR      VALUE     FILE:LINE/FUNCTION
  4693f898  0056c0b8  
  4693f89c  0256c0b8  
  4693f8a0  4693f970  
  4693f8a4  00000001  
  4693f8a8  4693f970  
  4693f8ac  ac04bfd8  (unknown)
                      (unknown)
  4693f8b0  00000000  
  4693f8b4  00000001  
  4693f8b8  4693f970  
  4693f8bc  ac04c2cc  (unknown)
                      (unknown)
  4693f8c0  0056c0b8  
  4693f8c4  4693f90c  
  4693f8c8  ac1435a4  (unknown)
                      (unknown)
  4693f8cc  00000000  
  4693f8d0  df002777  
  4693f8d4  e3a070ad  
  4693f8d8  00000000  
  4693f8dc  00000000  
  4693f8e0  00000000  
  4693f8e4  3f800000  
  4693f8e8  00000000  
  4693f8ec  004dc590  
  4693f8f0  00000000  
  4693f8f4  afe157e5  (unknown)
                      (unknown)
  4693f8f8  4693fc14  
  4693f8fc  afe1697d  (unknown)
                      (unknown)
  4693f900  00545a2a  
  4693f904  00463473  
  4693f908  00000002  
  4693f90c  4693f94c  
  4693f910  00000002  
  4693f914  00000000  
  4693f918  00000002  
  4693f91c  00000000  
  4693f920  00000002  
  4693f924  41900000  (unknown)
                      (unknown)
  4693f928  00000000  
  4693f92c  00000001  
  4693f930  003b2478  
  4693f934  00000000  
  4693f938  00000000  
  4693f93c  00000002  
  4693f940  afe3bb74  
  4693f944  4693f970  
  4693f948  004dc590  
  4693f94c  0038a81c  
  4693f950  004890c8  
  4693f954  00000003  
  4693f958  42f2ce50  
  4693f95c  42f2ce38  
  4693f960  0011d058  
  4693f964  ac03e18c  (unknown)
                      (unknown)
  4693f968  00000001  
  4693f96c  00000000  
  4693f970  00000000  
  4693f974  00000000  
  4693f978  00000000  
  4693f97c  00000000  
  4693f980  00000000  
  4693f984  00000000  
  4693f988  00000001  
  4693f98c  00000001  
  4693f990  00000001  
  4693f994  00010003  
  4693f998  00000001  
  4693f99c  0038a7f8  
  4693f9a0  0038a81c  
  4693f9a4  00000001  
  4693f9a8  46940d80  
  4693f9ac  ac043b7c  (unknown)
                      (unknown)

parse_stack parse_stack

macbookair:Dropbox alexandre$ python parse_stack.py crash.log
Traceback (most recent call last):
  File "parse_stack.py", line 41, in <module>
    asm, stack = sys.argv[1],sys.argv[2]
IndexError: list index out of range

I'm running this from a specific folder on my laptop (Dropbox in this case), should I be running this in another folder, perhaps the Android SDK? 我是从笔记本电脑上的特定文件夹(在这种情况下为Dropbox)运行此文件,是否应该在另一个文件夹(也许是Android SDK)中运行它?

Thanks! 谢谢!

Even though I did not manage to get the arm-eabi-addr2line command installed, I found out that a Phonegap 0.9.3 packaged app that is using on single CSS file that is minified (all the CSS on one single line) generates this SIGSEGV exception. 即使我没有设法安装arm-eabi-addr2line命令,我仍然发现,在最小化的单个CSS文件上使用的Phonegap 0.9.3打包应用程序(所有CSS都在一行上)生成了此SIGSEGV例外。

The solution: Minify your CSS, but on many lines (you can still remove blank lines, compress colors and remove the last;), just make sure it's not on one line! 解决方案:缩小CSS,但是在很多行上(您仍然可以删除空白行,压缩颜色并删除最后一行;),只需确保它不在一行上即可!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM