Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
314 views
in Technique[技术] by (71.8m points)

android - Could not read input channel file descriptors from parcel crash report

I receiving constant this crash report from my android app.I didn't understand what is this error ? What can be cause this ?

java.lang.RuntimeException: Could not read input channel file descriptors from parcel.
at android.view.InputChannel.nativeReadFromParcel(Native Method)
at android.view.InputChannel.readFromParcel(InputChannel.java:148)
at android.view.InputChannel$1.createFromParcel(InputChannel.java:39)
at android.view.InputChannel$1.createFromParcel(InputChannel.java:36)
at com.android.internal.view.InputBindResult.<init>(InputBindResult.java:62)
at com.android.internal.view.InputBindResult$1.createFromParcel(InputBindResult.java:102)
at com.android.internal.view.InputBindResult$1.createFromParcel(InputBindResult.java:99)
at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java:709)
at android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:1296)
at android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.java:1418)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3648)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had same error. It absolutely disappeared after I cleaned all the memory leaks. Also disappeared java.lang.IllegalStateException: eglMakeCurrent failed EGL_BAD_ALLOC. Memory leak in Java means that Garbage Colector can't clean objects - there are some cross references. And there are some often reasons that I know:

  1. Some uncleared object of class with complex structure (like trees with cross references on parent and its child). So after using that you should call close, destroy or some another method.

  2. Unstatic inner (anonymous) classes in your Activity class - as I understand, inner class always contains reference to its parent, so after finishing activity reference from inner class still exists and GC can't clean them. If you need it in Activity, always create static class (when you want to use refence to YourActivity object, use WeakReference <YourActivty> - it doesn't make a sence for GC and memory leaks doesn't appears, but you should always check for weakReference.get() != null).

  3. References to inner View in your Activity class field. It's better not to use them and always get a reference from findViewByID, but you can just set all this fields to null in onDestroy() method.

For searching some leaks I used Memory Analysis perspective in Eclipse.

P.S. Sorry for my english.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...