Chinaunix首页 | 论坛 | 博客
  • 博客访问: 122830
  • 博文数量: 29
  • 博客积分: 652
  • 博客等级: 上士
  • 技术积分: 340
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-03 21:26
文章分类

全部博文(29)

文章存档

2013年(8)

2012年(21)

分类: 嵌入式

2012-11-09 16:51:22


  1.     204 if (inputEventObj) {
  2.     208     env->CallVoidMethod(mReceiverObjGlobal,
  3.     209          gInputEventReceiverClassInfo.dispatchInputEvent, seq, inputEventObj);
  4.     210     if (env->ExceptionCheck()) {
  5.     211         ALOGE("Exception dispatching input event.");
  6.     212         skipCallbacks = true;
  7.     213     }
  8.     214         env->DeleteLocalRef(inputEventObj);
  9.     215 } else {
  10.     216      ALOGW("channel '%s' ~ Failed to obtain event object.", getInputChannelName());
  11.     217     skipCallbacks = true;
  12.     218 }
The 4.1.2 source hasn't Line 214 . Lack of line 214 lead to java object inputEventObj leak. Android system print error like:

  1. dalvikvm: JNI ERROR (app bug): local reference table overflow (max=512)
  2. 09-25 11:56:11.939 712 729 W dalvikvm: JNI local reference table (0x5c3a3500) dump:
  3. 09-25 11:56:11.939 712 729 W dalvikvm: Last 10 entries (of 512):
  4. 09-25 11:56:11.939 712 729 W dalvikvm: 511: 0x42677b00 android.view.MotionEvent
  5. 09-25 11:56:11.939 712 729 W dalvikvm: 510: 0x42677b00 android.view.MotionEvent
  6. 09-25 11:56:11.939 712 729 W dalvikvm: 509: 0x42677b00 android.view.MotionEvent
  7. 09-25 11:56:11.939 712 729 W dalvikvm: 508: 0x42677b00 android.view.MotionEvent
  8. 09-25 11:56:11.939 712 729 W dalvikvm: 507: 0x42677b00 android.view.MotionEvent
  9. 09-25 11:56:11.939 712 729 W dalvikvm: 506: 0x42677b00 android.view.MotionEvent
  10. 09-25 11:56:11.939 712 729 W dalvikvm: 505: 0x42677b00 android.view.MotionEvent
  11. 09-25 11:56:11.939 712 729 W dalvikvm: 504: 0x42677b00 android.view.MotionEvent
  12. 09-25 11:56:11.939 712 729 W dalvikvm: 503: 0x42677b00 android.view.MotionEvent
  13. 09-25 11:56:11.939 712 729 W dalvikvm: 502: 0x42677b00 android.view.MotionEvent
  14. 09-25 11:56:11.939 712 729 W dalvikvm: Summary:
  15. 09-25 11:56:11.939 712 729 W dalvikvm: 1 of java.lang.Class
  16. 09-25 11:56:11.939 712 729 W dalvikvm: 511 of android.view.MotionEvent (1 unique instances)
  17. 09-25 11:56:11.939 712 729 E dalvikvm: Failed adding to JNI local ref table (has 512 entries)

阅读(3399) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~