java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference

Appcelerator JIRA | john adamis | 7 months ago
  1. 0

    We get the following crash frequently: java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3821) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3839) at android.app.ActivityThread.access$1400(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5431) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1477) at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:29) at android.app.Activity.performDestroy(Activity.java:6235) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1141) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3808) ... 10 more It is happening when android os terminates app to save memory at onDestroy method. (This happens quite a lot since our users usually keep app open for long periods) This is not happening at 4.0 sdk (we got those after upgrading from 4.0 to 5.2.2) After searching changes history this change seems to have caused this behavior : https://github.com/appcelerator/titanium_mobile/commit/2b12ad61775920f8045e168ae678ce123dfa14b4 seems to have caused the issue

    Appcelerator JIRA | 7 months ago | john adamis
    java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference
  2. 0

    We get the following crash frequently: java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3821) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3839) at android.app.ActivityThread.access$1400(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5431) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1477) at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:29) at android.app.Activity.performDestroy(Activity.java:6235) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1141) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3808) ... 10 more It is happening when android os terminates app to save memory at onDestroy method. (This happens quite a lot since our users usually keep app open for long periods) This is not happening at 4.0 sdk (we got those after upgrading from 4.0 to 5.2.2) After searching changes history this change seems to have caused this behavior : https://github.com/appcelerator/titanium_mobile/commit/2b12ad61775920f8045e168ae678ce123dfa14b4 seems to have caused the issue

    Appcelerator JIRA | 7 months ago | john adamis
    java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference
  3. 0

    We get the following crash frequently: java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3821) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3839) at android.app.ActivityThread.access$1400(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5431) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1477) at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:29) at android.app.Activity.performDestroy(Activity.java:6235) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1141) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3808) ... 10 more It is happening when android os terminates app to save memory at onDestroy method. (This happens quite a lot since our users usually keep app open for long periods) This is not happening at 4.0 sdk (we got those after upgrading from 4.0 to 5.2.2) After searching changes history this change seems to have caused this behavior : https://github.com/appcelerator/titanium_mobile/commit/2b12ad61775920f8045e168ae678ce123dfa14b4 seems to have caused the issue

    Appcelerator JIRA | 7 months ago | john adamis
    java.lang.RuntimeException: Unable to destroy activity {com.myapp/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.NullPointerException

    GitHub | 1 month ago | banobi
    java.lang.RuntimeException: Unable to destroy activity {pt.org.adventistas.infoUPASD/org.appcelerator.titanium.TiTranslucentActivity}: java.lang.NullPointerException
  6. 0

    While creating an app logcat shows "include Java exception stack in crash report" & "Fatal signal 6 (SIGABRT)"

    Stack Overflow | 1 year ago | Md Wasi
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ShareActionProvider.setShareIntent(android.content.Intent)' on a null object reference

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference

      at org.appcelerator.titanium.TiBaseActivity.onDestroy()
    2. org.appcelerator.titanium
      TiActivity.onDestroy
      1. org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1477)
      2. org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:29)
      2 frames
    3. Android Platform
      ActivityThread.main
      1. android.app.Activity.performDestroy(Activity.java:6235)
      2. android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1141)
      3. android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3808)
      4. android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3839)
      5. android.app.ActivityThread.access$1400(ActivityThread.java:162)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:135)
      9. android.app.ActivityThread.main(ActivityThread.java:5431)
      9 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)
      2 frames