Android 传递给 dlfree 的地址无效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25069186/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Invalid address passed to dlfree
提问by Andrew
My app seems to be crashing "randomly" and I can't figure out why.
我的应用程序似乎“随机”崩溃,我不知道为什么。
The logcat shows the following error:
logcat 显示以下错误:
A/libc(24298): invalid address or address of corrupt block 0x78366c48 passed to dlfree
A/libc(24298): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 24322 (AsyncTask #5)
Could this be something I am doing? Is it something wrong with Android?
这可能是我正在做的事情吗?Android有什么问题吗?
I'm not really sure where to start looking for this at.
我不确定从哪里开始寻找这个。
The person who is seeing this crash did tell me they have "a bad SD card and Verizon is telling me I need to put a new one in." That may or may not be relevant.
看到这次崩溃的人确实告诉我他们有“一张坏 SD 卡,Verizon 告诉我我需要换一张新卡”。这可能相关,也可能不相关。
回答by Rawa
It's hard to solve this issue with no code to look at or any clue what the app is about, but I'll give you my guess what can cause the problem, and hopefully this will lead you in the right direction to solve this issue.
如果没有可查看的代码或任何关于应用程序的线索,很难解决此问题,但我会猜测可能导致问题的原因,希望这将引导您朝着解决此问题的正确方向前进。
First of SIGSEGV
, is a segmentation fault. Which in other words means that a memory access violation, trying to access memory which you are not allowed to. A likely cause of this is that you have ran out of memory, maybe because a memory leak or simply used up all memory. This can be caused by a bug you are using in a plugin that uses native C/C++ code through NDK.
首先SIGSEGV
,是分段错误。换句话说,这意味着内存访问冲突,试图访问您不允许的内存。造成这种情况的一个可能原因是您的内存不足,可能是因为内存泄漏或只是用光了所有内存。这可能是由您在通过 NDK 使用本机 C/C++ 代码的插件中使用的错误引起的。
The error code 0xDEADBAAD ("dead bad") is used by the Android libc abort() function when native heap corruption is detected.
当检测到本机堆损坏时,Android libc abort() 函数使用错误代码 0xDEADBAAD(“dead bad”)。
In my opinion your best shot is to try and recreate the problem in the emulator or get hold of a device which can cause the problem and start debugging memory
to get a hunch of the cause of this.
在我看来,您最好的办法是尝试在模拟器中重现问题,或者找到可能导致问题的设备并开始debugging memory
预知导致此问题的原因。
I would also recommend you to take a look at thisSO question which has similar problems.
我还建议您查看这个具有类似问题的 SO 问题。
Good luck, solving the issue!
祝你好运,解决问题!
Best regards, Rawa
最好的问候,拉瓦