Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24952] Null Pointer Exceptions caused on Samsung Galaxy devices

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-05-17T20:41:36.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
Componentsn/a
Labelsandroid, core, regression
ReporterLuke Taylor
AssigneeUnknown
Created2017-07-05T08:37:07.000+0000
Updated2019-05-17T20:41:36.000+0000

Description

I have attached a screenshot of the crash report log we are seeing from Google. Currently receiving thousands of crashes, pretty much entirely isolated to various Samsung Galaxy devices running Android 7.x This is currently out in production and we are starting to see a trend as more customers are adopting Android N. Is this issue known? Would upgrading the SDK solve this potentially (i.e. fixes for this problem)? Is it a case of bumping the Android build tools?

Attachments

FileDateSize
Screen Shot 2017-07-05 at 09.30.26.png2017-07-05T08:30:52.000+0000124730

Comments

  1. Peter Lancaster 2017-07-05

    As part of looking at fixes to this issue - we are also encountering this issue: AC-5071 - it would be much appreciated if you could review and respond to these issues as soon as possible.
  2. Peter Lancaster 2017-07-05

    As an additional note - we're seeing notes that indicate this could be related to backgrounding and resuming the app over extended periods of time - are there any bugs / issues in this area that you're aware of, that could be causing this?
  3. Peter Lancaster 2017-07-05

    We have been able to track down the method of reproduction for this, and can confirm it is related to backgrounding the app, and resuming it at a later point (after other, more power hungry apps have been opened up). The (modified) error log we see shows this:
       07-05 12:30:30.123 26536-26536/? E/AndroidRuntime: FATAL EXCEPTION: main
          Process: com.app.domain, PID: 26536
          java.lang.RuntimeException: Unable to destroy activity {com.app.domain/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:4595)
              at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4618)
              at android.app.ActivityThread.-wrap7(ActivityThread.java)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:154)
              at android.app.ActivityThread.main(ActivityThread.java:6692)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
           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:7165)
              at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1161)
              at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4582)
              at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4618) 
              at android.app.ActivityThread.-wrap7(ActivityThread.java) 
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) 
              at android.os.Handler.dispatchMessage(Handler.java:102) 
              at android.os.Looper.loop(Looper.java:154) 
              at android.app.ActivityThread.main(ActivityThread.java:6692) 
              at java.lang.reflect.Method.invoke(Native Method) 
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) 
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) 
       
  4. Sharif AbuDarda 2017-07-10

    Hello, Can you send a sample code or app that reproduce the issue? we will test for Android N. Also provide details steps for successful regeneration on the issue.
  5. Peter Lancaster 2017-07-10

    A sample app shouldn't be needed for this, as long as you have code that: - opens up the app, - displays an image and; - sets an event listener ...this should be easily reproducible on a Samsung Android 7 device, running SDK 5.2.0 with the above Android SDK tools. Open the app up - minimise it, then open up and interact with (roughly) 6-8 different high-processing power apps (e.g. 6-8 different 3D games that will consume device memory and processing threads). After this - return to the Ti App by tapping on the launcher icon - *not* by navigating back to it from the open app stack. The app should crash almost immediately, and then reboot.
  6. Eric Merriman 2017-07-13

    [~plancaster] We don't need a sample app. We are looking at this now.
  7. Alan Hutton 2019-05-17

    Closing per developer comments.

JSON Source