Android: Consumer closed input channel or an error occurred. Events = 0 × 8 exception causes program termination exception Solution

Source: Internet
Author: User

The program terminates abnormally but does not have any exception information. Only the useful information in the log is captured:

09-19 21:57:02. 222: W/inputdispatcher (153): channel'audio c5958 com. nju. ECG/com.nju.ecg.wav E. wavescreen (server )'~ Consumer closed input channel or an error occurred. Events = 0x8
09-19 21:57:02. 222: E/inputdispatcher (153): channel'audio c5958 com. nju. ECG/com.nju.ecg.wav E. wavescreen (server )'~ Channel is unrecoverably broken and will be disposed!
09-19 21:57:02. 232: W/inputdispatcher (153): attempted to unregister already unregistered input channel 'your c5958 com. nju. ECG/com.nju.ecg.wav E. wavescreen (server )'
09-19 21:57:02. 232: D/DPT (153): setperformancemode: 2
09-19 21:57:02. 232: I/activitymanager (153): Process com. nju. ECG (PID 28658) has died.

On the Internet a lot of questions about this problem, the most comprehensive summary can refer to this article http://blog.csdn.net/name_david_lee/article/details/7972957,

My program is inspired by this article to solve this problem. I will summarize it here:

Many people do not see any exception information in the log. They can only see the above logs. In conclusion, the client crashes because the exception is not captured. Someone asked me to use global exception capture, why cannot it be captured? We can only tell you that this exception is not caused by our own code. Here, I can only share why my project cannot catch this exception. For other cases, you can contact us for analysis. My project uses the so Library (C, C ++ compilation and packaging are provided for Android to call in native mode). One method in this library does not capture exception information, the Java layer does not capture exceptions when calling this method (even if caught, the program does not crash at most, but the exception information is not displayed). Therefore, the android program ends abnormally but no exception is displayed.

I hope to help my friends in the same situation. If you encounter other exceptions that cannot be captured, you can view the specific projects. I will not analyze them more here.


Simply put, if the so database is divided by 0, an error is reported, and the upper layer cannot receive the error.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.