Why am I getting an error? The channel is irreparably broken and will be disposed of! "

When I try to start my AndEngine activity , I get this error:

ERROR/InputDispatcher(21374): channel '4122e148 my.package.AcGame (server)' ~ Channel is unrecoverably broken and will be disposed! 

The application does not crash, but there is a black screen, and the device does not respond to pressing the back or home buttons.

Does anyone know what the problem is?

+75
android andengine
Sep 17 '12 at 12:59
source share
15 answers

One of the most common reasons I see this error is when I try to display a warning dialog or a progress dialog in action that is not in the foreground. For example, when a background thread displaying a dialog box is running in paused activity.

+32
Dec 18
source share

I think you have a memory leak somewhere. You can find tips to avoid memory leaks here . You can also find out about tracking tools here .

+12
Mar 06 '14 at 11:18
source share

Did you use a different user interface thread? You should not use more than 1 UI thread and make it look like a sandwich. This will result in a memory leak.

I solved a similar problem 2 days ago ...

In short: the main thread can have many UI threads to do several work, but if there is one subflow inside it containing the UI thread, the UI thread may not have completed its work before its parent thread has already completed its work. work, it causes memory leaks.

For example ... for a Fragment & UI application ... this will lead to memory leaks.

 getActivity().runOnUiThread(new Runnable(){ public void run() {//No.1 ShowDataScreen(); getActivity().runOnUiThread(new Runnable(){ public void run() {//No.2 Toast.makeText(getActivity(), "This is error way",Toast.LENGTH_SHORT).show(); }});// end of No.2 UI new thread }});// end of No.1 UI new thread 

My solution is rearranging as shown below:

 getActivity().runOnUiThread(new Runnable(){ public void run() {//No.1 ShowDataScreen(); }});// end of No.1 UI new thread getActivity().runOnUiThread(new Runnable(){ public void run() {//No.2 Toast.makeText(getActivity(), "This is correct way",Toast.LENGTH_SHORT).show(); }});// end of No.2 UI new thread 

for reference.

I am Taiwanese, I am happy to answer here again.

+6
Nov 14 '14 at 4:38
source share

You can view the source code for this output here :

 void InputDispatcher::onDispatchCycleBrokenLocked( nsecs_t currentTime, const sp<Connection>& connection) { ALOGE("channel '%s' ~ Channel is unrecoverably broken and will be disposed!", connection->getInputChannelName()); CommandEntry* commandEntry = postCommandLocked( & InputDispatcher::doNotifyInputChannelBrokenLockedInterruptible); commandEntry->connection = connection; } 

This forces you to lock the loop ...

+6
Mar 13 '15 at 7:43
source share

I got a similar error (my application crashes) after I renamed something to the strings.xml file and forgot to change other files (xml preferences resource file and java code).

IDE (android studio) did not find any errors. But after I repaired my xml files and java code, the application works fine. So, maybe there are small errors in your xml files or constants.

+4
Oct 31 '13 at 2:34
source share

I had the same problem, but I was having an Android database memory leak. I missed the cursor. Therefore, the device crashes to fix a memory leak. If you are working with an Android database, check if you missed the cursor when retrieving from the database

+1
Aug 27 '13 at 11:53 on
source share

I also had a problem. In my case, this was caused when I tried to play a video with poor coding (it took too much memory). This helped me catch a bug and request a different version of the same video. / questions / 76556 / android-media-player-error-1000/510571 # 510571

+1
Feb 19 '14 at 15:53
source share

This happened to me during the game using the and-engine. It was fixed after I added the code below to my manifest.xml. This code should be added to your core business.

 android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|mcc|mnc" 
+1
Oct. 15 '14 at 20:17
source share

I had the same problem. The mine was connected with the third bank, but the logarithm did not notice an exception, I decided to update the third bank, I hope this helps.

+1
Oct 22 '15 at 9:14
source share

In my case, these two problems arise in some cases, for example, when I try to display a dialogue of progress in action that is not in the foreground. So, I reject the dialogue of progress in the onPause of the activity life cycle. And the problem is solved.

Unable to run this animator on a separate screen! reveal the effect of bug

ANSWER: It is impossible to start this animator in a separate window! reveal effect

Why am I getting an error? The channel is irreparably broken and will be disposed of!

ANSWER: Why am I getting an error? The channel is irreparably broken and will be disposed of!

 @Override protected void onPause() { super.onPause(); dismissProgressDialog(); } private void dismissProgressDialog() { if(progressDialog != null && progressDialog.isShowing()) progressDialog.dismiss(); } 
+1
Jan 30 '18 at 1:32
source share

I had the same problem. To resolve this error: Close it on the emulator and then run it using Android Studio.

An error occurred while trying to restart the application when the application is already running on the emulator.

Basically the error says: “I no longer have an existing channel and utilities have an established connection”, as you launched the application again from Android Studio.

0
May 3 '16 at 4:26
source share

After reading all the contributions, it seems that many different sources show the same problems.

In my case, for example, I got this problem as soon as I added

 android:progressBackgroundTintMode="src_over" 

to progress bar properties. I think the ADT GUI designer is known for a few bugs. Therefore, I assume that this is one of them. Therefore, if you encounter such problematic symptoms (it just doesn’t make sense) after playing with the GUI setup, just try undoing what you did and undo your last changes in the GUI.

Just press Ctrl + z with the recently modified file on the screen.

Or:

A version control tool can be helpful. Open the version control panel - select the tab "Local Changes" and view the recently changed (possibly XML files).

Right-click on a few of the most suspicious ones and click Show Diff. Then just guess which modified string might be responsible.

Good luck :)

0
Dec 06 '16 at 16:33
source share

I had this problem and the reason was actually a NullPointerException. But he was not introduced to me as one!

My conclusion: the screen stuck for a very long time and ANR

My condition: another layout was included in the layout XML file, but it referred to the included view without specifying an identifier in the attached layout. (I had two more similar implementations of the same child view, so the resource identifier was created with the given name)

Note. It was a custom dialog layout, so checking dialogs first may help

Conclusion: A memory leak occurred while looking up the identifier of the child view.

0
Jul 25 '18 at 9:14
source share

One of the reasons I see this error is because my old server packages (node.js) are too old. When I updated all my packages, I solved my problem.

 npm update **or** npm mongoose@latest --save 
0
Dec 25 '18 at 13:41
source share

When I came across this error, somewhere in your code your funcs or libraries that you used are working in different threads, so try to call all the code in one thread, this solved my problem.

If you call methods in a WebView from any thread other than the UI thread of your application, this may lead to unexpected results. For example, if your application uses multiple threads, you can use the runOnUiThread () method to ensure that the code runs on the user interface thread:

Google reference link

0
Feb 04 '19 at 12:17
source share



All Articles