开发者

App using NDK (native code) falls. How can i find out why?

开发者 https://www.devze.com 2023-02-24 17:00 出处:网络
My app is using NDK (4r-crystax in my case) to proccess images from a camera. Problem is, it falls after few minutes of work. I guess there can be some开发者_Go百科 memory leaks or something like that

My app is using NDK (4r-crystax in my case) to proccess images from a camera. Problem is, it falls after few minutes of work. I guess there can be some开发者_Go百科 memory leaks or something like that, but i dont know how to find out where the problem is. This is a log around this error:

04-14 23:07:37.133: INFO/NATIVE CODE(14895): Detection percentage counted.
04-14 23:07:37.163: DEBUG/MDDetectorView(14895): Some debug info
04-14 23:07:37.193: DEBUG/dalvikvm(14895): GC_EXTERNAL_ALLOC freed 19 objects / 872 bytes in 27ms
04-14 23:07:37.283: INFO/NATIVE CODE(14895): Image to proccess loaded.
04-14 23:07:37.493: INFO/ActivityManager(92): Process com.motiondetector (pid 14895) has died.
04-14 23:07:37.493: DEBUG/CameraService(67): Client::~Client E (pid 67, client 0xad08)
04-14 23:07:37.503: INFO/WindowManager(92): WIN DEATH: Window{46590698 com.motiondetector/com.motiondetector.MDMenuActivity paused=false}
04-14 23:07:37.513: ERROR/CameraService(67): getClientFromCookie: client appears to have died

Any ideas? Are there any usefull tools to help me find answer?

Is possible that Android kill on screen activity during proccessing a native code?


If you're using NDK r5 or greater, you can use the ndk-gdb script to run your program and connect to it via GDB. If your native code is crashing, it should drop you into the GDB command line, where you can examine the area of code that's causing the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消