我在Android中有一个ndk-build项目,我想使用3.2中的Android Studio Profiler进行分析。但是我总是崩溃:
.wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.column {
background: #e2e3e5;
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.26);
margin: 0 32px 14px 0;
max-width: 250px;
padding: 1rem;
}
@keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-20%, 0, 0);
transform: translate3d(-20%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInTop {
from {
opacity: 0;
-webkit-transform: translate3d(0, -20%, 0);
transform: translate3d(0, -20%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(20%, 0, 0);
transform: translate3d(20%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.first-column-start {
-webkit-animation: fadeInLeft 0.8s;
-moz-animation: fadeInLeft 0.8s;
-ms-animation: fadeInLeft 0.8s;
-o-animation: fadeInLeft 0.8s;
animation: fadeInLeft 0.8s;
}
.second-column-start {
-webkit-animation: fadeInTop 0.8s;
-moz-animation: fadeInTop 0.8s;
-ms-animation: fadeInTop 0.8s;
-o-animation: fadeInTop 0.8s;
animation: fadeInTop 0.8s;
}
.third-column-start {
-webkit-animation: fadeInRight 0.8s;
-moz-animation: fadeInRight 0.8s;
-ms-animation: fadeInRight 0.8s;
-o-animation: fadeInRight 0.8s;
animation: fadeInRight 0.8s;
}
据我所知,2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: pid: 21705, tid: 21882, name: engine >>> com.test.example <<<
2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1f
2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: Cause: null pointer dereference
2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: r0 bc281b60 r1 ffffffff r2 bb704199 r3 bb4e9400
2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: r4 bc281b08 r5 bc281b60 r6 f0230240 r7 bc281aa8
2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: r8 bb704100 r9 d149a598 sl 00000001 fp 00000000
2019-02-20 10:10:42.369 21888-21888/? A/DEBUG: ip bb76c6f4 sp bc281aa8 lr bb6d4083 pc bb6d447e cpsr 80000030
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: backtrace:
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: #00 pc 002b047e /data/app/com.test.example-JNm5Mn25Zd3obHmkwErCEg==/lib/arm/mylib.so
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: #01 pc 002b007f /data/app/com.test.example-JNm5Mn25Zd3obHmkwErCEg==/lib/arm/mylib.so
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: #02 pc 002adee5 /data/app/com.test.example-JNm5Mn25Zd3obHmkwErCEg==/lib/arm/mylib.so
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: #03 pc 002ade93 /data/app/com.test.example-JNm5Mn25Zd3obHmkwErCEg==/lib/arm/mylib.so (__gxx_personality_v0+270)
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: #04 pc 0018175c /data/data/com.test.example/libperfa_arm.so
2019-02-20 10:10:42.372 21888-21888/? A/DEBUG: #05 pc 00182080 /data/data/com.test.example/libperfa_arm.so
与C ++中的异常机制有关。但是如何解决这个问题?
我唯一尝试过的就是如果我在库中添加__gxx_personality_v0
标志,那么此问题就可以解决。但是我想知道这里是否还有其他解决方案,因为-fno-exceptions
与STL库不一致。