Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18877] Geocoder sample from Studio dashboard fails with uncaught NSException on 7.1 simulators

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-05-12T07:47:47.000+0000
Affected Version/sRelease 4.0.0
Fix Version/sRelease 4.0.0, Release 4.1.0
ComponentsiOS
Labelsios7.1, map, module, qe-4.0.0
ReporterEric Merriman
AssigneeMuhammad Dadu
Created2015-05-01T23:10:11.000+0000
Updated2017-03-16T22:57:33.000+0000

Description

Description:

I was able to import the geocoder sample, then build for simulator. The console reports the following and the app did not run:
-- Start simulator log -------------------------------------------------------
[INFO] :   Application started
[INFO] :   Geocoder/1.0 (4.0.0.9b6eaf9)
[ERROR] :  The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
[ERROR] :  Reason:
[ERROR] :  -[UIButton setPreservesSuperviewLayoutMargins:]: unrecognized selector sent to instance 0x7ef7ef20
[ERROR] :  Stack trace:
[ERROR] :  
[ERROR] :  0   CoreFoundation                      0x0460b1c8 __exceptionPreprocess + 152
[ERROR] :  1   libobjc.A.dylib                     0x042d48e5 objc_exception_throw + 44
[ERROR] :  2   CoreFoundation                      0x046a8243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
[ERROR] :  3   CoreFoundation                      0x045fb50b ___forwarding___ + 1019
[ERROR] :  4   CoreFoundation                      0x045fb0ee _CF_forwarding_prep_0 + 14
[ERROR] :  5   Geocoder                            0x005ddb5e -[TiMapAnnotationProxy makeButton:tag:] + 495
[ERROR] :  6   Geocoder                            0x005de4c9 -[TiMapAnnotationProxy leftViewAccessory] + 223
[ERROR] :  7   Geocoder                            0x005e8f00 -[TiMapView mapView:viewForAnnotation:] + 792
[ERROR] :  8   MapKit                              0x00a13676 -[MKMapView annotationManager:representationForAnnotation:] + 366
[ERROR] :  9   MapKit                              0x00a4afd1 -[MKAnnotationManager _addRepresentationForAnnotation:] + 475
[ERROR] :  10  MapKit                              0x00a49c31 -[MKAnnotationManager showAnnotationsInMapRect:] + 815
[ERROR] :  11  MapKit                              0x00a04a88 -[MKMapView _goToMapRegion:duration:animationType:resetHeading:completionHandler:] + 444
[ERROR] :  12  MapKit                              0x00a048c7 -[MKMapView _goToMapRegion:duration:animationType:resetHeading:] + 74
[ERROR] :  13  MapKit                              0x00a057ba -[MKMapView _setZoomScale:centerMapPoint:duration:animationType:resetHeading:] + 582
[ERROR] :  14  MapKit                              0x00a04877 -[MKMapView _setZoomScale:centerCoordinate:duration:animationType:resetHeading:] + 129
[ERROR] :  15  MapKit                              0x00a0759b -[MKMapView _goToCenterCoordinate:zoomLevel:animationType:cancelDefaultLocationTimer:] + 1536
[ERROR] :  16  MapKit                              0x00a06882 -[MKMapView goToCenterCoordinate:zoomLevel:animationType:] + 81
[ERROR] :  17  MapKit                              0x00a0db46 -[MKMapView goToRegion:animationType:] + 138
[ERROR] :  18  MapKit                              0x00a0d788 -[MKMapView setRegion:animated:] + 359
[ERROR] :  19  Geocoder                            0x005e4151 -[TiMapView render] + 589
[ERROR] :  20  Geocoder                            0x005e46ba -[TiMapView frameSizeChanged:bounds:] + 193
[ERROR] :  21  Geocoder                            0x000aae27 -[TiUIView checkBounds] + 855
[ERROR] :  22  Geocoder                            0x000aaf27 -[TiUIView setBounds:] + 119
[ERROR] :  23  Geocoder                            0x005e45ed -[TiMapView setBounds:] + 192
[ERROR] :  24  Geocoder                            0x00089c4a -[TiViewProxy relayout] + 1642
[ERROR] :  25  Geocoder                            0x0008340c -[TiViewProxy view] + 1852
[ERROR] :  26  Geocoder                            0x0008d2ca -[TiViewProxy layoutChild:optimize:withMeasuredBounds:] + 202
[ERROR] :  27  Geocoder                            0x0007b472 -[TiViewProxy add:] + 1922
[ERROR] :  28  Geocoder                            0x0007b6d3 __19-[TiViewProxy add:]_block_invoke + 51
[ERROR] :  29  Geocoder                            0x0014f80c __TiThreadPerformOnMainThread_block_invoke + 60
[ERROR] :  30  Geocoder                            0x0014fc80 TiThreadProcessPendingMainThreadBlocks + 528
[ERROR] :  31  Geocoder                            0x0014fa59 __TiThreadPerformOnMainThread_block_invoke208 + 57
[ERROR] :  32  libdispatch.dylib                   0x056337b8 _dispatch_call_block_and_release + 15
[ERROR] :  33  libdispatch.dylib                   0x056484d0 _dispatch_client_callout + 14
[ERROR] :  34  libdispatch.dylib                   0x05636726 _dispatch_main_queue_callback_4CF + 340
[ERROR] :  35  CoreFoundation                      0x0467043e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
[ERROR] :  36  CoreFoundation                      0x045b15cb __CFRunLoopRun + 1963
[ERROR] :  37  CoreFoundation                      0x045b09d3 CFRunLoopRunSpecific + 467
[ERROR] :  38  CoreFoundation                      0x045b07eb CFRunLoopRunInMode + 123
[ERROR] :  39  GraphicsServices                    0x054445ee GSEventRunModal + 192
[ERROR] :  40  GraphicsServices                    0x0544442b GSEventRun + 104
[ERROR] :  41  UIKit                               0x0172af9b UIApplicationMain + 1225
[ERROR] :  42  Geocoder                            0x0003cdd8 main + 408
[ERROR] :  43  libdyld.dylib                       0x0587c6d9 start + 1
[ERROR] :  44  ???                                 0x00000001 0x0 + 1
[ERROR] :  
[ERROR] :  2015-05-01 15:51:14.469 Geocoder[99413:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton setPreservesSuperviewLayoutMargins:]: unrecognized selector sent to instance 0x7ef7ef20'
[ERROR] :  *** First throw call stack:
[ERROR] :  (
[ERROR] :  	0   CoreFoundation                      0x0460b1e4 __exceptionPreprocess + 180
[ERROR] :  	1   libobjc.A.dylib                     0x042d48e5 objc_exception_throw + 44
[ERROR] :  	2   CoreFoundation                      0x046a8243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
[ERROR] :  	3   CoreFoundation                      0x045fb50b ___forwarding___ + 1019
[ERROR] :  	4   CoreFoundation                      0x045fb0ee _CF_forwarding_prep_0 + 14
[ERROR] :  	5   Geocoder                            0x005ddb5e -[TiMapAnnotationProxy makeButton:tag:] + 495
[ERROR] :  	6   Geocoder                            0x005de4c9 -[TiMapAnnotationProxy leftViewAccessory] + 223
[ERROR] :  	7   Geocoder                            0x005e8f00 -[TiMapView mapView:viewForAnnotation:] + 792
[ERROR] :  	8   MapKit                              0x00a13676 -[MKMapView annotationManager:representationForAnnotation:] + 366
[ERROR] :  	9   MapKit                              0x00a4afd1 -[MKAnnotationManager _addRepresentationForAnnotation:] + 475
[ERROR] :  	10  MapKit                              0x00a49c31 -[MKAnnotationManager showAnnotationsInMapRect:] + 815
[ERROR] :  	11  MapKit                              0x00a04a88 -[MKMapView _goToMapRegion:duration:animationType:resetHeading:completionHandler:] + 444
[ERROR] :  	12  MapKit                              0x00a048c7 -[MKMapView _goToMapRegion:duration:animationType:resetHeading:] + 74
[ERROR] :  	13  MapKit                              0x00a057ba -[MKMapView _setZoomScale:centerMapPoint:duration:animationType:resetHeading:] + 582
[ERROR] :  	14  MapKit                              0x00a04877 -[MKMapView _setZoomScale:centerCoordinate:duration:animationType:resetHeading:] + 129
[ERROR] :  	15  MapKit                              0x00a0759b -[MKMapView _goToCenterCoordinate:zoomLevel:animationType:cancelDefaultLocationTimer:] + 1536
[ERROR] :  	16  MapKit                              0x00a06882 -[MKMapView goToCenterCoordinate:zoomLevel:animationType:] + 81
[ERROR] :  	17  MapKit                              0x00a0db46 -[MKMapView goToRegion:animationType:] + 138
[ERROR] :  	18  MapKit                              0x00a0d788 -[MKMapView setRegion:animated:] + 359
[ERROR] :  	19  Geocoder                            0x005e4151 -[TiMapView render] + 589
[ERROR] :  	20  Geocoder                            0x005e46ba -[TiMapView frameSizeChanged:bounds:] + 193
[ERROR] :  	21  Geocoder                            0x000aae27 -[TiUIView checkBounds] + 855
[ERROR] :  	22  Geocoder                            0x000aaf27 -[TiUIView setBounds:] + 119
[ERROR] :  	23  Geocoder                            0x005e45ed -[TiMapView setBounds:] + 192
[ERROR] :  	24  Geocoder                            0x00089c4a -[TiViewProxy relayout] + 1642
[ERROR] :  	25  Geocoder                            0x0008340c -[TiViewProxy view] + 1852
[ERROR] :  	26  Geocoder                            0x0008d2ca -[TiViewProxy layoutChild:optimize:withMeasuredBounds:] + 202
[ERROR] :  	27  Geocoder                            0x0007b472 -[TiViewProxy add:] + 1922
[ERROR] :  	28  Geocoder                            0x0007b6d3 __19-[TiViewProxy add:]_block_invoke + 51
[ERROR] :  	29  Geocoder                            0x0014f80c __TiThreadPerformOnMainThread_block_invoke + 60
[ERROR] :  	30  Geocoder                            0x0014fc80 TiThreadProcessPendingMainThreadBlocks + 528
[ERROR] :  	31  Geocoder                            0x0014fa59 __TiThreadPerformOnMainThread_block_invoke208 + 57
[ERROR] :  	32  libdispatch.dylib                   0x056337b8 _dispatch_call_block_and_release + 15
[ERROR] :  	33  libdispatch.dylib                   0x056484d0 _dispatch_client_callout + 14
[ERROR] :  	34  libdispatch.dylib                   0x05636726 _dispatch_main_queue_callback_4CF + 340
[ERROR] :  	35  CoreFoundation                      0x0467043e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
[ERROR] :  	36  CoreFoundation                      0x045b15cb __CFRunLoopRun + 1963
[ERROR] :  	37  CoreFoundation                      0x045b09d3 CFRunLoopRunSpecific + 467
[ERROR] :  	38  CoreFoundation                      0x045b07eb CFRunLoopRunInMode + 123
[ERROR] :  	39  GraphicsServices                    0x054445ee GSEventRunModal + 192
[ERROR] :  	40  GraphicsServices                    0x0544442b GSEventRun + 104
[ERROR] :  	41  UIKit                               0x0172af9b UIApplicationMain + 1225
[ERROR] :  	42  Geocoder                            0x0003cdd8 main + 408
[ERROR] :  	43  libdyld.dylib                       0x0587c6d9 start + 1
[ERROR] :  	44  ???                                 0x00000001 0x0 + 1
[ERROR] :  )
[ERROR] :  libc++abi.dylib: terminating with uncaught exception of type NSException

