android – 应用程序与本机代码崩溃

前端之家收集整理的这篇文章主要介绍了android – 应用程序与本机代码崩溃前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Crashed: .onlineradioapp|
0  gralloc.rk30board.so           0xb4a2d616 bool art::interpreter::DoCall<false,true>(art::ArtMethod*,art::Thread*,art::ShadowFrame&,art::Instruction const*,unsigned short,art::JValue*)
1  gralloc.rk30board.so           0xb4a315c9 (Missing)
2  gralloc.rk30board.so           0xb48e2465 art::JValue art::interpreter::ExecuteGotoImpl<true,false>(art::Thread*,art::DexFile::CodeItem const*,art::JValue)
3  gralloc.rk30board.so           0xb4a1349d artInterpreterToInterpreterBridge
4  gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,false>(art::ArtMethod*,art::JValue*)
5  gralloc.rk30board.so           0xb48f2fef art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
6  gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
7  gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
8  gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
9  gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
10 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
11 gralloc.rk30board.so           0xb4a30de9 (Missing)
12 gralloc.rk30board.so           0xb48f308b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
13 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
14 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
15 gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
16 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
17 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
18 gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
19 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
20 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
21 gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
22 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
23 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
24 gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
25 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
26 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
27 gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
28 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
29 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
30 gralloc.rk30board.so           0xb48f2c1b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
31 gralloc.rk30board.so           0xb4a133dd artInterpreterToInterpreterBridge
32 gralloc.rk30board.so           0xb4a2d031 bool art::interpreter::DoCall<false,art::JValue*)
33 gralloc.rk30board.so           0xb4a30de9 (Missing)
34 gralloc.rk30board.so           0xb48f308b art::JValue art::interpreter::ExecuteGotoImpl<false,art::JValue)
35 gralloc.rk30board.so           0xb4a131b5 art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*,art::ShadowFrame*)
36 gralloc.rk30board.so           0xb4c1973b artQuickToInterpreterBridge
37 gralloc.rk30board.so           0xb491d003 (Missing)
38 boot.oat                       0x73b4e2bb (Missing)

我已经看到很多崩溃报告都报告在带有上面日志的Fabric上,有没有理解它并找到它的解决方案?我已在许多设备上进行了测试,但我无法生成上述日志.在7天内,Fabric控制台上有大约300个崩溃报告.我刚刚在新的更新中启用了CrashlyticsNdk().
任何人都可以帮我确定问题.

谢谢.

解决方法

经过长时间的调试,我在回答我自己的问题,我在JNI代码中发现了一个错误

代码

char signToken[endingNumber - startingNumber];
    int at = 0;
    for (int i = startingNumber; i < endingNumber; i++) {
        signToken[at] = cstr[i];
        at++;
    }
    signToken[at] = '\0';

代码

char signToken[endingNumber - startingNumber + 1];
    int at = 0;
    for (int i = startingNumber; i < endingNumber; i++) {
        signToken[at] = cstr[i];
        at++;
    }
    signToken[at] = '\0';

它是一个简单的子字符串登录,其中我的字符串大小等于字符串的长度,但是在将大小更新为N 1之后它是字符串1的长度,我已经解决了我的问题.

原文链接:https://www.f2er.com/android/315697.html

猜你在找的Android相关文章