Project: titanium
Issue TIMOB-18877: Geocoder sample from Studio dashboard fails with uncaught NSException on 7.1 simulators
h5. Description: I was able to import the geocoder sample, then build for simulator. The console reports the following and the app did not run: {code} -- 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 {code} h5. 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 h5. Result: Error as shown above h5. Expected Result: No uncaught exception
Story points: 3