Steps to reproduce:

1) Launch Studio, check dashboard, import geocoder sample 2) Set to 4.0.0.RC2 SDK and save 3) Run for iOS 7.1 iPad 2 simulator 4) Observe console

Result:

Error as shown above

Expected Result:

No uncaught exception

Attachments

FileDateSize
ti.map-iphone-2.2.3.zip2015-05-09T00:04:22.000+00001443029

Comments

  1. Eric Merriman 2015-05-01

    Eric W did not encounter this problem. We will try to isolate the differences.
  2. Ingo Muschenetz 2015-05-01

    Could you please investigate?
  3. Ingo Muschenetz 2015-05-04

    [~mdadu], can you assist?
  4. Eric Wieber 2015-05-08

    Encountered this today, using: Studio 4.0.0.201505070727 SDK 4.0.0.v20150507131012 Appc NPM 0.3.55 Appc CLI 0.2.282 On any iOS 7.1 simulator.
  5. Muhammad Dadu 2015-05-09

    It looks like a bad module build. I have rebuilt the module using 3.4.0.GA and it seems to work as expected on my machine. I will test the new build on another machine and then make a PR & a release.
  6. Muhammad Dadu 2015-05-11

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/6835 4_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/6836
  7. Chee Kiat Ng 2015-05-12

    PRs tested and merged.
  8. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source