gpt4 book ai didi

android -/system/bin/app_process 检测到堆栈损坏 : aborted ? 这是什么?

转载 作者:行者123 更新时间:2023-11-30 04:12:28 25 4
gpt4 key购买 nike

我正在运行一些 native 代码,并且有很多 JNI 调用应用程序崩溃,除了消息/system/bin/app_process stack corruption detected: aborted in logcat if I try to debug 外,不知道为什么会崩溃

在这种情况下如何找到罪魁祸首?任何可以在这里提供帮助的人

最佳答案

我不是 C/C++ 专家,在 NDK 中遇到了类似的问题。(应用程序崩溃并显示日志:“/system/bin/app_process stack corruption detected: aborted”)。

我发现错误的原因是数组访问冲突。

以防万一像我这样的新手遇到这个问题,以下是一些常见错误:

1.

char  aa[6];
strcpy(aa,"abcdefghijk123457890");//out of bounds

2.

char aa[6];
sprintf(aa,“the value is : %d”, 123);//out of bounds

关于android -/system/bin/app_process 检测到堆栈损坏 : aborted ? 这是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10616617/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com