【问题标题】:Getting the signal 11 (SIGSEGV), fault addr deadbaad in Android获取信号 11 (SIGSEGV),Android 中的错误地址 deadbaad
【发布时间】:2011-06-26 19:45:24
【问题描述】:

我正在为 android 构建一个 C\C++ 本机应用程序,尝试在 android 上运行它,但出现以下错误:

02-14 14:05:40.261: 信息/调试(31): *** *** *** *** *** *** *** *** *** *** *** * ** *** *** *** *** 02-14 14:05:40.261:INFO/DEBUG(31):构建指纹:'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys' 02-14 14:05:40.280: INFO/DEBUG(31): pid: 467, tid: 467 >>> com.keypoint_tech.adaptxt.inputmethod.core.testAdaptxt

我尝试使用地址为0001072aarm-eabi-addr2line,而不是我得到的 以下结果

/usr/local/google/home/digit/android/main/cupcake/android/bionic/libc/unistd/brk.c:45

我在所有平台上都得到了这个:Android 1.6、2.1 和 2.2。

当我尝试从填充在 JNI 端的缓冲区中检索值时,我的程序崩溃了。

下面是我用来从 JNI 端填充的缓冲区中获取值的代码。

for(int j = 0; j < count; j++)
{
    len = outBuf.getInt();
    CharBuffer cbuf = outBuf.asCharBuffer();
    CharSequence cS = cbuf.subSequence(0, len);
    wordsPage[j] = cS.toString();
    outBuf.position(outBuf.position()+ (len*2));
}

您能否告诉我任何在 Java 和 JNI 之间共享内存的完整证明机制。

【问题讨论】:

    标签: android android-ndk android-ndk-r4


    【解决方案1】:

    您的wordsPage 尺寸是多少?那里有任何索引越界问题吗? 建议您启用dalvik.vm.checkjni=true 并查看更多信息。

    【讨论】:

    • 如果我在模拟器上得到这个,你如何启用 dalvik.vm,.checkjni=true?
    猜你喜欢
    • 2019-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多