0

これは私のLogCatです:

04-24 10:51:42.384: W/dalvikvm(30752): ReferenceTable overflow (max=1024)
04-24 10:51:42.384: W/dalvikvm(30752): JNI pinned array reference table (0x5c75b170) dump:
04-24 10:51:42.384: W/dalvikvm(30752):   Last 10 entries (of 1024):
04-24 10:51:42.384: W/dalvikvm(30752):      1023: 0x42836b48 byte[] (1 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1022: 0x430b65b8 byte[] (8192 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1021: 0x426f93e8 byte[] (1 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1020: 0x430421b0 byte[] (8192 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1019: 0x42713fa0 byte[] (1 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1018: 0x430ae558 byte[] (8192 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1017: 0x42798e88 byte[] (1 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1016: 0x430a64f8 byte[] (8192 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1015: 0x42e6bce0 byte[] (1 elements)
04-24 10:51:42.384: W/dalvikvm(30752):      1014: 0x43092438 byte[] (8192 elements)
04-24 10:51:42.384: W/dalvikvm(30752):   Summary:
04-24 10:51:42.384: W/dalvikvm(30752):       515 of byte[] (1 elements) (515 unique instances)
04-24 10:51:42.384: W/dalvikvm(30752):       509 of byte[] (8192 elements) (509 unique instances)
04-24 10:51:42.384: E/dalvikvm(30752): Failed adding to JNI pinned array ref table (1024 entries)
04-24 10:51:42.384: I/dalvikvm(30752): "Thread-2836" prio=5 tid=1036 RUNNABLE
04-24 10:51:42.384: I/dalvikvm(30752):   | group="main" sCount=0 dsCount=0 obj=0x42773468 self=0x9da32660
04-24 10:51:42.384: I/dalvikvm(30752):   | sysTid=850 nice=0 sched=0/0 cgrp=apps handle=-1650356024
04-24 10:51:42.384: I/dalvikvm(30752):   | schedstat=( 0 0 0 ) utm=0 stm=0 core=0
04-24 10:51:42.384: I/dalvikvm(30752):   at libcore.io.Posix.recvfromBytes(Native Method)
04-24 10:51:42.384: I/dalvikvm(30752):   at libcore.io.Posix.recvfrom(Posix.java:131)
04-24 10:51:42.384: I/dalvikvm(30752):   at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
04-24 10:51:42.384: I/dalvikvm(30752):   at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.io.DataInputStream.read(DataInputStream.java:84)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.io.BufferedInputStream.read(BufferedInputStream.java:304)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.io.InputStream.read(InputStream.java:163)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.io.BufferedInputStream.read(BufferedInputStream.java:309)
04-24 10:51:42.394: I/dalvikvm(30752):   at java.io.InputStream.read(InputStream.java:163)
04-24 10:51:42.394: I/dalvikvm(30752):   at com.bowltec.network.Reader1$1.run(Reader1.java:28)
04-24 10:51:42.394: E/dalvikvm(30752): VM aborting
04-24 10:51:42.394: A/libc(30752): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 850 (Thread-2836)

そして、ここに私のコード、このLogCatは次のものに属します:

public static int cfgget(String tocollect) throws IOException {

    FileInputStream fis = context.openFileInput(cfg);
    props.load(fis);
    fis.close();

    if (props.containsKey(tocollect)) {
        String collected = props.getProperty(tocollect, "0");
        coll = Integer.valueOf(collected);
        return coll;
    } else {
        return 0;

    }
}

このスニペットは少なくとも毎秒呼び出され、約 5 ~ 6 分後に上記の LogCat でアプリがクラッシュします。それが何を言っているのかを理解し、この問題を解決するのを手伝ってくれる人はいますか?

4

1 に答える 1

0

このエラーは、私が使用したスレッドに属していました。1024 個のスレッドを開いているが、何らかの方法でそれらを停止するのを忘れた場合、上記のようになります。

于 2013-08-15T13:57:19.953 に答える