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

iOS: Ti.App._restart() crashes application

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: Release 8.0.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      SDK: 8.0.0.v20190108054341
      iOS 12.1 simulator
      iOS 12.1 device

    • Story Points:
      2
    • Sprint:
      2019 Sprint 1

      Description

      Description

      Calling the hidden Ti.App._restart(); method on iOS crashes with the below, this is bad as it's used in liveview to restart the app.

      [ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
      [ERROR] Reason:
      [ERROR] -[TiRootViewController shutdownUi:]: unrecognized selector sent to instance 0x7fbee0023400
      [ERROR] Stack trace:
      [ERROR] 0   CoreFoundation                      0x00000001160651bb __exceptionPreprocess + 331
      [ERROR] 1   libobjc.A.dylib                     0x0000000114e6f735 objc_exception_throw + 48
      [ERROR] 2   CoreFoundation                      0x0000000116083f44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
      [ERROR] 3   UIKitCore                           0x0000000121f66b4a -[UIResponder doesNotRecognizeSelector:] + 287
      [ERROR] 4   CoreFoundation                      0x0000000116069ed6 ___forwarding___ + 1446
      [ERROR] 5   CoreFoundation                      0x000000011606bda8 _CF_forwarding_prep_0 + 120
      [ERROR] 6   ticreateapp                         0x000000010f8804ae __22-[AppModule _restart:]_block_invoke + 94
      [ERROR] 7   libdispatch.dylib                   0x000000011847c4e1 _dispatch_call_block_and_release + 12
      [ERROR] 8   libdispatch.dylib                   0x000000011847d54b _dispatch_client_callout + 8
      [ERROR] 9   libdispatch.dylib                   0x0000000118489380 _dispatch_main_queue_callback_4CF + 1290
      [ERROR] 10  CoreFoundation                      0x0000000115fca3e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
      [ERROR] 11  CoreFoundation                      0x0000000115fc4a76 __CFRunLoopRun + 2342
      [ERROR] 12  CoreFoundation                      0x0000000115fc3e11 CFRunLoopRunSpecific + 625
      [ERROR] 13  GraphicsServices                    0x000000011a5f31dd GSEventRunModal + 62
      [ERROR] 14  UIKitCore                           0x0000000121f3881d UIApplicationMain + 140
      [ERROR] 15  ticreateapp                         0x000000010f78d156 main + 950
      [ERROR] 16  libdyld.dylib                       0x00000001184ed575 start + 1
      

      Steps to reproduce

      1. Add the code below to and app.js

      var win = Ti.UI.createWindow();
      win.addEventListener('click', function () {
          Ti.App._restart();
      });
      win.open()
      

      2. Click the window

      Actual

      Above crash

      Expected

      App should restart back to the clean state

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                eharris Ewan Harris
                Tester:
                Keerthi Mahalingam
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code