Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid ICS : Failed to handle callback; interface not implemented, callback:android.view.View$PerformClick@40d80cc8
    primarykey
    data
    text
    <p>I am experiencing very weird behavior on ICS devices. I have a button in layout and click Listener as bellow . </p> <pre><code> @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button b = (Button) findViewById(R.id.button1); b.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // To just demonstrate weird behavior, i am throwing run-time exception throw new RuntimeException("testing weird behavior on ICS"); //String s = null; s.length(); You can try this , application does not crash. } }); } </code></pre> <p>In normal conditions, this should crash application but surprisingly, i can see a crash in logcat as bellow but application does not crash. Rather i see </p> <pre><code>Failed to handle callback; interface not implemented, callback:android.view.View$PerformClick@40d80cc8 java.lang.RuntimeException: testing weird behaviour at com.example.sampleproject.MainActivity$1.onClick(MainActivity.java:21) at android.view.View.performClick(View.java:3538) at android.view.View$PerformClick.run(View.java:14330) at android.os.Handler.handleCallback(Handler.java:608) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:4977) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>Any idea why I am experiencing this weird behavior, any help is appreciated. </p> <p>As per @Jen suggestion , I tried b.performClick(); , and application shows normal behavior but still same behavior in onClickListener .</p> <p>I filed bug here is link <a href="http://code.google.com/p/android/issues/detail?id=35517&amp;colspec=ID%20Type%20Status%20Owner%20Summary%20Stars" rel="nofollow">http://code.google.com/p/android/issues/detail?id=35517&amp;colspec=ID%20Type%20Status%20Owner%20Summary%20Stars</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload