android /系统/ lib / libhwui.so崩溃

时间:2022-01-16 15:31:51

there is a crash i have got sometimes , it seems a jni crash , but my application have not any jni code . it's is a graphic application , and will load some pictures .

我有时会崩溃,好像是jni崩溃,但我的应用程序没有任何jni代码。它是一个图形应用程序,并将加载一些图片。

could anyone told me how to find the problem . what's the libhwui.so .

谁能告诉我怎么找到这个问题。libhwui。所以。

 I/DEBUG   (  141): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000e8
I/DEBUG   (  141):  r0 ffffffff  r1 000000e8  r2 00000000  r3 00000000
I/DEBUG   (  141):  r4 ffffffff  r5 000000e8  r6 018fea18  r7 018fe9c8
I/DEBUG   (  141):  r8 40baa190  r9 018fea40  10 0000001c  fp 0000001c
I/DEBUG   (  141):  ip 40bab590  sp be818c98  lr 4005510c  pc 4005510c  cpsr 68000010
I/DEBUG   (  141):  d0  4300000043000000  d1  44d0000043000000
I/DEBUG   (  141):  d2  41d0000000000040  d3  4000000000000002
I/DEBUG   (  141):  d4  4000000040200000  d5  4000000000000002
I/DEBUG   (  141):  d6  4000000040000000  d7  0000000000000000
I/DEBUG   (  141):  d8  43e6000040000000  d9  403c800000000000
I/DEBUG   (  141):  d10 403c800000000000  d11 4038000000000000
I/DEBUG   (  141):  d12 447a000042363498  d13 3f6ed2573c23d700
I/DEBUG   (  141):  d14 3f4959923ed2d2d3  d15 00000000c1600000
I/DEBUG   (  141):  d16 c000000000000000  d17 c000000000000000
I/DEBUG   (  141):  d18 4000000000000000  d19 0000000000000000
I/DEBUG   (  141):  d20 3ff0000000000000  d21 8000000000000000
I/DEBUG   (  141):  d22 c000000000000000  d23 0000000000000000
I/DEBUG   (  141):  d24 0000000000000000  d25 3fca515880000000
I/DEBUG   (  141):  d26 0000000000000000  d27 3fca515880000000
I/DEBUG   (  141):  d28 0000000000000000  d29 3ff0000000000000
I/DEBUG   (  141):  d30 0000000000000000  d31 3ff0000000000000
I/DEBUG   (  141):  scr 68000013
I/DEBUG   (  141): 
I/DEBUG   (  141):          #00  pc 0000510c  /system/lib/libcutils.so (android_atomic_add)
I/DEBUG   (  141):          #01  pc 0000ae3e  /system/lib/libhwui.so
I/DEBUG   (  141):          #02  pc 0000ae4e  /system/lib/libhwui.so
I/DEBUG   (  141):          #03  pc 000162f2  /system/lib/libhwui.so
I/DEBUG   (  141):          #04  pc 000163a6  /system/lib/libhwui.so
I/DEBUG   (  141):          #05  pc 000226a0  /system/lib/libutils.so (_ZN7android10VectorImpl5_growEjj)
I/DEBUG   (  141):          #06  pc 000226d2  /system/lib/libutils.so (_ZN7android10VectorImpl8insertAtEPKvjj)
I/DEBUG   (  141):          #07  pc 0002280e  /system/lib/libutils.so (_ZN7android16SortedVectorImpl3addEPKv)
I/DEBUG   (  141):          #08  pc 00016874  /system/lib/libhwui.so
I/DEBUG   (  141): 
I/DEBUG   (  141): code around pc:
I/DEBUG   (  141): 400550ec e1853f92 e3530000 1afffffa e8bd8070  .?....S.....p...
I/DEBUG   (  141): 400550fc e92d4070 e1a04000 e1a05001 ebffffd1  p@-..@...P......
I/DEBUG   (  141): 4005510c e1950f9f e0802004 e1853f92 e3530000  ..... ...?....S.
I/DEBUG   (  141): 4005511c 1afffffa e8bd8070 e1a01000 e3e00000  ....p...........
I/DEBUG   (  141): 4005512c eafffff2 e1a01000 e3a00001 eaffffef  ................
I/DEBUG   (  141): 
I/DEBUG   (  141): stack:
I/DEBUG   (  141):     be818c58  01887204  [heap]
I/DEBUG   (  141):     be818c5c  be818db8  [stack]
I/DEBUG   (  141):     be818c60  00000000  
I/DEBUG   (  141):     be818c64  00000002  
I/DEBUG   (  141):     be818c68  00000368  
I/DEBUG   (  141):     be818c6c  00000000  
I/DEBUG   (  141):     be818c70  00000310  
I/DEBUG   (  141):     be818c74  00000000  
I/DEBUG   (  141):     be818c78  014d84e0  [heap]
I/DEBUG   (  141):     be818c7c  0000001c  
I/DEBUG   (  141):     be818c80  00000310  
I/DEBUG   (  141):     be818c84  0000001c  
I/DEBUG   (  141):     be818c88  00001906  
I/DEBUG   (  141):     be818c8c  400cee59  /system/lib/libc.so
I/DEBUG   (  141):     be818c90  df0027ad  
I/DEBUG   (  141):     be818c94  00000000  
I/DEBUG   (  141): #00 be818c98  000000e8  
I/DEBUG   (  141):     be818c9c  0000004d  
I/DEBUG   (  141):     be818ca0  018fea18  [heap]
I/DEBUG   (  141):     be818ca4  40b92e41  /system/lib/libhwui.so
I/DEBUG   (  141): #01 be818ca8  01856aa8  [heap]
I/DEBUG   (  141):     be818cac  40b92e53  /system/lib/libhwui.so

