2012-07-16 44 views
0

我的Android應用程序崩潰在JNI代碼和LogCat顯示以下輸出,這可能是什麼原因導致這種失敗?我如何管理JNI內部的本機內存?如何解釋Android本機代碼中的JNI錯誤?這個錯誤的含義是什麼?

07-16 11:51:19.500: W/dalvikvm(15869): threadid=4: spin on suspend #1 threadid=3 (pcf=0) 
07-16 11:51:20.242: W/dalvikvm(15869): threadid=4: spin on suspend #2 threadid=3 (pcf=0) 
07-16 11:51:20.242: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:20.242: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:20.242: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:20.242: I/dalvikvm(15869): | schedstat=(1251222 701905 25) 
07-16 11:51:20.242: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:20.242: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:20.242: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:20.242: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:20.242: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:20.281: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:21.054: W/dalvikvm(15869): threadid=4: spin on suspend #3 threadid=3 (pcf=0) 
07-16 11:51:21.054: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:21.054: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:21.054: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:21.054: I/dalvikvm(15869): | schedstat=(2502444 65551756 35) 
07-16 11:51:21.054: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:21.054: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:21.054: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:21.054: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:21.054: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:21.117: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:21.914: W/dalvikvm(15869): threadid=4: spin on suspend #4 threadid=3 (pcf=0) 
07-16 11:51:21.914: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:21.914: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:21.914: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:21.914: I/dalvikvm(15869): | schedstat=(3479006 203796386 45) 
07-16 11:51:21.914: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:21.914: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:21.914: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:21.914: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:21.914: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:22.015: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:22.796: W/dalvikvm(15869): threadid=4: spin on suspend #5 threadid=3 (pcf=0) 
07-16 11:51:22.796: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:22.796: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:22.796: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:22.804: I/dalvikvm(15869): | schedstat=(4821778 368194582 56) 
07-16 11:51:22.804: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:22.804: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:22.804: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:22.804: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:22.804: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:22.867: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:23.617: W/dalvikvm(15869): threadid=4: spin on suspend #6 threadid=3 (pcf=0) 
07-16 11:51:23.617: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:23.617: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:23.617: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:23.617: I/dalvikvm(15869): | schedstat=(5706788 437561037 64) 
07-16 11:51:23.617: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:23.617: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:23.617: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:23.617: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:23.617: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:23.695: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:24.445: W/dalvikvm(15869): threadid=4: spin on suspend #7 threadid=3 (pcf=0) 
07-16 11:51:24.445: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:24.445: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:24.445: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:24.445: I/dalvikvm(15869): | schedstat=(6744387 515899659 74) 
07-16 11:51:24.445: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:24.445: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:24.445: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:24.445: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:24.445: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:24.445: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:25.195: W/dalvikvm(15869): threadid=4: spin on suspend #8 threadid=3 (pcf=0) 
07-16 11:51:25.195: I/dalvikvm(15869): "Signal Catcher" daemon prio=5 tid=4 RUNNABLE 
07-16 11:51:25.195: I/dalvikvm(15869): | group="system" sCount=0 dsCount=0 obj=0x405115e8 self=0x159898 
07-16 11:51:25.195: I/dalvikvm(15869): | sysTid=15873 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1575600 
07-16 11:51:25.195: I/dalvikvm(15869): | schedstat=(7751467 517486574 82) 
07-16 11:51:25.195: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
07-16 11:51:25.195: I/dalvikvm(15869): "GC" daemon prio=5 tid=3 RUNNABLE 
07-16 11:51:25.195: I/dalvikvm(15869): | group="system" sCount=1 dsCount=0 obj=0x40511540 self=0x159d70 
07-16 11:51:25.195: I/dalvikvm(15869): | sysTid=15872 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1422192 
07-16 11:51:25.195: I/dalvikvm(15869): | schedstat=(149871827 1162109373 98) 
07-16 11:51:25.203: I/dalvikvm(15869): at dalvik.system.NativeStart.run(Native Method) 
+0

線程問題?比賽狀況可能? – Tancho 2012-07-17 09:58:53

回答

1

類似的問題here..Please看到here ..Might幫助你的地方

+1

即使我們的顯示名稱是相同的... lolz ...我手動嘗試並且問題有點解決...但是必須有一些這些類型的錯誤的參考或一些工具來跟蹤本機內存分配... – aProgrammer 2012-07-16 07:58:14

+0

Yaa。 ..你發佈的問題有點小,我以前面臨...仍然研究將幫助它解決你的問題。 – 2012-07-16 08:02:58

0

正是從這個問題是在JNI開始就明確,我穿過檢查本機代碼,發現我所用memset()memcpy() in JNI錯誤的字節數。我糾正了代碼並解決了問題。

對於其他面臨同樣問題的人,「請檢查您的內存使用情況在本地代碼。」

相關問題