所以,这里的想法是收集三个日志,轻松任务。 但我只能按特定顺序获取日志,或者触摸日志会使应用程序崩溃。为什么? 如果我按顺序抓住它们,但是如果我先触摸log 2或3,它就会崩溃。 有更好的方法吗?
public void initQuestTwo() {
createHUD();
logSprite = new Sprite(300, 300, AssetLoaderUtil.logTextureRegion,
mContext.getVertexBufferObjectManager()) {
@Override
protected void onManagedUpdate(float pSecondsElapsed) {
super.onManagedUpdate(pSecondsElapsed);
if (mPlayerSprite.collidesWith(this)) {
numberOfLogs++;
mContext.toastOnUIThread("Got log " + numberOfLogs + "/3",
Toast.LENGTH_SHORT);
SceneManager.mWorldScene.detachChild(logSprite);
}
}
};
log2Sprite = new Sprite(100, 400, AssetLoaderUtil.logTextureRegion,
mContext.getVertexBufferObjectManager()) {
@Override
protected void onManagedUpdate(float pSecondsElapsed) {
super.onManagedUpdate(pSecondsElapsed);
if (mPlayerSprite.collidesWith(this)) {
numberOfLogs++;
mContext.toastOnUIThread("Got log " + numberOfLogs + "/3",
Toast.LENGTH_SHORT);
SceneManager.mWorldScene.detachChild(log2Sprite);
}
}
};
log3Sprite = new Sprite(250, 30, AssetLoaderUtil.logTextureRegion,
mContext.getVertexBufferObjectManager()) {
@Override
protected void onManagedUpdate(float pSecondsElapsed) {
super.onManagedUpdate(pSecondsElapsed);
if (mPlayerSprite.collidesWith(this)) {
numberOfLogs++;
mContext.toastOnUIThread("Got log " + numberOfLogs + "/3",
Toast.LENGTH_SHORT);
SceneManager.mWorldScene.detachChild(log3Sprite);
}
}
};
logSprite.setZIndex(10);
this.attachChild(logSprite);
log2Sprite.setZIndex(10);
this.attachChild(log2Sprite);
log3Sprite.setZIndex(10);
this.attachChild(log3Sprite);
}
/libGLESv1_CM_POWERVR_SGX540_120.so
10-16 20:02:43.402: D/libEGL(5264): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
10-16 20:02:43.473: I/ActivityManager(478): Displayed WorldScene.test.test/.WorldActivity: +2s620ms (total +16s686ms)
10-16 20:02:43.481: W/IInputConnectionWrapper(831): showStatusIcon on inactive InputConnection
10-16 20:02:43.543: D/AndEngine(5264): VERSION: OpenGL ES 2.0 build 1.9.RC2@2139099
10-16 20:02:43.543: D/AndEngine(5264): RENDERER: PowerVR SGX 540
10-16 20:02:43.543: D/AndEngine(5264): EGLCONFIG: EGLConfig(Red=5, Green=6, Blue=5, Alpha=0, Depth=0, Stencil=0)
10-16 20:02:43.543: D/AndEngine(5264): EXTENSIONS: GL_EXT_debug_marker GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_vertex_half_float GL_OES_texture_float GL_OES_texture_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_fragment_precision_high GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_required_internalformat GL_OES_depth_texture GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_standard_derivatives GL_OES_vertex_array_object GL_OES_egl_sync GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_EXT_discard_framebuffer GL_EXT_shader_texture_lod GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_npot GL_IMG_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_program_binary GL_IMG_uniform_buffer_object GL_IMG_multisampled_render_to_texture
10-16 20:02:43.543: D/AndEngine(5264): MAX_VERTEX_ATTRIBS: 8
10-16 20:02:43.543: D/AndEngine(5264): MAX_VERTEX_UNIFORM_VECTORS: 128
10-16 20:02:43.543: D/AndEngine(5264): MAX_FRAGMENT_UNIFORM_VECTORS: 64
10-16 20:02:43.543: D/AndEngine(5264): MAX_TEXTURE_IMAGE_UNITS: 8
10-16 20:02:43.543: D/AndEngine(5264): MAX_TEXTURE_SIZE: 2048
10-16 20:02:43.543: D/AndEngine(5264): WorldActivity.onSurfaceCreated @(Thread: 'GLThread 1233')
10-16 20:02:43.543: D/AndEngine(5264): WorldActivity.onCreateGame @(Thread: 'GLThread 1233')
10-16 20:02:43.551: D/AndEngine(5264): WorldActivity.onCreateResources @(Thread: 'GLThread 1233')
10-16 20:02:43.621: D/AndEngine(5264): WorldActivity.onCreateScene @(Thread: 'GLThread 1233')
10-16 20:02:43.738: D/AndEngine(5264): WorldActivity.onPopulateScene @(Thread: 'GLThread 1233')
10-16 20:02:43.738: D/AndEngine(5264): WorldActivity.onGameCreated @(Thread: 'GLThread 1233')
10-16 20:02:43.738: D/AndEngine(5264): WorldActivity.onSurfaceChanged(Width=810, Height=540) @(Thread: 'GLThread 1233')
10-16 20:02:43.738: D/AndEngine(5264): WorldActivity.onResumeGame @(Thread: 'main')
10-16 20:02:43.910: D/dalvikvm(5264): GC_FOR_ALLOC freed 713K, 10% free 8349K/9187K, paused 15ms, total 15ms
10-16 20:02:43.910: I/dalvikvm-heap(5264): Grow heap (frag case) to 9.805MB for 1659856-byte allocation
10-16 20:02:43.965: D/dalvikvm(5264): GC_FOR_ALLOC freed 13K, 9% free 9956K/10851K, paused 13ms, total 13ms
10-16 20:02:43.973: D/dalvikvm(5264): GC_FOR_ALLOC freed <1K, 9% free 9956K/10851K, paused 13ms, total 13ms
10-16 20:02:43.981: I/dalvikvm-heap(5264): Grow heap (frag case) to 12.958MB for 3319696-byte allocation
10-16 20:02:44.012: D/dalvikvm(5264): GC_CONCURRENT freed <1K, 7% free 13198K/14115K, paused 19ms+2ms, total 34ms
10-16 20:02:44.035: D/dalvikvm(5264): GC_FOR_ALLOC freed 0K, 7% free 13198K/14115K, paused 14ms, total 14ms
10-16 20:02:44.043: I/dalvikvm-heap(5264): Grow heap (frag case) to 14.541MB for 1659856-byte allocation
10-16 20:02:44.309: D/wifi(478): doString: SIGNAL_POLL
10-16 20:02:44.981: D/dalvikvm(5264): GC_FOR_ALLOC freed 0K, 7% free 14819K/15779K, paused 13ms, total 13ms
10-16 20:02:45.012: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:45.035: D/dalvikvm(5264): GC_EXPLICIT freed 6493K, 48% free 8326K/15779K, paused 2ms+3ms, total 25ms
10-16 20:02:45.043: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:45.067: D/dalvikvm(5264): GC_EXPLICIT freed 18K, 48% free 8327K/15779K, paused 2ms+2ms, total 25ms
10-16 20:02:45.098: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:45.121: D/dalvikvm(5264): GC_EXPLICIT freed 39K, 48% free 8327K/15779K, paused 2ms+2ms, total 24ms
10-16 20:02:45.137: D/GameIntro(5264): Current Timeline Item: 0 max: 3
10-16 20:02:45.293: D/dalvikvm(478): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:45.504: D/dalvikvm(478): GC_EXPLICIT freed 3473K, 28% free 22460K/30819K, paused 5ms+18ms, total 208ms
10-16 20:02:45.660: D/GameIntro(5264): Current Timeline Item: 1 max: 3
10-16 20:02:47.317: D/wifi(478): doString: SIGNAL_POLL
10-16 20:02:47.676: D/GameIntro(5264): Current Timeline Item: 2 max: 3
10-16 20:02:48.699: D/GameIntro(5264): Size: 3 Finished!
10-16 20:02:48.699: D/GameIntro(5264): Unregistered!
10-16 20:02:48.746: D/AndEngine(5264): FPS: 43.16 (MIN: 17 ms | MAX: 1396 ms)
10-16 20:02:48.879: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 0 item not yet recycled. Allocated 1 more.
10-16 20:02:48.879: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 0 item not yet recycled. Allocated 1 more.
10-16 20:02:49.129: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:49.152: D/dalvikvm(5264): GC_EXPLICIT freed 297K, 47% free 8392K/15779K, paused 1ms+3ms, total 28ms
10-16 20:02:49.231: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:49.277: D/dalvikvm(5264): GC_EXPLICIT freed 780K, 47% free 8439K/15779K, paused 12ms+13ms, total 43ms
10-16 20:02:49.918: D/Tethering(478): interfaceLinkStateChanged wlan0, true
10-16 20:02:49.918: D/Tethering(478): interfaceStatusChanged wlan0, true
10-16 20:02:49.918: D/wifi(478): doBoolean: AP_SCAN 1
10-16 20:02:49.926: D/wifi(478): doString: SCAN_RESULTS
10-16 20:02:49.934: D/LSAPP_LSDet(3278): hasPoi:...no POIs !
10-16 20:02:49.934: D/LSAPP_Beacon(3278): notifyAllCallers : notify caller POI=null caller:Handler (com.motorola.contextual.virtualsensor.locationsensor.LocationDetection$MessageHandler) {41796eb8}
10-16 20:02:49.934: E/LSApp_App(3278): Sending Message to Handler (com.motorola.contextual.virtualsensor.locationsensor.LocationDetection$MessageHandler) {41796eb8}: msg :1010002
10-16 20:02:49.934: D/LSAPP_LSDet(3278): matchBeacons: Beacon no match any poi...:
10-16 20:02:49.934: D/LSAPP_LSDet(3278): startDetection: celltower changed : do nothing because not in a poi and cells are not POI cells ::{"NetTyp":"CDMA","BaseStnLat":"2147483647","NetOp":"","BaseStnId":"0","BaseStnLng":"2147483647","CntryISO":"","NetId":"0","SysId":"0"}
10-16 20:02:49.934: D/LSAPP_TimerTask(3278): stopPeriodicalUpdate : network provider:false wifiscan: true
10-16 20:02:50.317: D/wifi(478): doString: SIGNAL_POLL
10-16 20:02:52.606: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:02:52.606: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:02:52.613: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:02:52.613: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:02:52.629: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:02:52.629: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:02:52.645: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:02:52.645: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:02:52.684: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:52.707: D/dalvikvm(5264): GC_EXPLICIT freed 165K, 46% free 8525K/15779K, paused 2ms+2ms, total 25ms
10-16 20:02:52.754: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:52.785: D/dalvikvm(5264): GC_EXPLICIT freed 5K, 46% free 8527K/15779K, paused 2ms+3ms, total 27ms
10-16 20:02:52.863: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 1 item not yet recycled. Allocated 1 more.
10-16 20:02:52.863: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 1 item not yet recycled. Allocated 1 more.
10-16 20:02:52.879: D/dalvikvm(5264): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:02:52.895: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 2 item not yet recycled. Allocated 1 more.
10-16 20:02:52.895: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 2 item not yet recycled. Allocated 1 more.
10-16 20:02:52.910: D/dalvikvm(5264): GC_EXPLICIT freed 16K, 46% free 8529K/15779K, paused 2ms+3ms, total 30ms
10-16 20:02:53.324: D/wifi(478): doString: SIGNAL_POLL
10-16 20:02:53.801: D/AndEngine(5264): FPS: 35.01 (MIN: 17 ms | MAX: 241 ms)
10-16 20:02:54.176: W/AndEngine(5264): changed its State to PRESSED, which doesn't have a ITextureRegion supplied. Applying default ITextureRegion.
10-16 20:02:55.301: I/SBar.NetworkController(598): updateTelephonySignalStrength: No service
10-16 20:02:55.504: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 3 item not yet recycled. Allocated 1 more.
10-16 20:02:55.504: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 3 item not yet recycled. Allocated 1 more.
10-16 20:02:55.543: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 4 item not yet recycled. Allocated 1 more.
10-16 20:02:55.543: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 4 item not yet recycled. Allocated 1 more.
10-16 20:02:55.574: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 5 item not yet recycled. Allocated 1 more.
10-16 20:02:55.574: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 5 item not yet recycled. Allocated 1 more.
10-16 20:02:55.598: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 6 item not yet recycled. Allocated 1 more.
10-16 20:02:55.598: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 6 item not yet recycled. Allocated 1 more.
10-16 20:02:56.324: D/wifi(478): doString: SIGNAL_POLL
10-16 20:02:58.824: D/AndEngine(5264): FPS: 13.98 (MIN: 44 ms | MAX: 424 ms)
10-16 20:02:59.332: D/wifi(478): doString: SIGNAL_POLL
10-16 20:02:59.988: V/AlarmManager(478): sending alarm Alarm{41a5c078 type 3 android}
10-16 20:03:02.332: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:03.777: D/AndEngine(5264): FPS: 13.11 (MIN: 44 ms | MAX: 409 ms)
10-16 20:03:04.090: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:03:04.098: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:03:04.098: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:03:04.098: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:03:04.106: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:03:04.106: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:03:04.121: W/AndEngine(5264): No ITextureRegion supplied for State.PRESSED.
10-16 20:03:04.121: W/AndEngine(5264): No ITextureRegion supplied for State.DISABLED.
10-16 20:03:05.332: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:08.340: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:08.770: D/AndEngine(5264): FPS: 10.74 (MIN: 46 ms | MAX: 434 ms)
10-16 20:03:09.996: D/wifi(478): doBoolean: AP_SCAN 1
10-16 20:03:09.996: D/wifi(478): doString: SCAN_RESULTS
10-16 20:03:09.996: D/Tethering(478): interfaceLinkStateChanged wlan0, true
10-16 20:03:10.004: D/Tethering(478): interfaceStatusChanged wlan0, true
10-16 20:03:10.012: D/LSAPP_LSDet(3278): hasPoi:...no POIs !
10-16 20:03:10.012: D/LSAPP_Beacon(3278): notifyAllCallers : notify caller POI=null caller:Handler (com.motorola.contextual.virtualsensor.locationsensor.LocationDetection$MessageHandler) {41796eb8}
10-16 20:03:10.012: E/LSApp_App(3278): Sending Message to Handler (com.motorola.contextual.virtualsensor.locationsensor.LocationDetection$MessageHandler) {41796eb8}: msg :1010002
10-16 20:03:10.020: D/LSAPP_LSDet(3278): matchBeacons: Beacon no match any poi...:
10-16 20:03:10.020: D/LSAPP_LSDet(3278): startDetection: celltower changed : do nothing because not in a poi and cells are not POI cells ::{"NetTyp":"CDMA","BaseStnLat":"2147483647","NetOp":"","BaseStnId":"0","BaseStnLng":"2147483647","CntryISO":"","NetId":"0","SysId":"0"}
10-16 20:03:10.020: D/LSAPP_TimerTask(3278): stopPeriodicalUpdate : network provider:false wifiscan: true
10-16 20:03:11.348: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:11.535: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 7 item not yet recycled. Allocated 1 more.
10-16 20:03:11.535: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 7 item not yet recycled. Allocated 1 more.
10-16 20:03:11.574: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 8 item not yet recycled. Allocated 1 more.
10-16 20:03:11.574: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 8 item not yet recycled. Allocated 1 more.
10-16 20:03:11.606: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 9 item not yet recycled. Allocated 1 more.
10-16 20:03:11.606: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 9 item not yet recycled. Allocated 1 more.
10-16 20:03:11.723: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 10 item not yet recycled. Allocated 1 more.
10-16 20:03:11.723: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 10 item not yet recycled. Allocated 1 more.
10-16 20:03:11.746: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 11 item not yet recycled. Allocated 1 more.
10-16 20:03:11.746: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 11 item not yet recycled. Allocated 1 more.
10-16 20:03:11.777: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 12 item not yet recycled. Allocated 1 more.
10-16 20:03:11.777: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 12 item not yet recycled. Allocated 1 more.
10-16 20:03:12.277: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 13 item not yet recycled. Allocated 1 more.
10-16 20:03:12.277: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 13 item not yet recycled. Allocated 1 more.
10-16 20:03:12.309: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 14 item not yet recycled. Allocated 1 more.
10-16 20:03:12.309: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 14 item not yet recycled. Allocated 1 more.
10-16 20:03:12.340: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 15 item not yet recycled. Allocated 1 more.
10-16 20:03:12.340: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 15 item not yet recycled. Allocated 1 more.
10-16 20:03:12.371: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 16 item not yet recycled. Allocated 1 more.
10-16 20:03:12.371: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 16 item not yet recycled. Allocated 1 more.
10-16 20:03:12.402: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 17 item not yet recycled. Allocated 1 more.
10-16 20:03:12.402: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 17 item not yet recycled. Allocated 1 more.
10-16 20:03:12.442: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 18 item not yet recycled. Allocated 1 more.
10-16 20:03:12.442: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 18 item not yet recycled. Allocated 1 more.
10-16 20:03:12.465: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 19 item not yet recycled. Allocated 1 more.
10-16 20:03:12.465: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 19 item not yet recycled. Allocated 1 more.
10-16 20:03:12.488: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 20 item not yet recycled. Allocated 1 more.
10-16 20:03:12.488: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 20 item not yet recycled. Allocated 1 more.
10-16 20:03:12.871: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 21 item not yet recycled. Allocated 1 more.
10-16 20:03:12.871: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 21 item not yet recycled. Allocated 1 more.
10-16 20:03:12.910: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 22 item not yet recycled. Allocated 1 more.
10-16 20:03:12.910: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 22 item not yet recycled. Allocated 1 more.
10-16 20:03:12.957: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 23 item not yet recycled. Allocated 1 more.
10-16 20:03:12.957: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 23 item not yet recycled. Allocated 1 more.
10-16 20:03:12.988: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 24 item not yet recycled. Allocated 1 more.
10-16 20:03:12.988: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 24 item not yet recycled. Allocated 1 more.
10-16 20:03:13.020: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 25 item not yet recycled. Allocated 1 more.
10-16 20:03:13.020: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 25 item not yet recycled. Allocated 1 more.
10-16 20:03:13.043: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 26 item not yet recycled. Allocated 1 more.
10-16 20:03:13.043: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 26 item not yet recycled. Allocated 1 more.
10-16 20:03:13.285: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 27 item not yet recycled. Allocated 1 more.
10-16 20:03:13.285: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 27 item not yet recycled. Allocated 1 more.
10-16 20:03:13.324: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 28 item not yet recycled. Allocated 1 more.
10-16 20:03:13.324: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 28 item not yet recycled. Allocated 1 more.
10-16 20:03:13.356: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 29 item not yet recycled. Allocated 1 more.
10-16 20:03:13.356: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 29 item not yet recycled. Allocated 1 more.
10-16 20:03:13.395: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 30 item not yet recycled. Allocated 1 more.
10-16 20:03:13.395: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 30 item not yet recycled. Allocated 1 more.
10-16 20:03:13.410: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 31 item not yet recycled. Allocated 1 more.
10-16 20:03:13.410: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 31 item not yet recycled. Allocated 1 more.
10-16 20:03:13.442: V/AndEngine(5264): org.andengine.input.touch.TouchEvent$TouchEventPool<TouchEvent> was exhausted, with 32 item not yet recycled. Allocated 1 more.
10-16 20:03:13.442: V/AndEngine(5264): org.andengine.util.adt.pool.PoolUpdateHandler$1<TouchEventRunnablePoolItem> was exhausted, with 32 item not yet recycled. Allocated 1 more.
10-16 20:03:14.356: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:15.332: I/SBar.NetworkController(598): updateTelephonySignalStrength: No service
10-16 20:03:16.684: W/dalvikvm(5264): threadid=12: thread exiting with uncaught exception (group=0x40d072a0)
10-16 20:03:16.699: E/AndroidRuntime(5264): FATAL EXCEPTION: UpdateThread
10-16 20:03:16.699: E/AndroidRuntime(5264): java.lang.IndexOutOfBoundsException: Invalid index 13, size is 13
10-16 20:03:16.699: E/AndroidRuntime(5264): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
10-16 20:03:16.699: E/AndroidRuntime(5264): at java.util.ArrayList.get(ArrayList.java:304)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.entity.Entity.onManagedUpdate(Entity.java:1402)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.entity.scene.Scene.onManagedUpdate(Scene.java:284)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.entity.Entity.onUpdate(Entity.java:1167)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.engine.Engine.onUpdateScene(Engine.java:604)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.engine.Engine.onUpdate(Engine.java:599)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.engine.LimitedFPSEngine.onUpdate(LimitedFPSEngine.java:51)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.engine.Engine.onTickUpdate(Engine.java:561)
10-16 20:03:16.699: E/AndroidRuntime(5264): at org.andengine.engine.Engine$UpdateThread.run(Engine.java:833)
10-16 20:03:16.715: W/ActivityManager(478): Force finishing activity WorldScene.test.test/.WorldActivity
10-16 20:03:16.754: D/AndEngine(5264): WorldActivity.onPause @(Thread: 'main')
10-16 20:03:16.770: W/ApplicationContext(478): Unable to create files directory files
10-16 20:03:17.254: W/ActivityManager(478): Activity pause timeout for ActivityRecord{4262cfc0 WorldScene.test.test/.WorldActivity}
10-16 20:03:17.277: I/InputManager-JNI(478): Setting pointerVelocityControlParameters.acceleration 3.000000 2.
10-16 20:03:17.277: I/InputReader(478): Reconfiguring input devices. changes=0x00000004
10-16 20:03:17.277: I/InputReader(478): Device reconfigured: id=2, name='atmxt-i2c', surface size is now 540x960, mode is 1
10-16 20:03:17.301: D/ExtDispService(786): onRotationChanged - rotation = 0
10-16 20:03:17.301: D/ExtDispService(786): onRotationChanged! - PORTRAIT!!!
10-16 20:03:17.301: D/IExtDispIpcCB(214): BnExtDispIpcCB NOTIFYCB: type:101; ext1:1; ext2:0;
10-16 20:03:17.309: D/HWC_HDMI_MOT(214): IpcCB notifyCallback: type:101; ext1:1; ext2:0;
10-16 20:03:17.309: D/HWC_HDMI_MOT(214): IpcCB notifyCallback: UI Orientation state change - rotation = 0
10-16 20:03:17.309: D/ti_hwc(214): hdmi_callback: UI Rotation = 0
10-16 20:03:17.309: I/ActivityManager(478): Config changed: {1.0 311mcc480mnc en_US sw360dp w360dp h614dp nrml long port finger -keyb/v/h -nav/h s.99}
10-16 20:03:17.356: I/PortalService(775): onConfigurationChanged
10-16 20:03:17.356: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:17.356: I/SystemUIService(598): onConfigurationChanged reached.
10-16 20:03:17.356: I/SystemUIService(598): isLayoutXLarge = false
10-16 20:03:17.395: W/ResourceType(831): No package identifier when getting value for resource number 0x00000000
10-16 20:03:17.410: D/EvbridgeService(775): handleIntent() android.intent.action.CONFIGURATION_CHANGED handled by com.android.portal.EvbridgeService@4151ec60
10-16 20:03:17.426: D/SizeAdaptiveLayout(598): com.android.internal.widget.SizeAdaptiveLayout@417a3778child view android.widget.FrameLayout@416948a8 measured out of bounds at 95px clamped to 96px
10-16 20:03:17.426: D/SizeAdaptiveLayout(598): com.android.internal.widget.SizeAdaptiveLayout@41927cc0child view android.widget.FrameLayout@4192dd68 measured out of bounds at 95px clamped to 96px
10-16 20:03:17.465: D/Launcher.Model(831): onReceive intent=Intent { act=android.intent.action.CONFIGURATION_CHANGED flg=0x60000010 }
10-16 20:03:17.473: I/SBar.NetworkController(598): onReceive: Intent.ACTION_CONFIGURATION_CHANGED Received
10-16 20:03:17.473: I/SBar.NetworkController(598): updateTelephonySignalStrength: No service
10-16 20:03:17.668: I/ActivityManager(478): No longer want android.process.media (pid 19123): hidden #21
10-16 20:03:19.535: D/dalvikvm(478): WAIT_FOR_CONCURRENT_GC blocked 0ms
10-16 20:03:19.746: D/dalvikvm(478): GC_EXPLICIT freed 2342K, 33% free 20749K/30819K, paused 17ms+11ms, total 212ms
10-16 20:03:20.363: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:23.363: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:26.371: D/wifi(478): doString: SIGNAL_POLL
10-16 20:03:27.676: W/ActivityManager(478): Activity destroy timeout for ActivityRecord{4262cfc0 WorldScene.test.test/.WorldActivity}
注意:缩短每一行需要很长时间..
答案 0 :(得分:1)
无论何时分离孩子,都需要在更新线程上运行。
mContext.runOnUpdateThread(new Runnable() {
public void run() {
SceneManager.mWorldScene.detachChild(logSprite);
}
});