libhwui.so crash due to offscreenBuffer is NULL

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

libhwui.so crash due to offscreenBuffer is NULL

阿炳

Hi,  I’m developer from UC Browser team, Alibaba Groups.

Our app is suffering from some crash in hwui for a long time, which is the highest crash reason in UC Browser App in China.


Crash Stack:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000010

  r0 00000000  r1 00000000  r2 d3575428  r3 00000cf3

  r4 d3575428  r5 d597f408  r6 00000000  r7 d597f374

  r8 d597f380  r9 f3c33268  10 f3c332e0  fp f39eea40

  ip d3dd7008  sp d597f340  lr f3bd8487  pc f3c14a8e  cpsr 600f0030

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so 

    01 pc 00022483 /system/lib/libhwui.so 

    02 pc 000220e9 /system/lib/libhwui.so

    03 pc 00023cb7 /system/lib/libhwui.so

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so

code around pc:
    f3c14a4c 447a4479 e93ef7ba 0001d518 00019095  yDzD..>.........
    f3c14a5c 00012b3b 000190af 0001d4d0 41f0e92d  ;+..........-..A
    f3c14a6c b08aaf03 f36f466c 46a50403 48534605  ....lFo....F.FSH
    f3c14a7c 460e4614 68004478 90096800 28006968  .F.FxD.h.h..hi.(
    f3c14a8c ed96d17b eeb80a04 ec942a40 eeb50a02  {.......@*......
    f3c14a9c eef10ac0 d80ffa10 0ac0eef5 fa10eef1  ................
    f3c14aac ed96d80a eeb83a03 ed943a43 eeb41a02  .....:..C:......
    f3c14abc eef11ac3 da54fa10 1a02ed94 005cf106  ......T.......\.
    f3c14acc 1a03edd4 0c00fff4 fffca904 fff41c00  ................
    f3c14adc fffc2c01 eff03c01 eff204a1 fffb14a3  .,...<..........
    f3c14aec f9410760 f7bb0aef f04feab4 616e0800  `.A.......O...na
    f3c14afc 80bcf886 f7c16868 4601fdcf 68686129  ....hh.....F)ahh
    f3c14b0c fdc1f7c1 f6486bb3 f6485040 f64041e0  .....kH.@PH..A@.
    f3c14b1c f8cd52e1 f7bb8000 f7c9ee80 2801fc4d  .R..........M..(
    f3c14b2c f648d033 f7bc5040 4603ed5c 40d5f648  3.H.@P..\..FH..@
    f3c14b3c d1364283 1203e9d6 f0004628 4628f85b  .B6.....(F..[.(F

code around lr:
    f3bd8444 48626730 f7f74478 e9d5e8a4 1a09010c  0gbHxD..........
    f3bd8454 db3b2905 9178f8df 32fff04f a174f8df  .);...x.O..2..t.
    f3bd8464 06a1eb02 44f946e8 e00044fa f8506b28  .....F.D.D..(kP.
    f3bd8474 6bb87026 6b39b130 0208f107 f03c4620  &p.k0.9k.... F<.
    f3bd8484 e017faf1 0112e9d7 d01c4288 1200e9d7  .........B......
    f3bd8494 f03c4620 6338faa1 1201e9dd d0044291   F<...8c.....B..
    f3bd84a4 98016008 90013004 f107e004 46400130  .`...0......0.@F
    f3bd84b4 fda2f7fc 46214638 4653464a ffcaf040  ....8F!FJFSF@...
    f3bd84c4 f03c4620 3e01fc2d dacf2e01 0384f895   F<.-..>........
    f3bd84d4 6b28b1a8 46206805 0608f105 1200e9d5  ..(k.h F........
    f3bd84e4 f03c4633 4a3cfcc3 4b3c4628 447a4621  3F<...<J(F<K!FzD
    f3bd84f4 f040447b 4620ffaf f03c4631 e9ddfce5  {D@... F1F<.....
    f3bd8504 42b55600 f855d007 46201b04 fb72f03c  .V.B..U... F<.r.
    f3bd8514 d1f842ae b16d9d00 42a89801 1f01d007  .B....m....B....
    f3bd8524 0203f06f ea221b49 44080101 46289001  o...I."....D..(F
    f3bd8534 ebd8f7f6 9903482a 68004478 1a406800  ....*H..xD.h.h@.

 

As I dissassembled the code data given by PC register, I got some instruments like:


f54cba28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}

f54cba2c: af03      add  r7, sp, #12

f54cba2e: b08a      sub  sp, #40 ; 0x28

f54cba30: 466c      mov  r4, sp

f54cba32: f36f 0403 bfc  r4, #0, #4

f54cba36: 46a5      mov  sp, r4

f54cba38: 4605      mov  r5, r0

f54cba3a: 484e      ldr  r0, [pc, #312] ; (0xf54cbb74)

f54cba3c: 4614      mov  r4, r2

f54cba3e: 460e      mov  r6, r1

f54cba40: 4478      add  r0, pc

f54cba42: 6800      ldr  r0, [r0, #0]

f54cba44: 6800      ldr  r0, [r0, #0]

f54cba46: 9009      str  r0, [sp, #36]  ; 0x24

f54cba48: 6968      ldr  r0, [r5, #20]

f54cba4a: 2800      cmp  r0, #0

f54cba4c: d170      bne.n 0xf54cbb30

f54cba4e: ed96 0a04 vldr s0, [r6, #16]          --> PC pointed to here, in different version libhwui.so, we can find the same instrument sequence just once.

f54cba52: eeb8 2a40 vcvt.f32.u32 s4, s0

f54cba56: ec94 0a02 vldmia  r4, {s0-s1}

f54cba5a: eeb5 0ac0 vcmpe.f32 s0, #0.0


I succeeded to find the corresponeding code in Android Source:


void BakedOpRenderer::startRepaintLayer(OffscreenBufferoffscreenBufferconst RectrepaintRect) {

    LOG_ALWAYS_FATAL_IF(mRenderTarget.offscreenBuffer, "already has layer...");

 

    // subtract repaintRect from region, since it will be regenerated

    if (repaintRect.contains(0, 0,

                offscreenBuffer->viewportWidthoffscreenBuffer->viewportHeight)) {   ----------> HERE, because of offscreenBuffer was NULL.

        // repaint full layer, so throw away entire region

        offscreenBuffer->region.clear();

    } else {

        offscreenBuffer->region.subtractSelf(android::Rect(repaintRect.leftrepaintRect.top,

                repaintRect.rightrepaintRect.bottom));

}


And I guessed the callback stack:

Crash Stack:

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so  --> BakedOpRenderer::startRepaintLayer(From PC)

    01 pc 00022483 /system/lib/libhwui.so  --> frameBuilder::replayBakedOps<BakedOpDispatcher> (From LR)

    02 pc 000220e9 /system/lib/libhwui.so  Guessed --> RenderContext::buildLayer

    03 pc 00023cb7 /system/lib/libhwui.so  Guessed --> MethodInvokeRenderTask::run() 

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so



The data flow of offscreenBuffer is like:

offscreenBuffer <--- LayerBuilder::offscreenBufer <--- RenderNode::mLayer

I do notice RenderNode::mLayer will set to null_ptr for some reason, and I don't know how the libhwui.so to guarantee RenderNode::mLayer is not null when calling startRepaintLayer. 

Here go my question:

1. Did anyone notice the same kind of crash in BakedOpRenderer::startRepaintLayer?

2. How  the libhwui.so to guarantee RenderNode::mLayer is not null when calling startRepaintLayer?


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libhwui.so crash due to offscreenBuffer is NULL

devteam.lakeba
i too experience same issue recently from Android vitals, mostly in Android marshmallow and nougat

native: pc 000000000004276c /system/lib/libc.so (tgkill+12)
native: pc 0000000000040379 /system/lib/libc.so (pthread_kill+32)
native: pc 000000000001ca9b /system/lib/libc.so (raise+10)
native: pc 0000000000019d19 /system/lib/libc.so (__libc_android_abort+34)
native: pc 000000000001755c /system/lib/libc.so (abort+4)
native: pc 0000000000008727 /system/lib/libcutils.so (__android_log_assert+86)
native: pc 0000000000020231 /system/lib/libhwui.so
native: pc 000000000001d4f9 /system/lib/libhwui.so
native: pc 000000000001f23b /system/lib/libhwui.so
native: pc 0000000000022331 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
native: pc 0000000000010205 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
native: pc 00000000000622f3 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
native: pc 000000000003fc7b /system/lib/libc.so (_ZL15__pthread_startPv+30)
native: pc 000000000001a39b /system/lib/libc.so (__start_thread+6)

On Tuesday, 20 June 2017 19:26:28 UTC+5:30, 阿炳 wrote:

Hi,  I’m developer from UC Browser team, Alibaba Groups.

Our app is suffering from some crash in hwui for a long time, which is the highest crash reason in UC Browser App in China.


Crash Stack:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000010

  r0 00000000  r1 00000000  r2 d3575428  r3 00000cf3

  r4 d3575428  r5 d597f408  r6 00000000  r7 d597f374

  r8 d597f380  r9 f3c33268  10 f3c332e0  fp f39eea40

  ip d3dd7008  sp d597f340  lr f3bd8487  pc f3c14a8e  cpsr 600f0030

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so 

    01 pc 00022483 /system/lib/libhwui.so 

    02 pc 000220e9 /system/lib/libhwui.so

    03 pc 00023cb7 /system/lib/libhwui.so

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so

code around pc:
    f3c14a4c 447a4479 e93ef7ba 0001d518 00019095  yDzD..>.........
    f3c14a5c 00012b3b 000190af 0001d4d0 41f0e92d  ;+..........-..A
    f3c14a6c b08aaf03 f36f466c 46a50403 48534605  ....lFo....F.FSH
    f3c14a7c 460e4614 68004478 90096800 28006968  .F.FxD.h.h..hi.(
    f3c14a8c ed96d17b eeb80a04 ec942a40 eeb50a02  {.......@*......
    f3c14a9c eef10ac0 d80ffa10 0ac0eef5 fa10eef1  ................
    f3c14aac ed96d80a eeb83a03 ed943a43 eeb41a02  .....:..C:......
    f3c14abc eef11ac3 da54fa10 1a02ed94 005cf106  ......T.......\.
    f3c14acc 1a03edd4 0c00fff4 fffca904 fff41c00  ................
    f3c14adc fffc2c01 eff03c01 eff204a1 fffb14a3  .,...<..........
    f3c14aec f9410760 f7bb0aef f04feab4 616e0800  `.A.......O...na
    f3c14afc 80bcf886 f7c16868 4601fdcf 68686129  ....hh.....F)ahh
    f3c14b0c fdc1f7c1 f6486bb3 f6485040 f64041e0  .....kH.@PH..A@.
    f3c14b1c f8cd52e1 f7bb8000 f7c9ee80 2801fc4d  .R..........M..(
    f3c14b2c f648d033 f7bc5040 4603ed5c 40d5f648  3.H.@P..\..FH..@
    f3c14b3c d1364283 1203e9d6 f0004628 4628f85b  .B6.....(F..[.(F

code around lr:
    f3bd8444 48626730 f7f74478 e9d5e8a4 1a09010c  0gbHxD..........
    f3bd8454 db3b2905 9178f8df 32fff04f a174f8df  .);...x.O..2..t.
    f3bd8464 06a1eb02 44f946e8 e00044fa f8506b28  .....F.D.D..(kP.
    f3bd8474 6bb87026 6b39b130 0208f107 f03c4620  &p.k0.9k.... F<.
    f3bd8484 e017faf1 0112e9d7 d01c4288 1200e9d7  .........B......
    f3bd8494 f03c4620 6338faa1 1201e9dd d0044291   F<...8c.....B..
    f3bd84a4 98016008 90013004 f107e004 46400130  .`...0......0.@F
    f3bd84b4 fda2f7fc 46214638 4653464a ffcaf040  ....8F!FJFSF@...
    f3bd84c4 f03c4620 3e01fc2d dacf2e01 0384f895   F<.-..>........
    f3bd84d4 6b28b1a8 46206805 0608f105 1200e9d5  ..(k.h F........
    f3bd84e4 f03c4633 4a3cfcc3 4b3c4628 447a4621  3F<...<J(F<K!FzD
    f3bd84f4 f040447b 4620ffaf f03c4631 e9ddfce5  {D@... F1F<.....
    f3bd8504 42b55600 f855d007 46201b04 fb72f03c  .V.B..U... F<.r.
    f3bd8514 d1f842ae b16d9d00 42a89801 1f01d007  .B....m....B....
    f3bd8524 0203f06f ea221b49 44080101 46289001  o...I."....D..(F
    f3bd8534 ebd8f7f6 9903482a 68004478 1a406800  ....*H..xD.h.h@.

 

As I dissassembled the code data given by PC register, I got some instruments like:


f54cba28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}

f54cba2c: af03      add  r7, sp, #12

f54cba2e: b08a      sub  sp, #40 ; 0x28

f54cba30: 466c      mov  r4, sp

f54cba32: f36f 0403 bfc  r4, #0, #4

f54cba36: 46a5      mov  sp, r4

f54cba38: 4605      mov  r5, r0

f54cba3a: 484e      ldr  r0, [pc, #312] ; (0xf54cbb74)

f54cba3c: 4614      mov  r4, r2

f54cba3e: 460e      mov  r6, r1

f54cba40: 4478      add  r0, pc

f54cba42: 6800      ldr  r0, [r0, #0]

f54cba44: 6800      ldr  r0, [r0, #0]

f54cba46: 9009      str  r0, [sp, #36]  ; 0x24

f54cba48: 6968      ldr  r0, [r5, #20]

f54cba4a: 2800      cmp  r0, #0

f54cba4c: d170      bne.n 0xf54cbb30

f54cba4e: ed96 0a04 vldr s0, [r6, #16]          --> PC pointed to here, in different version libhwui.so, we can find the same instrument sequence just once.

f54cba52: eeb8 2a40 vcvt.f32.u32 s4, s0

f54cba56: ec94 0a02 vldmia  r4, {s0-s1}

f54cba5a: eeb5 0ac0 vcmpe.f32 s0, #0.0


I succeeded to find the corresponeding code in Android Source:


void <a href="http://androidxref.com/7.0.0_r1/s?defs=BakedOpRenderer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;">BakedOpRenderer::<a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_startRepaintLayer" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer(<a href="http://androidxref.com/7.0.0_r1/s?defs=OffscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;">OffscreenBuffer* <a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_offscreenBuffer" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;">offscreenBufferconst <a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect& <a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_repaintRect" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;">repaintRect) {

    <a href="http://androidxref.com/7.0.0_r1/s?defs=LOG_ALWAYS_FATAL_IF&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;">LOG_ALWAYS_FATAL_IF(<a href="http://androidxref.com/7.0.0_r1/s?defs=mRenderTarget&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;">mRenderTarget.<a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer, "already has layer...");

 

    // subtract repaintRect from region, since it will be regenerated

    if (<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=contains&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;">contains(0, 0,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportWidth&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;">viewportWidth, <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportHeight&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;">viewportHeight)) {   ----------> HERE, because of <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer was NULL.

        // repaint full layer, so throw away entire region

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=clear&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;">clear();

    } else {

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=subtractSelf&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;">subtractSelf(<a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#android" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;">android::<a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect(<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=left&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;">left, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=top&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;">top,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=right&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;">right, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=bottom&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;">bottom));

}


And I guessed the callback stack:

Crash Stack:

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so  --> BakedOpRenderer::startRepaintLayer(From PC)

    01 pc 00022483 /system/lib/libhwui.so  --> frameBuilder::replayBakedOps<BakedOpDispatcher> (From LR)

    02 pc 000220e9 /system/lib/libhwui.so  Guessed --> RenderContext::buildLayer

    03 pc 00023cb7 /system/lib/libhwui.so  Guessed --> MethodInvokeRenderTask::run() 

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so



The data flow of offscreenBuffer is like:

offscreenBuffer <--- <a href="http://androidxref.com/7.0.0_r1/s?refs=LayerBuilder&amp;project=frameworks" style="color:rgb(149,79,114);font-family:&quot;Courier New&quot;;font-size:13.3333px" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;">LayerBuilder::offscreenBufer <--- RenderNode::mLayer

I do notice RenderNode::mLayer will set to null_ptr for some reason, and I don't know how the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer. 

Here go my question:

1. Did anyone notice the same kind of crash in BakedOpRenderer::startRepaintLayer?

2. How  the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer?


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libhwui.so crash due to offscreenBuffer is NULL

devteam.lakeba
In reply to this post by 阿炳
any updates...?

On Tuesday, 20 June 2017 19:26:28 UTC+5:30, 阿炳 wrote:

Hi,  I’m developer from UC Browser team, Alibaba Groups.

Our app is suffering from some crash in hwui for a long time, which is the highest crash reason in UC Browser App in China.


Crash Stack:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000010

  r0 00000000  r1 00000000  r2 d3575428  r3 00000cf3

  r4 d3575428  r5 d597f408  r6 00000000  r7 d597f374

  r8 d597f380  r9 f3c33268  10 f3c332e0  fp f39eea40

  ip d3dd7008  sp d597f340  lr f3bd8487  pc f3c14a8e  cpsr 600f0030

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so 

    01 pc 00022483 /system/lib/libhwui.so 

    02 pc 000220e9 /system/lib/libhwui.so

    03 pc 00023cb7 /system/lib/libhwui.so

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so

code around pc:
    f3c14a4c 447a4479 e93ef7ba 0001d518 00019095  yDzD..>.........
    f3c14a5c 00012b3b 000190af 0001d4d0 41f0e92d  ;+..........-..A
    f3c14a6c b08aaf03 f36f466c 46a50403 48534605  ....lFo....F.FSH
    f3c14a7c 460e4614 68004478 90096800 28006968  .F.FxD.h.h..hi.(
    f3c14a8c ed96d17b eeb80a04 ec942a40 eeb50a02  {.......@*......
    f3c14a9c eef10ac0 d80ffa10 0ac0eef5 fa10eef1  ................
    f3c14aac ed96d80a eeb83a03 ed943a43 eeb41a02  .....:..C:......
    f3c14abc eef11ac3 da54fa10 1a02ed94 005cf106  ......T.......\.
    f3c14acc 1a03edd4 0c00fff4 fffca904 fff41c00  ................
    f3c14adc fffc2c01 eff03c01 eff204a1 fffb14a3  .,...<..........
    f3c14aec f9410760 f7bb0aef f04feab4 616e0800  `.A.......O...na
    f3c14afc 80bcf886 f7c16868 4601fdcf 68686129  ....hh.....F)ahh
    f3c14b0c fdc1f7c1 f6486bb3 f6485040 f64041e0  .....kH.@PH..A@.
    f3c14b1c f8cd52e1 f7bb8000 f7c9ee80 2801fc4d  .R..........M..(
    f3c14b2c f648d033 f7bc5040 4603ed5c 40d5f648  3.H.@P..\..FH..@
    f3c14b3c d1364283 1203e9d6 f0004628 4628f85b  .B6.....(F..[.(F

code around lr:
    f3bd8444 48626730 f7f74478 e9d5e8a4 1a09010c  0gbHxD..........
    f3bd8454 db3b2905 9178f8df 32fff04f a174f8df  .);...x.O..2..t.
    f3bd8464 06a1eb02 44f946e8 e00044fa f8506b28  .....F.D.D..(kP.
    f3bd8474 6bb87026 6b39b130 0208f107 f03c4620  &p.k0.9k.... F<.
    f3bd8484 e017faf1 0112e9d7 d01c4288 1200e9d7  .........B......
    f3bd8494 f03c4620 6338faa1 1201e9dd d0044291   F<...8c.....B..
    f3bd84a4 98016008 90013004 f107e004 46400130  .`...0......0.@F
    f3bd84b4 fda2f7fc 46214638 4653464a ffcaf040  ....8F!FJFSF@...
    f3bd84c4 f03c4620 3e01fc2d dacf2e01 0384f895   F<.-..>........
    f3bd84d4 6b28b1a8 46206805 0608f105 1200e9d5  ..(k.h F........
    f3bd84e4 f03c4633 4a3cfcc3 4b3c4628 447a4621  3F<...<J(F<K!FzD
    f3bd84f4 f040447b 4620ffaf f03c4631 e9ddfce5  {D@... F1F<.....
    f3bd8504 42b55600 f855d007 46201b04 fb72f03c  .V.B..U... F<.r.
    f3bd8514 d1f842ae b16d9d00 42a89801 1f01d007  .B....m....B....
    f3bd8524 0203f06f ea221b49 44080101 46289001  o...I."....D..(F
    f3bd8534 ebd8f7f6 9903482a 68004478 1a406800  ....*H..xD.h.h@.

 

As I dissassembled the code data given by PC register, I got some instruments like:


f54cba28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}

f54cba2c: af03      add  r7, sp, #12

f54cba2e: b08a      sub  sp, #40 ; 0x28

f54cba30: 466c      mov  r4, sp

f54cba32: f36f 0403 bfc  r4, #0, #4

f54cba36: 46a5      mov  sp, r4

f54cba38: 4605      mov  r5, r0

f54cba3a: 484e      ldr  r0, [pc, #312] ; (0xf54cbb74)

f54cba3c: 4614      mov  r4, r2

f54cba3e: 460e      mov  r6, r1

f54cba40: 4478      add  r0, pc

f54cba42: 6800      ldr  r0, [r0, #0]

f54cba44: 6800      ldr  r0, [r0, #0]

f54cba46: 9009      str  r0, [sp, #36]  ; 0x24

f54cba48: 6968      ldr  r0, [r5, #20]

f54cba4a: 2800      cmp  r0, #0

f54cba4c: d170      bne.n 0xf54cbb30

f54cba4e: ed96 0a04 vldr s0, [r6, #16]          --> PC pointed to here, in different version libhwui.so, we can find the same instrument sequence just once.

f54cba52: eeb8 2a40 vcvt.f32.u32 s4, s0

f54cba56: ec94 0a02 vldmia  r4, {s0-s1}

f54cba5a: eeb5 0ac0 vcmpe.f32 s0, #0.0


I succeeded to find the corresponeding code in Android Source:


void <a href="http://androidxref.com/7.0.0_r1/s?defs=BakedOpRenderer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;">BakedOpRenderer::<a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_startRepaintLayer" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer(<a href="http://androidxref.com/7.0.0_r1/s?defs=OffscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;">OffscreenBuffer* <a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_offscreenBuffer" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;">offscreenBufferconst <a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect& <a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_repaintRect" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;">repaintRect) {

    <a href="http://androidxref.com/7.0.0_r1/s?defs=LOG_ALWAYS_FATAL_IF&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;">LOG_ALWAYS_FATAL_IF(<a href="http://androidxref.com/7.0.0_r1/s?defs=mRenderTarget&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;">mRenderTarget.<a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer, "already has layer...");

 

    // subtract repaintRect from region, since it will be regenerated

    if (<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=contains&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;">contains(0, 0,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportWidth&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;">viewportWidth, <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportHeight&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;">viewportHeight)) {   ----------> HERE, because of <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer was NULL.

        // repaint full layer, so throw away entire region

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=clear&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;">clear();

    } else {

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=subtractSelf&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;">subtractSelf(<a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#android" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;">android::<a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect(<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=left&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;">left, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=top&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;">top,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=right&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;">right, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=bottom&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;">bottom));

}


And I guessed the callback stack:

Crash Stack:

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so  --> BakedOpRenderer::startRepaintLayer(From PC)

    01 pc 00022483 /system/lib/libhwui.so  --> frameBuilder::replayBakedOps<BakedOpDispatcher> (From LR)

    02 pc 000220e9 /system/lib/libhwui.so  Guessed --> RenderContext::buildLayer

    03 pc 00023cb7 /system/lib/libhwui.so  Guessed --> MethodInvokeRenderTask::run() 

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so



The data flow of offscreenBuffer is like:

offscreenBuffer <--- <a href="http://androidxref.com/7.0.0_r1/s?refs=LayerBuilder&amp;project=frameworks" style="color:rgb(149,79,114);font-family:&quot;Courier New&quot;;font-size:13.3333px" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;">LayerBuilder::offscreenBufer <--- RenderNode::mLayer

I do notice RenderNode::mLayer will set to null_ptr for some reason, and I don't know how the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer. 

Here go my question:

1. Did anyone notice the same kind of crash in BakedOpRenderer::startRepaintLayer?

2. How  the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer?


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libhwui.so crash due to offscreenBuffer is NULL

Chao Yu
In reply to this post by devteam.lakeba
Hi 阿柄 :
 I’m developer from Tencent. Our team meet many RenderNode native crash, if you may we can communicate it ? 

在 2017年9月17日星期日 UTC+8上午3:55:32,Devteam Lakeba写道:
i too experience same issue recently from Android vitals, mostly in Android marshmallow and nougat

native: pc 000000000004276c /system/lib/libc.so (tgkill+12)
native: pc 0000000000040379 /system/lib/libc.so (pthread_kill+32)
native: pc 000000000001ca9b /system/lib/libc.so (raise+10)
native: pc 0000000000019d19 /system/lib/libc.so (__libc_android_abort+34)
native: pc 000000000001755c /system/lib/libc.so (abort+4)
native: pc 0000000000008727 /system/lib/libcutils.so (__android_log_assert+86)
native: pc 0000000000020231 /system/lib/libhwui.so
native: pc 000000000001d4f9 /system/lib/libhwui.so
native: pc 000000000001f23b /system/lib/libhwui.so
native: pc 0000000000022331 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
native: pc 0000000000010205 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
native: pc 00000000000622f3 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
native: pc 000000000003fc7b /system/lib/libc.so (_ZL15__pthread_startPv+30)
native: pc 000000000001a39b /system/lib/libc.so (__start_thread+6)

On Tuesday, 20 June 2017 19:26:28 UTC+5:30, 阿炳 wrote:

Hi,  I’m developer from UC Browser team, Alibaba Groups.

Our app is suffering from some crash in hwui for a long time, which is the highest crash reason in UC Browser App in China.


Crash Stack:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000010

  r0 00000000  r1 00000000  r2 d3575428  r3 00000cf3

  r4 d3575428  r5 d597f408  r6 00000000  r7 d597f374

  r8 d597f380  r9 f3c33268  10 f3c332e0  fp f39eea40

  ip d3dd7008  sp d597f340  lr f3bd8487  pc f3c14a8e  cpsr 600f0030

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so 

    01 pc 00022483 /system/lib/libhwui.so 

    02 pc 000220e9 /system/lib/libhwui.so

    03 pc 00023cb7 /system/lib/libhwui.so

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so

code around pc:
    f3c14a4c 447a4479 e93ef7ba 0001d518 00019095  yDzD..>.........
    f3c14a5c 00012b3b 000190af 0001d4d0 41f0e92d  ;+..........-..A
    f3c14a6c b08aaf03 f36f466c 46a50403 48534605  ....lFo....F.FSH
    f3c14a7c 460e4614 68004478 90096800 28006968  .F.FxD.h.h..hi.(
    f3c14a8c ed96d17b eeb80a04 ec942a40 eeb50a02  {.......@*......
    f3c14a9c eef10ac0 d80ffa10 0ac0eef5 fa10eef1  ................
    f3c14aac ed96d80a eeb83a03 ed943a43 eeb41a02  .....:..C:......
    f3c14abc eef11ac3 da54fa10 1a02ed94 005cf106  ......T.......\.
    f3c14acc 1a03edd4 0c00fff4 fffca904 fff41c00  ................
    f3c14adc fffc2c01 eff03c01 eff204a1 fffb14a3  .,...<..........
    f3c14aec f9410760 f7bb0aef f04feab4 616e0800  `.A.......O...na
    f3c14afc 80bcf886 f7c16868 4601fdcf 68686129  ....hh.....F)ahh
    f3c14b0c fdc1f7c1 f6486bb3 f6485040 f64041e0  .....kH.@PH..A@.
    f3c14b1c f8cd52e1 f7bb8000 f7c9ee80 2801fc4d  .R..........M..(
    f3c14b2c f648d033 f7bc5040 4603ed5c 40d5f648  3.H.@P..\..FH..@
    f3c14b3c d1364283 1203e9d6 f0004628 4628f85b  .B6.....(F..[.(F

code around lr:
    f3bd8444 48626730 f7f74478 e9d5e8a4 1a09010c  0gbHxD..........
    f3bd8454 db3b2905 9178f8df 32fff04f a174f8df  .);...x.O..2..t.
    f3bd8464 06a1eb02 44f946e8 e00044fa f8506b28  .....F.D.D..(kP.
    f3bd8474 6bb87026 6b39b130 0208f107 f03c4620  &p.k0.9k.... F<.
    f3bd8484 e017faf1 0112e9d7 d01c4288 1200e9d7  .........B......
    f3bd8494 f03c4620 6338faa1 1201e9dd d0044291   F<...8c.....B..
    f3bd84a4 98016008 90013004 f107e004 46400130  .`...0......0.@F
    f3bd84b4 fda2f7fc 46214638 4653464a ffcaf040  ....8F!FJFSF@...
    f3bd84c4 f03c4620 3e01fc2d dacf2e01 0384f895   F<.-..>........
    f3bd84d4 6b28b1a8 46206805 0608f105 1200e9d5  ..(k.h F........
    f3bd84e4 f03c4633 4a3cfcc3 4b3c4628 447a4621  3F<...<J(F<K!FzD
    f3bd84f4 f040447b 4620ffaf f03c4631 e9ddfce5  {D@... F1F<.....
    f3bd8504 42b55600 f855d007 46201b04 fb72f03c  .V.B..U... F<.r.
    f3bd8514 d1f842ae b16d9d00 42a89801 1f01d007  .B....m....B....
    f3bd8524 0203f06f ea221b49 44080101 46289001  o...I."....D..(F
    f3bd8534 ebd8f7f6 9903482a 68004478 1a406800  ....*H..xD.h.h@.

 

As I dissassembled the code data given by PC register, I got some instruments like:


f54cba28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}

f54cba2c: af03      add  r7, sp, #12

f54cba2e: b08a      sub  sp, #40 ; 0x28

f54cba30: 466c      mov  r4, sp

f54cba32: f36f 0403 bfc  r4, #0, #4

f54cba36: 46a5      mov  sp, r4

f54cba38: 4605      mov  r5, r0

f54cba3a: 484e      ldr  r0, [pc, #312] ; (0xf54cbb74)

f54cba3c: 4614      mov  r4, r2

f54cba3e: 460e      mov  r6, r1

f54cba40: 4478      add  r0, pc

f54cba42: 6800      ldr  r0, [r0, #0]

f54cba44: 6800      ldr  r0, [r0, #0]

f54cba46: 9009      str  r0, [sp, #36]  ; 0x24

f54cba48: 6968      ldr  r0, [r5, #20]

f54cba4a: 2800      cmp  r0, #0

f54cba4c: d170      bne.n 0xf54cbb30

f54cba4e: ed96 0a04 vldr s0, [r6, #16]          --> PC pointed to here, in different version libhwui.so, we can find the same instrument sequence just once.

f54cba52: eeb8 2a40 vcvt.f32.u32 s4, s0

f54cba56: ec94 0a02 vldmia  r4, {s0-s1}

f54cba5a: eeb5 0ac0 vcmpe.f32 s0, #0.0


I succeeded to find the corresponeding code in Android Source:


void <a href="http://androidxref.com/7.0.0_r1/s?defs=BakedOpRenderer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;">BakedOpRenderer::<a href="https://mail.alibaba-inc.com/alimail/#this" name="8bcb98a3-60aa-44c5-8452-f681d4ddcd4c@googlegroups.com_50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_startRepaintLayer" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer(<a href="http://androidxref.com/7.0.0_r1/s?defs=OffscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;">OffscreenBuffer* <a href="https://mail.alibaba-inc.com/alimail/#this" name="8bcb98a3-60aa-44c5-8452-f681d4ddcd4c@googlegroups.com_50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_offscreenBuffer" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;">offscreenBufferconst <a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect& <a href="https://mail.alibaba-inc.com/alimail/#this" name="8bcb98a3-60aa-44c5-8452-f681d4ddcd4c@googlegroups.com_50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_repaintRect" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;">repaintRect) {

    <a href="http://androidxref.com/7.0.0_r1/s?defs=LOG_ALWAYS_FATAL_IF&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;">LOG_ALWAYS_FATAL_IF(<a href="http://androidxref.com/7.0.0_r1/s?defs=mRenderTarget&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;">mRenderTarget.<a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer, "already has layer...");

 

    // subtract repaintRect from region, since it will be regenerated

    if (<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=contains&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;">contains(0, 0,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportWidth&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;">viewportWidth, <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportHeight&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;">viewportHeight)) {   ----------> HERE, because of <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer was NULL.

        // repaint full layer, so throw away entire region

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=clear&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;">clear();

    } else {

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=subtractSelf&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;">subtractSelf(<a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#android" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;">android::<a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect(<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=left&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;">left, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=top&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;">top,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=right&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;">right, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=bottom&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;">bottom));

}


And I guessed the callback stack:

Crash Stack:

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so  --> BakedOpRenderer::startRepaintLayer(From PC)

    01 pc 00022483 /system/lib/libhwui.so  --> frameBuilder::replayBakedOps<BakedOpDispatcher> (From LR)

    02 pc 000220e9 /system/lib/libhwui.so  Guessed --> RenderContext::buildLayer

    03 pc 00023cb7 /system/lib/libhwui.so  Guessed --> MethodInvokeRenderTask::run() 

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so



The data flow of offscreenBuffer is like:

offscreenBuffer <--- <a href="http://androidxref.com/7.0.0_r1/s?refs=LayerBuilder&amp;project=frameworks" style="color:rgb(149,79,114);font-family:&quot;Courier New&quot;;font-size:13.3333px" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;">LayerBuilder::offscreenBufer <--- RenderNode::mLayer

I do notice RenderNode::mLayer will set to null_ptr for some reason, and I don't know how the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer. 

Here go my question:

1. Did anyone notice the same kind of crash in BakedOpRenderer::startRepaintLayer?

2. How  the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer?


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libhwui.so crash due to offscreenBuffer is NULL

790305967cao
In reply to this post by 阿炳
hello,My team also meets this problem and we have no sulution! Have you solved this issue?

在 2017年6月20日星期二 UTC+8下午9:56:28,阿炳写道:

Hi,  I’m developer from UC Browser team, Alibaba Groups.

Our app is suffering from some crash in hwui for a long time, which is the highest crash reason in UC Browser App in China.


Crash Stack:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000010

  r0 00000000  r1 00000000  r2 d3575428  r3 00000cf3

  r4 d3575428  r5 d597f408  r6 00000000  r7 d597f374

  r8 d597f380  r9 f3c33268  10 f3c332e0  fp f39eea40

  ip d3dd7008  sp d597f340  lr f3bd8487  pc f3c14a8e  cpsr 600f0030

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so 

    01 pc 00022483 /system/lib/libhwui.so 

    02 pc 000220e9 /system/lib/libhwui.so

    03 pc 00023cb7 /system/lib/libhwui.so

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so

code around pc:
    f3c14a4c 447a4479 e93ef7ba 0001d518 00019095  yDzD..>.........
    f3c14a5c 00012b3b 000190af 0001d4d0 41f0e92d  ;+..........-..A
    f3c14a6c b08aaf03 f36f466c 46a50403 48534605  ....lFo....F.FSH
    f3c14a7c 460e4614 68004478 90096800 28006968  .F.FxD.h.h..hi.(
    f3c14a8c ed96d17b eeb80a04 ec942a40 eeb50a02  {.......@*......
    f3c14a9c eef10ac0 d80ffa10 0ac0eef5 fa10eef1  ................
    f3c14aac ed96d80a eeb83a03 ed943a43 eeb41a02  .....:..C:......
    f3c14abc eef11ac3 da54fa10 1a02ed94 005cf106  ......T.......\.
    f3c14acc 1a03edd4 0c00fff4 fffca904 fff41c00  ................
    f3c14adc fffc2c01 eff03c01 eff204a1 fffb14a3  .,...<..........
    f3c14aec f9410760 f7bb0aef f04feab4 616e0800  `.A.......O...na
    f3c14afc 80bcf886 f7c16868 4601fdcf 68686129  ....hh.....F)ahh
    f3c14b0c fdc1f7c1 f6486bb3 f6485040 f64041e0  .....kH.@PH..A@.
    f3c14b1c f8cd52e1 f7bb8000 f7c9ee80 2801fc4d  .R..........M..(
    f3c14b2c f648d033 f7bc5040 4603ed5c 40d5f648  3.H.@P..\..FH..@
    f3c14b3c d1364283 1203e9d6 f0004628 4628f85b  .B6.....(F..[.(F

code around lr:
    f3bd8444 48626730 f7f74478 e9d5e8a4 1a09010c  0gbHxD..........
    f3bd8454 db3b2905 9178f8df 32fff04f a174f8df  .);...x.O..2..t.
    f3bd8464 06a1eb02 44f946e8 e00044fa f8506b28  .....F.D.D..(kP.
    f3bd8474 6bb87026 6b39b130 0208f107 f03c4620  &p.k0.9k.... F<.
    f3bd8484 e017faf1 0112e9d7 d01c4288 1200e9d7  .........B......
    f3bd8494 f03c4620 6338faa1 1201e9dd d0044291   F<...8c.....B..
    f3bd84a4 98016008 90013004 f107e004 46400130  .`...0......0.@F
    f3bd84b4 fda2f7fc 46214638 4653464a ffcaf040  ....8F!FJFSF@...
    f3bd84c4 f03c4620 3e01fc2d dacf2e01 0384f895   F<.-..>........
    f3bd84d4 6b28b1a8 46206805 0608f105 1200e9d5  ..(k.h F........
    f3bd84e4 f03c4633 4a3cfcc3 4b3c4628 447a4621  3F<...<J(F<K!FzD
    f3bd84f4 f040447b 4620ffaf f03c4631 e9ddfce5  {D@... F1F<.....
    f3bd8504 42b55600 f855d007 46201b04 fb72f03c  .V.B..U... F<.r.
    f3bd8514 d1f842ae b16d9d00 42a89801 1f01d007  .B....m....B....
    f3bd8524 0203f06f ea221b49 44080101 46289001  o...I."....D..(F
    f3bd8534 ebd8f7f6 9903482a 68004478 1a406800  ....*H..xD.h.h@.

 

As I dissassembled the code data given by PC register, I got some instruments like:


f54cba28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}

f54cba2c: af03      add  r7, sp, #12

f54cba2e: b08a      sub  sp, #40 ; 0x28

f54cba30: 466c      mov  r4, sp

f54cba32: f36f 0403 bfc  r4, #0, #4

f54cba36: 46a5      mov  sp, r4

f54cba38: 4605      mov  r5, r0

f54cba3a: 484e      ldr  r0, [pc, #312] ; (0xf54cbb74)

f54cba3c: 4614      mov  r4, r2

f54cba3e: 460e      mov  r6, r1

f54cba40: 4478      add  r0, pc

f54cba42: 6800      ldr  r0, [r0, #0]

f54cba44: 6800      ldr  r0, [r0, #0]

f54cba46: 9009      str  r0, [sp, #36]  ; 0x24

f54cba48: 6968      ldr  r0, [r5, #20]

f54cba4a: 2800      cmp  r0, #0

f54cba4c: d170      bne.n 0xf54cbb30

f54cba4e: ed96 0a04 vldr s0, [r6, #16]          --> PC pointed to here, in different version libhwui.so, we can find the same instrument sequence just once.

f54cba52: eeb8 2a40 vcvt.f32.u32 s4, s0

f54cba56: ec94 0a02 vldmia  r4, {s0-s1}

f54cba5a: eeb5 0ac0 vcmpe.f32 s0, #0.0


I succeeded to find the corresponeding code in Android Source:


void <a href="http://androidxref.com/7.0.0_r1/s?defs=BakedOpRenderer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DBakedOpRenderer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG-7nfF0hF7ygMFMiEZL97PZAw3A&#39;;return true;">BakedOpRenderer::<a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_startRepaintLayer" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer(<a href="http://androidxref.com/7.0.0_r1/s?defs=OffscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DOffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGy4P5nptWRZTDB7iuiSrTHxlIoEg&#39;;return true;">OffscreenBuffer* <a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_offscreenBuffer" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzembkUfeP3MhzuXijCGkgKTqeJA&#39;;return true;">offscreenBufferconst <a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect& <a href="https://mail.alibaba-inc.com/alimail/#this" name="50408d90-ebfa-4afa-a268-db161ab325b8@googlegroups.com_repaintRect" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmail.alibaba-inc.com%2Falimail%2F%23this\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFd0WmnkU5xz7F5ichoxH6OjEtsOQ&#39;;return true;"><a href="http://androidxref.com/7.0.0_r1/s?refs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZLyHMGA1ECN-fATXO_7w6Z2LHoA&#39;;return true;">repaintRect) {

    <a href="http://androidxref.com/7.0.0_r1/s?defs=LOG_ALWAYS_FATAL_IF&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DLOG_ALWAYS_FATAL_IF%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlYg2qjsW1GvOvC09uvaYVl05QPg&#39;;return true;">LOG_ALWAYS_FATAL_IF(<a href="http://androidxref.com/7.0.0_r1/s?defs=mRenderTarget&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DmRenderTarget%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEoQWW58XrRU43tOc8NcAmGJ47SIA&#39;;return true;">mRenderTarget.<a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer, "already has layer...");

 

    // subtract repaintRect from region, since it will be regenerated

    if (<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=contains&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dcontains%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH77rsvXjW4Y6-t0jmPl4nSQUOg6Q&#39;;return true;">contains(0, 0,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportWidth&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportWidth%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAt1W1tgyyRg1FQwuS0xiyAoE_kQ&#39;;return true;">viewportWidth, <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/s?defs=viewportHeight&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DviewportHeight%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEE-GJ2LkBx76NJRKO067uz_nFxuA&#39;;return true;">viewportHeight)) {   ----------> HERE, because of <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer was NULL.

        // repaint full layer, so throw away entire region

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=clear&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dclear%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGD7R_gW-Uucc2V9YlL1BZU9JvhVw&#39;;return true;">clear();

    } else {

        <a href="http://androidxref.com/7.0.0_r1/s?defs=offscreenBuffer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DoffscreenBuffer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHeHUmSU86EBoSVY80k5mOx_51S9Q&#39;;return true;">offscreenBuffer-><a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#region" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23region\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF7Jf7-h2NIYIvVYweZVqLpzcT0jw&#39;;return true;">region.<a href="http://androidxref.com/7.0.0_r1/s?defs=subtractSelf&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DsubtractSelf%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUS-ALopus3mK-vAomKHF9UrkhuA&#39;;return true;">subtractSelf(<a href="http://androidxref.com/7.0.0_r1/xref/frameworks/base/libs/hwui/BakedOpRenderer.cpp#android" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fxref%2Fframeworks%2Fbase%2Flibs%2Fhwui%2FBakedOpRenderer.cpp%23android\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpc46qUDEV-jXvcOzkjP_kb2Mk_g&#39;;return true;">android::<a href="http://androidxref.com/7.0.0_r1/s?defs=Rect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEdyX9s3C7TGgYRhmnqipQZVcIwPQ&#39;;return true;">Rect(<a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=left&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dleft%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkScijcqS6C5rwZroHXw7Kb8AkUw&#39;;return true;">left, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=top&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dtop%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBSP4IDewc25rqQnFxNVm16lu6Mg&#39;;return true;">top,

                <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=right&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dright%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGnFg9cNJzKJ2wBx2UUrIXkJEt9_A&#39;;return true;">right, <a href="http://androidxref.com/7.0.0_r1/s?defs=repaintRect&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3DrepaintRect%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFmJZUfA47jfSBhwdYK1TCeXRgImA&#39;;return true;">repaintRect.<a href="http://androidxref.com/7.0.0_r1/s?defs=bottom&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Fdefs%3Dbottom%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHIPWtbRA9EGbDbxwZ2qk0tXnS9cw&#39;;return true;">bottom));

}


And I guessed the callback stack:

Crash Stack:

    >>> [translate by crash parser] <<<

    00 pc 0005ea8e /system/lib/libhwui.so  --> BakedOpRenderer::startRepaintLayer(From PC)

    01 pc 00022483 /system/lib/libhwui.so  --> frameBuilder::replayBakedOps<BakedOpDispatcher> (From LR)

    02 pc 000220e9 /system/lib/libhwui.so  Guessed --> RenderContext::buildLayer

    03 pc 00023cb7 /system/lib/libhwui.so  Guessed --> MethodInvokeRenderTask::run() 

    04 pc 0002713d android::uirenderer::renderthread::RenderThread::threadLoop() LINE:libhwui.so

    05 pc 0000e395 android::Thread::_threadLoop(void*) LINE:libutils.so

    06 pc 00058621 android::AndroidRuntime::javaThreadShell(void*) LINE:libandroid_runtime.so

    07 pc 00047463 __pthread_start(void*) LINE:libc.so

    08 pc 00019e2d __start_thread LINE:libc.so



The data flow of offscreenBuffer is like:

offscreenBuffer <--- <a href="http://androidxref.com/7.0.0_r1/s?refs=LayerBuilder&amp;project=frameworks" style="color:rgb(149,79,114);font-family:&quot;Courier New&quot;;font-size:13.3333px" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DLayerBuilder%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaZ6UK9dI8FIeRWM16wknuj7Zcqw&#39;;return true;">LayerBuilder::offscreenBufer <--- RenderNode::mLayer

I do notice RenderNode::mLayer will set to null_ptr for some reason, and I don't know how the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer. 

Here go my question:

1. Did anyone notice the same kind of crash in BakedOpRenderer::startRepaintLayer?

2. How  the libhwui.so to guarantee RenderNode::mLayer is not null when calling <a href="http://androidxref.com/7.0.0_r1/s?refs=startRepaintLayer&amp;project=frameworks" style="color:rgb(149,79,114)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fandroidxref.com%2F7.0.0_r1%2Fs%3Frefs%3DstartRepaintLayer%26project%3Dframeworks\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcyhECqogOQ2kkSXrC-E2_Ja6cXg&#39;;return true;">startRepaintLayer?


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.