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

iOS: When an application error is thrown no reason is given

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 3.5.0
    • Fix Version/s: Release 3.5.0, Release 4.0.0
    • Component/s: iOS
    • Environment:

      Mac OSX 10.10.1
      Appcelerator Studio, build: 3.4.1.201410281743
      Titanium SDK build: 3.5.0.v20141203132514
      Titanium CLI, build: 3.4.1
      Alloy: 1.5.1
      Xcode 6.1.1
      iPhone 6 Plus (8.1.1), iPhone 6 Simulator (8.1)

      Description

      Description

      When an error is thrown using the 3.5.0 SDK the following is printed out in the console

      [ERROR] :  Script Error {
      [ERROR] :      column = 11;
      [ERROR] :      line = 8;
      [ERROR] :      sourceURL = "file:///private/var/mobile/Containers/Bundle/Application/8E9433FD-3F80-4060-8BBB-2C1C249744CB/TIMOB-10501.app/app.js";
      [ERROR] :      stack = "global code@file:///private/var/mobile/Containers/Bundle/Application/8E9433FD-3F80-4060-8BBB-2C1C249744CB/TIMOB-10501.app/app.js:8:11";
      [ERROR] :  }
      

      In the error logs in the console there should be a message telling the user where the error is as shown when using 3.4.1.GA SDK

      [ERROR] :  Script Error {
      [ERROR] :      backtrace = "#0 () at :0";
      [ERROR] :      line = 8;
      [ERROR] :      message = "'undefined' is not a function (evaluating 'win.foobar()')";
      [ERROR] :      name = TypeError;
      [ERROR] :      sourceId = 48024064;
      [ERROR] :      sourceURL = "file:///private/var/mobile/Containers/Bundle/Application/E979FC89-452D-43B9-85F5-32FE7920445B/TIMOB-10501.app/app.js";
      [ERROR] :  }
      

      This is a regression as context is given in 3.4.1.GA
      On the device there are also differences, see the attached images for examples of these.

      Steps To Reproduce

      1. Add the code below to an exisiting project and run the project on a device or sim

      Titanium.UI.setBackgroundColor('#000');
        
      var win = Titanium.UI.createWindow({ 
          title: 'test'
      });
        
      var obj = require('module')();
      win.foobar();
       
       
      win.open();
      

      Actual Result

      The app will crash and will only show a reference to the line numbers rather than providing context

      Expected Result

      The app will crash and should provide context, e.g. it should say "message = "'undefined' is not a function (evaluating 'e.foobar()')";"

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Jon Alter
              Tester:
              Ewan Harris
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration