小编Win*_*nie的帖子

第二个clipPath中的Canvas.clipPath中的SIGSEGV

我有运行Android 4.2.2的华硕Nexus 7我的应用程序在运行以下代码时在sk_malloc_flags中生成一个SIGSEGV:

static Picture createDrawing() {

    Path firstPath = new Path();
    firstPath.moveTo(3058, 12365);
    firstPath.lineTo(8499, 3038);
    firstPath.lineTo(9494, 3619);
    firstPath.lineTo(4053, 12946);
    firstPath.close();

    Path fourthPath = new Path();
    fourthPath.moveTo(3065, 12332);
    fourthPath.lineTo(4053, 12926);
    fourthPath.lineTo(9615, 3669);
    fourthPath.lineTo(8628, 3075);
    fourthPath.close();

    Picture picture = new Picture();
    Canvas canvas = picture.beginRecording(12240, 15840);
    canvas.clipPath(firstPath);
    canvas.clipPath(fourthPath); << SIGSEGV occurs here
    picture.endRecording();
    return picture;
}
Run Code Online (Sandbox Code Playgroud)

SIGSEGV报告如下:

    I/DEBUG   (  124): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
    I/DEBUG   (  124):     r0 00000027  r1 deadbaad  r2 4017f258  r3 00000000
    I/DEBUG …
Run Code Online (Sandbox Code Playgroud)

android segmentation-fault clip

7
推荐指数
2
解决办法
631
查看次数

标签 统计

android ×1

clip ×1

segmentation-fault ×1