Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11709

Android: String.formatTime causes app crash when date is string.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: Release 2.1.3
    • Fix Version/s: Release 3.0.2, Release 7.0.0
    • Component/s: Android
    • Labels:
    • Environment:

      Android 2.3.3, Android 4.1.2, Ti SDK 2.1.3

    • Sprint:
      2017 Sprint 14 SDK, 2017 Sprint 23 SDK

      Description

      When the date is a random string rather than a function(Date()) then String.formatTime causes app crash. It just gives a null output on iOS and does not crash.

      Steps to reproduce:

      1. Load the below app.js
      2. Test it on both iOS and Android.

      Expected Result: On Android, the output should be null or should throw an exception.

      Actual Result: The App crashes on Android.

      var win = Ti.UI.createWindow({
         backgroundColor:'white'
         });
      win.addEventListener('click', function() {
        
      var date = "GIBBERISH";
      //var date = new Date();
      alert( String.formatTime(date) );
       
      	
      });
       
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              mchen Maggie Chen
              Reporter:
              aakkinepally Amuktha Akkinepally
              Reviewer:
              Joshua Quick
              Tester:
              Lokesh Choudhary
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-14904
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code