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

Regression: Programmatically hiding a PopOver showing a ListView with a SearchBar that has focus results in crash

    Details

    • Story Points:
      1
    • Sprint:
      2015 Sprint 01 SDK

      Description

      This ticket is related to TIMOB-17923 and TIMOB-18260. Though TIMOB-18260 fixes the situation where the popover hides because the user taps outside the popover, this ticket is for the situation where the popover is closed programmatically via hide().

      Steps

      1. Build the code to iPad Simulator
      2. Click the green button
      3. Click the searchbar to focus on the field
      4. Click the red button to programmatically hide the popover
      5. See it crash

      Code

      var w = Ti.UI.createWindow({
        backgroundColor: 'white'
      });
       
      var b = Ti.UI.createButton({
        title: 'Click Me',
        backgroundColor: 'green'
      });
       
      b.addEventListener('click', function() {
       
        var cw = Ti.UI.createWindow({
          width: 300
        });
       
        var lv = Ti.UI.createListView({
          searchView: Ti.UI.createSearchBar(),
        });
       
        var bt = Ti.UI.createButton({
          title: 'Focus search then click me',
          backgroundColor: 'red'
        });
       
        bt.addEventListener('click', function() {
          p.hide();
        });
       
        cw.add(lv);
        cw.add(bt);
       
        var p = Ti.UI.iPad.createPopover({
          contentView: cw
        });
       
        p.show({
          view: b
        });
       
      });
       
      w.add(b);
      w.open();
      

      Crash log

      [DEBUG] 2015-01-14 14:31:55.492 Timewax[52232:3411517] -[TiUILabelProxy addSubview:]: unrecognized selector sent to instance 0x7bafc200
      [ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
      [ERROR] Reason:
      [ERROR] -[TiUILabelProxy addSubview:]: unrecognized selector sent to instance 0x7bafc200
      [ERROR] Stack trace:
      [ERROR]
      [ERROR] 0   CoreFoundation                      0x05abe92a __exceptionPreprocess + 154
      [ERROR] 1   libobjc.A.dylib                     0x05690a97 objc_exception_throw + 44
      [ERROR] 2   CoreFoundation                      0x05ac65c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
      [ERROR] 3   CoreFoundation                      0x05a0f3e7 ___forwarding___ + 1047
      [ERROR] 4   CoreFoundation                      0x05a0efae _CF_forwarding_prep_0 + 14
      [ERROR] 5   UIKit                               0x02a49899 -[UISearchDisplayController _hoistSearchBar] + 375
      [ERROR] 6   UIKit                               0x02a4a82e -[UISearchDisplayController showHideAnimationDidFinish] + 108
      [ERROR] 7   UIKit                               0x02650f72 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 206
      [ERROR] 8   UIKit                               0x026512e2 -[UIViewAnimationState animationDidStop:finished:] + 80
      [ERROR] 9   UIKit                               0x14ffb50b -[UIViewAnimationStateAccessibility animationDidStop:finished:] + 66
      [ERROR] 10  QuartzCore                          0x017eb9d9 _ZN2CA5Layer23run_animation_callbacksEPv + 307
      [ERROR] 11  libdispatch.dylib                   0x0639b03f _dispatch_client_callout + 14
      [ERROR] 12  libdispatch.dylib                   0x06384764 _dispatch_main_queue_callback_4CF + 470
      [ERROR] 13  CoreFoundation                      0x05a1895e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
      [ERROR] 14  CoreFoundation                      0x059d7760 __CFRunLoopRun + 2256
      [ERROR] 15  CoreFoundation                      0x059d6bcb CFRunLoopRunSpecific + 443
      [ERROR] 16  CoreFoundation                      0x059d69fb CFRunLoopRunInMode + 123
      [ERROR] 17  GraphicsServices                    0x06b0324f GSEventRunModal + 192
      [ERROR] 18  GraphicsServices                    0x06b0308c GSEventRun + 104
      [ERROR] 19  UIKit                               0x025e98b6 UIApplicationMain + 1526
      [ERROR] 20  Timewax                             0x0006b468 main + 456
      [ERROR] 21  libdyld.dylib                       0x063c1ac9 start + 1
      [ERROR]
      [ERROR] 2015-01-14 14:31:55.505 Timewax[52232:3411517] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TiUILabelProxy addSubview:]: unrecognized selector sent to instance 0x7bafc200'
      [ERROR] *** First throw call stack:
      [ERROR] (
      [ERROR]         0   CoreFoundation                      0x05abe946 __exceptionPreprocess + 182
      [ERROR]         1   libobjc.A.dylib                     0x05690a97 objc_exception_throw + 44
      [ERROR]         2   CoreFoundation                      0x05ac65c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
      [ERROR]         3   CoreFoundation                      0x05a0f3e7 ___forwarding___ + 1047
      [ERROR]         4   CoreFoundation                      0x05a0efae _CF_forwarding_prep_0 + 14
      [ERROR]         5   UIKit                               0x02a49899 -[UISearchDisplayController _hoistSearchBar] + 375
      [ERROR]         6   UIKit                               0x02a4a82e -[UISearchDisplayController showHideAnimationDidFinish] + 108
      [ERROR]         7   UIKit                               0x02650f72 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 206
      [ERROR]         8   UIKit                               0x026512e2 -[UIViewAnimationState animationDidStop:finished:] + 80
      [ERROR]         9   UIKit                               0x14ffb50b -[UIViewAnimationStateAccessibility animationDidStop:finished:] + 66
      [ERROR]         10  QuartzCore                          0x017eb9d9 _ZN2CA5Layer23run_animation_callbacksEPv + 307
      [ERROR]         11  libdispatch.dylib                   0x0639b03f _dispatch_client_callout + 14
      [ERROR]         12  libdispatch.dylib                   0x06384764 _dispatch_main_queue_callback_4CF + 470
      [ERROR]         13  CoreFoundation                      0x05a1895e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
      [ERROR]         14  CoreFoundation                      0x059d7760 __CFRunLoopRun + 2256
      [ERROR]         15  CoreFoundation                      0x059d6bcb CFRunLoopRunSpecific + 443
      [ERROR]         16  CoreFoundation                      0x059d69fb CFRunLoopRunInMode + 123
      [ERROR]         17  GraphicsServices                    0x06b0324f GSEventRunModal + 192
      [ERROR]         18  GraphicsServices                    0x06b0308c GSEventRun + 104
      [ERROR]         19  UIKit                               0x025e98b6 UIApplicationMain + 1526
      [ERROR]         20  Timewax                             0x0006b468 main + 456
      [ERROR]         21  libdyld.dylib                       0x063c1ac9 start + 1
      [ERROR] )
      [ERROR] libc++abi.dylib: terminating with uncaught exception of type NSException
      

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Jon Alter
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code