i have see a crash agin

我看到了一个撞车事故。

I/DEBUG   (10037): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG   (10037):  r0 deadbaad  r1 00000001  r2 40000000  r3 00000000
I/DEBUG   (10037):  r4 00000000  r5 00000027  r6 400f34c8  r7 401025d8
I/DEBUG   (10037):  r8 0146dc68  r9 40102598  10 5bdf7b8c  fp 5bdf7c24
I/DEBUG   (10037):  ip ffffffff  sp 5bdf79e8  lr 400d45c9  pc 400d0958  cpsr 60000030
I/DEBUG   (10037):  d0  72656c69706d6f43  d1  726f7470008ed744
I/DEBUG   (10037):  d2  617369646f6e5f57  d3  6f6c6f685f656c50
I/DEBUG   (10037):  d4  9933333399333333  d5  9933333399333333
I/DEBUG   (10037):  d6  00d2aff099333333  d7  000000434e5f30de
I/DEBUG   (10037):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   (10037):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   (10037):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   (10037):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   (10037):  d16 0000000700000001  d17 40c4400000000000
I/DEBUG   (10037):  d18 4146605000000000  d19 bfb1be5a93a83e1d
I/DEBUG   (10037):  d20 3f1155e54e7e8408  d21 bebbbc6c1a570a20
I/DEBUG   (10037):  d22 3ff0000000000000  d23 3fede16b9c24a98f
I/DEBUG   (10037):  d24 3e66376972bea4d0  d25 3fc39a09d078c69f
I/DEBUG   (10037):  d26 0000000000000000  d27 0000000000000000
I/DEBUG   (10037):  d28 0000000000000000  d29 0000000000000000
I/DEBUG   (10037):  d30 0000000000000000  d31 0000000000000000
I/DEBUG   (10037):  scr 80000012
I/DEBUG   (10037): 
D/ti_hwc  (  142): [handle_uevents] :: Uevent : change@/devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl6030_bci/power_supply/battery
D/PowerManagerService(  292): mPowerState = SCREEN_BRIGHT_BIT SCREEN_ON_BIT 
I/DEBUG   (10037):          #00  pc 00017958  /system/lib/libc.so
I/DEBUG   (10037):          #01  pc 000137e2  /system/lib/libc.so
I/DEBUG   (10037):          #02  pc 00015b20  /system/lib/libc.so (dlfree)
I/DEBUG   (10037):          #03  pc 00016198  /system/lib/libc.so (free)
I/DEBUG   (10037):          #04  pc 000009bc  /system/lib/libstdc++.so (_ZdlPvRKSt9nothrow_t)
I/DEBUG   (10037):          #05  pc 00016afe  /system/lib/libhwui.so
I/DEBUG   (10037):          #06  pc 00016b10  /system/lib/libhwui.so
I/DEBUG   (10037):          #07  pc 0001640a  /system/lib/libhwui.so
I/DEBUG   (10037):          #08  pc 00016bc4  /system/lib/libhwui.so
I/DEBUG   (10037):          #09  pc 0000d752  /system/lib/libhwui.so
I/DEBUG   (10037):          #10  pc 0000d8e0  /system/lib/libhwui.so (_ZN7android10uirenderer11DisplayListD1Ev)
I/DEBUG   (10037):          #11  pc 0005e896  /system/lib/libandroid_runtime.so
I/DEBUG   (10037):          #12  pc 0001edb0  /system/lib/libdvm.so (dvmPlatformInvoke)
I/DEBUG   (10037):          #13  pc 000590f4  /system/lib/libdvm.so (_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
I/DEBUG   (10037): 
I/DEBUG   (10037): code around pc:
I/DEBUG   (10037): 400d0938 4623b15c 2c006824 e026d1fb b12368db  \.#F$h.,..&..h#.
I/DEBUG   (10037): 400d0948 21014a17 6011447a 48124798 24002527  .J.!zD.`.G.H'%.$
I/DEBUG   (10037): 400d0958 f7f47005 2106eeb4 ef50f7f5 460aa901  .p.....!..P....F
I/DEBUG   (10037): 400d0968 f04f2006 94015380 94029303 eb0cf7f5  . O..S..........
I/DEBUG   (10037): 400d0978 4622a905 f7f52002 f7f4eb16 2106eea0  .."F. .........!
I/DEBUG   (10037): 
I/DEBUG   (10037): code around lr:
I/DEBUG   (10037): 400d45a8 41f0e92d 46804c0c 447c2600 68a56824  -..A.L.F.&|D$h.h
I/DEBUG   (10037): 400d45b8 e0076867 300cf9b5 dd022b00 47c04628  gh.....0.+..(F.G
I/DEBUG   (10037): 400d45c8 35544306 37fff117 6824d5f4 d1ee2c00  .CT5...7..$h.,..
I/DEBUG   (10037): 400d45d8 e8bd4630 bf0081f0 00028f96 41f0e92d  0F..........-..A
I/DEBUG   (10037): 400d45e8 fb01b086 9004f602 461f4815 4615460c  .........H.F.F.F
I/DEBUG   (10037): 
I/DEBUG   (10037): memory map around addr deadbaad:
I/DEBUG   (10037): be7f9000-be81a000 [stack]
I/DEBUG   (10037): (no map for address)
I/DEBUG   (10037): ffff0000-ffff1000 [vectors]
I/DEBUG   (10037): 
I/DEBUG   (10037): stack:
I/DEBUG   (10037):     5bdf79a8  00000001  
I/DEBUG   (10037):     5bdf79ac  5bdf79e8  
I/DEBUG   (10037):     5bdf79b0  400fd840  /system/lib/libc.so
I/DEBUG   (10037):     5bdf79b4  0000000c  
I/DEBUG   (10037):     5bdf79b8  400fd7d4  /system/lib/libc.so
I/DEBUG   (10037):     5bdf79bc  401028c8  
I/DEBUG   (10037):     5bdf79c0  00000000  
I/DEBUG   (10037):     5bdf79c4  400d45c9  /system/lib/libc.so
I/DEBUG   (10037):     5bdf79c8  00000000  
I/DEBUG   (10037):     5bdf79cc  5bdf79fc  
I/DEBUG   (10037):     5bdf79d0  400f34c8  /system/lib/libc.so
I/DEBUG   (10037):     5bdf79d4  401025d8  
I/DEBUG   (10037):     5bdf79d8  0146dc68  [heap]
I/DEBUG   (10037):     5bdf79dc  400d3735  /system/lib/libc.so
I/DEBUG   (10037):     5bdf79e0  df0027ad  
I/DEBUG   (10037):     5bdf79e4  00000000  
I/DEBUG   (10037): #00 5bdf79e8  5bdf79e4  
I/DEBUG   (10037):     5bdf79ec  00000001  
I/DEBUG   (10037):     5bdf79f0  400f34ac  /system/lib/libc.so
I/DEBUG   (10037):     5bdf79f4  00000005  
I/DEBUG   (10037):     5bdf79f8  5bdf7a14  
I/DEBUG   (10037):     5bdf79fc  fffffbdf  
I/DEBUG   (10037):     5bdf7a00  5bdf7a14  
I/DEBUG   (10037):     5bdf7a04  5bdf7a14  
I/DEBUG   (10037):     5bdf7a08  400f6a64  /system/lib/libc.so
I/DEBUG   (10037):     5bdf7a0c  400cc7e7  /system/lib/libc.so
I/DEBUG   (10037): #01 5bdf7a10  5bdf7ae8  
I/DEBUG   (10037):     5bdf7a14  20404040  
I/DEBUG   (10037):     5bdf7a18  524f4241  /dev/ashmem/dalvik-mark-stack (deleted)
I/DEBUG   (10037):     5bdf7a1c  474e4954  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a20  4e49203a  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a24  494c4156  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a28  45482044  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a2c  41205041  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a30  45524444  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a34  49205353  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (10037):     5bdf7a38  6c64204e  
I/DEBUG   (10037):     5bdf7a3c  65657266  
I/DEBUG   (10037):     5bdf7a40  01417700  [heap]
I/DEBUG   (10037):     5bdf7a44  4034d558  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a48  013648c8  [heap]
I/DEBUG   (10037):     5bdf7a4c  401025c0  
I/DEBUG   (10037):     5bdf7a50  00000068  
I/DEBUG   (10037):     5bdf7a54  40102588  
I/DEBUG   (10037):     5bdf7a58  014186c8  [heap]
I/DEBUG   (10037):     5bdf7a5c  40102588  
I/DEBUG   (10037):     5bdf7a60  40354c80  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a64  400ceb39  /system/lib/libc.so
I/DEBUG   (10037):     5bdf7a68  409054aa  /system/lib/libdvm.so
I/DEBUG   (10037):     5bdf7a6c  4034d558  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a70  5bdf7b20  
I/DEBUG   (10037):     5bdf7a74  00000000  
I/DEBUG   (10037):     5bdf7a78  5bdf7b28  
I/DEBUG   (10037):     5bdf7a7c  40354c80  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a80  40354c80  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a84  400cf19b  /system/lib/libc.so
I/DEBUG   (10037):     5bdf7a88  409054aa  /system/lib/libdvm.so
I/DEBUG   (10037):     5bdf7a8c  402c79df  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a90  5bdf7b40  
I/DEBUG   (10037):     5bdf7a94  402cacf7  /system/lib/libcrypto.so
I/DEBUG   (10037):     5bdf7a98  01364880  [heap]
I/DEBUG   (10037):     5bdf7a9c  40102608  
I/DEBUG   (10037):     5bdf7aa0  013b5e00  [heap]
I/DEBUG   (10037):     5bdf7aa4  401025c0  
I/DEBUG   (10037):     5bdf7aa8  00000068  
I/DEBUG   (10037):     5bdf7aac  401025a0  
I/DEBUG   (10037):     5bdf7ab0  409054aa  /system/lib/libdvm.so
I/DEBUG   (10037):     5bdf7ab4  401025a8  
I/DEBUG   (10037):     5bdf7ab8  5bdf7b68  
I/DEBUG   (10037):     5bdf7abc  0145c410  [heap]
I/DEBUG   (10037):     5bdf7ac0  00000009  
I/DEBUG   (10037):     5bdf7ac4  40102558  
I/DEBUG   (10037):     5bdf7ac8  00000000  
I/DEBUG   (10037):     5bdf7acc  400cdcd5  /system/lib/libc.so
I/DEBUG   (10037):     5bdf7ad0  013c2758  [heap]
I/DEBUG   (10037):     5bdf7ad4  40102590  
I/DEBUG   (10037):     5bdf7ad8  00000038  
I/DEBUG   (10037):     5bdf7adc  40102534  
I/DEBUG   (10037):     5bdf7ae0  0145f8d8  [heap]
I/DEBUG   (10037):     5bdf7ae4  40102580  
I/DEBUG   (10037):     5bdf7ae8  0146c5d0  [heap]
I/DEBUG   (10037):     5bdf7aec  0146c5f0  [heap]
I/DEBUG   (10037):     5bdf7af0  00000001  
I/DEBUG   (10037):     5bdf7af4  40102558  
I/DEBUG   (10037):     5bdf7af8  5bdf7b8c  
I/DEBUG   (10037):     5bdf7afc  400cdcd5  /system/lib/libc.so
I/DEBUG   (10037):     5bdf7b00  012fb8d8  [heap]
I/DEBUG   (10037):     5bdf7b04  012fb928  [heap]
I/DEBUG   (10037):     5bdf7b08  01479db0  [heap]
I/DEBUG   (10037):     5bdf7b0c  00000035  
I/DEBUG   (10037):     5bdf7b10  011a31e4  [heap]
I/DEBUG   (10037):     5bdf7b14  1c5bddbe  
I/DEBUG   (10037):     5bdf7b18  01479d68  [heap]
I/DEBUG   (10037):     5bdf7b1c  01479de8  [heap]
I/DEBUG   (10037):     5bdf7b20  00000080  
I/DEBUG   (10037):     5bdf7b24  400ceb25  /system/lib/libc.so

2 个解决方案

#1


6  

I remember seeing a crash like this and reading about a bug with 4.0.x in particular where removing a hardware layer in an AnimationListener (onAnimationEnd()) would cause this sort of crash. The solution was to post the layer transition as a Runnable. For example:

我记得看到过类似这样的崩溃,并阅读了关于4.0的错误。特别是,在一个AnimationListener (onAnimationEnd())中移除硬件层时,会导致这种崩溃。解决方案是将层转换发布为可运行的。例如:

@Override
public void onAnimationEnd (Animation animation) {
    //This will cause a crash
    setLayerType(LAYER_TYPE_NONE, null);
}

@Override
public void onAnimationEnd (Animation animation) {
    //This will work successfully
    post(new Runnable() {
        @Override
        public void run () {
            setLayerType(LAYER_TYPE_NONE, null);
        }
    }
}

#2


2  

I know this is an old post but I've been struggling with a similar crash for a long time and just recently found root cause. Here are a few more tidbits on my crash:

我知道这是一篇老文章,但我已经为类似的崩溃挣扎了很长一段时间,最近才找到了根本原因。下面是我崩溃时的一些趣闻:

  • crash can be in libhwui.so, libskia.so, libutils.so, or libc.so
  • 崩溃可以在libhwui。所以,libskia。所以,libutils。所以,或libc.so
  • app is not using NDK
  • app没有使用NDK。
  • strong correlation to devices. Samsung S6/S7 and Nexus 5 had a lot of instances. Never saw the crash on an old Kyocera
  • 强有力的相关设备。三星S6/S7和Nexus 5有很多实例。从来没见过京瓷的崩溃。

Since my app also does not have native code the stack dump/tombstone file didn't reference any of my code. Through adhoc testing, I narrowed the source of the problem to a custom ProgressBar in the app.

因为我的应用程序也没有本地代码,所以堆栈转储/tombstone文件没有引用我的任何代码。通过临时测试,我将问题的来源缩小到应用程序中的一个自定义ProgressBar。

The ProgressBar leveraged a TimerTask under the hood! Thankfully I had recently bumped into this post while researching something else.

ProgressBar在引擎盖下利用了一个时间任务!幸运的是,我最近在研究其他事情的时候遇到了这个问题。

Changed the code to a handler and haven't seen the crash since! Hope this helps someone else.

将代码更改为处理程序,并从此没有看到崩溃!希望这能帮助别人。

#1


6  

I remember seeing a crash like this and reading about a bug with 4.0.x in particular where removing a hardware layer in an AnimationListener (onAnimationEnd()) would cause this sort of crash. The solution was to post the layer transition as a Runnable. For example:

我记得看到过类似这样的崩溃,并阅读了关于4.0的错误。特别是,在一个AnimationListener (onAnimationEnd())中移除硬件层时,会导致这种崩溃。解决方案是将层转换发布为可运行的。例如:

@Override
public void onAnimationEnd (Animation animation) {
    //This will cause a crash
    setLayerType(LAYER_TYPE_NONE, null);
}

@Override
public void onAnimationEnd (Animation animation) {
    //This will work successfully
    post(new Runnable() {
        @Override
        public void run () {
            setLayerType(LAYER_TYPE_NONE, null);
        }
    }
}

#2


2  

I know this is an old post but I've been struggling with a similar crash for a long time and just recently found root cause. Here are a few more tidbits on my crash:

我知道这是一篇老文章,但我已经为类似的崩溃挣扎了很长一段时间,最近才找到了根本原因。下面是我崩溃时的一些趣闻:

  • crash can be in libhwui.so, libskia.so, libutils.so, or libc.so
  • 崩溃可以在libhwui。所以,libskia。所以,libutils。所以,或libc.so
  • app is not using NDK
  • app没有使用NDK。
  • strong correlation to devices. Samsung S6/S7 and Nexus 5 had a lot of instances. Never saw the crash on an old Kyocera
  • 强有力的相关设备。三星S6/S7和Nexus 5有很多实例。从来没见过京瓷的崩溃。

Since my app also does not have native code the stack dump/tombstone file didn't reference any of my code. Through adhoc testing, I narrowed the source of the problem to a custom ProgressBar in the app.

因为我的应用程序也没有本地代码,所以堆栈转储/tombstone文件没有引用我的任何代码。通过临时测试,我将问题的来源缩小到应用程序中的一个自定义ProgressBar。

The ProgressBar leveraged a TimerTask under the hood! Thankfully I had recently bumped into this post while researching something else.

ProgressBar在引擎盖下利用了一个时间任务!幸运的是,我最近在研究其他事情的时候遇到了这个问题。

Changed the code to a handler and haven't seen the crash since! Hope this helps someone else.

将代码更改为处理程序,并从此没有看到崩溃!希望这能帮助别人。