07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf487b000 SpaceTypeMallocSpace begin=0x12c00000,end=0x12fc4000,limit=0x32c00000,size=3MB,capacity=256MB,non_growth_limit_capacity=512MB,name=”main rosalloc space”]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4b3f3c0 allocspace main rosalloc space live-bitmap 3[begin=0x12c00000,end=0x32c00000]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4b3f3a0 allocspace main rosalloc space mark-bitmap 3[begin=0x12c00000,end=0x32c00000]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4874350 SpaceTypeImageSpace begin=0x7047f000,end=0x70fc6820,size=11MB,name=”/data/dalvik-cache/arm/system@framework@boot.art”]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4875b40 imagespace /data/dalvik-cache/arm/system@framework@boot.art live-bitmap 0[begin=0x7047f000,end=0x70fc6900]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4875b40 imagespace /data/dalvik-cache/arm/system@framework@boot.art live-bitmap 0[begin=0x7047f000,end=0x70fc6900]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4b18430 SpaceTypeZygoteSpace begin=0x74e53000,end=0x76067000,size=18MB,name=”Zygote space”]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4875d00 allocspace zygote / non moving space live-bitmap 0[begin=0x74e53000,end=0x76067000]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf48b9100 allocspace zygote / non moving space mark-bitmap 0[begin=0x74e53000,end=0x76067000]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf487af80 SpaceTypeMallocSpace begin=0x76067000,end=0x76074000,limit=0x78e53000,size=52KB,capacity=45MB,non_growth_limit_capacity=45MB,name=”non moving space”]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4b3f120 allocspace non moving space live-bitmap 4[begin=0x76067000,end=0x78e53000]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf4b3f1c0 allocspace non moving space mark-bitmap 4[begin=0x76067000,end=0x78e53000]
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf486d340 large object space:GcRetentionPolicyAlwaysCollect
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] JNI DETECTED ERROR IN APPLICATION: native code passing in reference to invalid stack indirect reference table or invalid reference: 0xdf406900
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] in call to GetObjectClass
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] “Thread-15089″ prio=5 tid=22 Runnable
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] | group=”main” sCount=0 dsCount=0 obj=0x12dff460 self=0xf4aa8c00
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] | sysTid=31866 nice=0 cgrp=default sched=0/0 handle=0xe0800000
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] | state=R schedstat=( 3146152 877692 42 ) utm=0 stm=0 core=2 HZ=100
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] | stack=0xdf4b0000-0xdf4b2000 stackSize=1012KB
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] | held mutexes= “mutator lock”(shared held)
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70] (no managed stack frames)
07-26 19:45:51.020 31718-31866/com.example.administrator.haiweitwo A/art: art/runtime/check_jni.cc:70]
解决方案
100
看提示,是在C++代码里使用了某个Java层的对象,而这个Java层的对象已经被释放了。
重点检查一下由Java层往Native传递的object 。
这种情况发生在将一个activity contect传到Native层时发生比较多, 应该传一个getApplicationContext. Activity可能被destory, application context 不会。
///