Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1279

Android: Battery event listener causes a crash after open and close multiple windows

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Cannot Reproduce
    • Affects Version/s: Alloy 1.6.0
    • Fix Version/s: Release 5.1.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      SDK 4.0.0 and 3.5.1

    • Sprint:
      2015 Sprint 20 Tooling

      Description

      Reproduce Steps:

      Simply run the following alloy project(attached views, styles and controllers folder)

      Expect Result:

      Should display a screen with battery and network info.

      Actual Result:

      Return a error, like following:

      [ERROR] TiApplication: (main) [8069,13162] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 4.0.0,2015/05/18 15:42,9239ff9 
      [ERROR] TiApplication: java.lang.NullPointerException 
      [ERROR] TiApplication: at ti.modules.titanium.platform.PlatformModule.registerBatteryReceiver(PlatformModule.java:292) 
      [ERROR] TiApplication: at ti.modules.titanium.platform.PlatformModule.registerBatteryStateReceiver(PlatformModule.java:231) 
      [ERROR] TiApplication: at ti.modules.titanium.platform.PlatformModule.eventListenerAdded(PlatformModule.java:244) 
      [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1096) 
      [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) 
      [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:136) 
      [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5050) 
      [ERROR] TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) 
      [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:515) 
      [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780) 
      [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596) 
      [ERROR] TiApplication: at dalvik.system.NativeStart.main(Native Method) 
      

      Note:

      If reduce the number of dummyWindow to 2, it works well,
      And I can only reproduce it on Samsung Galaxy on Android 4.2.2,
      it works as expected on Motorola on Android 4.4.2

        Attachments

        1. dummyWindow.js
          0.7 kB
        2. dummyWindow.tss
          0.2 kB
        3. dummyWindow.xml
          0.1 kB
        4. index.js
          0.1 kB
        5. index.tss
          0.5 kB
        6. index.xml
          0.5 kB
        7. infoWindow.js
          3 kB
        8. infoWindow.tss
          0.5 kB
        9. infoWindow.xml
          0.5 kB

          Issue Links

            Activity

              People

              • Assignee:
                fmiao Feon Sua Xin Miao
                Reporter:
                sliang Shuo Liang
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration