{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/react-native-maps/issues/1089","repository_url":"https://api.github.com/repos/airbnb/react-native-maps","labels_url":"https://api.github.com/repos/airbnb/react-native-maps/issues/1089/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/react-native-maps/issues/1089/comments","events_url":"https://api.github.com/repos/airbnb/react-native-maps/issues/1089/events","html_url":"https://github.com/airbnb/react-native-maps/issues/1089","id":212130522,"number":1089,"title":"App crashes after MapView.Marker dragged","user":{"login":"JozefCipa","id":11503453,"avatar_url":"https://avatars0.githubusercontent.com/u/11503453?v=4","gravatar_id":"","url":"https://api.github.com/users/JozefCipa","html_url":"https://github.com/JozefCipa","followers_url":"https://api.github.com/users/JozefCipa/followers","following_url":"https://api.github.com/users/JozefCipa/following{/other_user}","gists_url":"https://api.github.com/users/JozefCipa/gists{/gist_id}","starred_url":"https://api.github.com/users/JozefCipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JozefCipa/subscriptions","organizations_url":"https://api.github.com/users/JozefCipa/orgs","repos_url":"https://api.github.com/users/JozefCipa/repos","events_url":"https://api.github.com/users/JozefCipa/events{/privacy}","received_events_url":"https://api.github.com/users/JozefCipa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-06T14:01:21Z","updated_at":"2017-09-14T18:30:35Z","closed_at":"2017-03-07T15:56:35Z","author_association":"NONE","body":"I use `react-native-maps@0.12.2`.\r\nIn MapView I have one `MapView.Marke`r that is draggable. Sometimes when i drag this marker app suddenly crashes with exception\r\n```\r\nTerminating app due to uncaught exception 'NSRangeException', reason:'Cannot remove an observer <AIRMapManager 0x6080000096b0> for the key path \"center\" from <AIRMapMarker 0x7fdb4a68f4f0> because it is not registered as an observer.'\r\n*** First throw call stack:\r\n(\r\n    0   CoreFoundation                      0x000000010c9e0b2b __exceptionPreprocess + 171\r\n    1   libobjc.A.dylib                     0x000000010b89b281 objc_exception_throw + 48\r\n    2   CoreFoundation                      0x000000010ca49685 +[NSException raise:format:] + 197\r\n    3   Foundation                          0x000000010b3b8a38 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 497\r\n    4   Foundation                          0x000000010b3b87ec -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 84\r\n    5   mojazastavka_ios                    0x000000010aed6949 -[AIRMapManager mapView:annotationView:didChangeDragState:fromOldState:] + 1321\r\n    6   MapKit                              0x000000010e66dd9a -[MKMapView _annotationViewDragStateChanged:] + 440\r\n    7   CoreFoundation                      0x000000010c97fc2c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n    8   CoreFoundation                      0x000000010c97fb29 _CFXRegistrationPost + 425\r\n    9   CoreFoundation                      0x000000010c97f892 ___CFXNotificationPost_block_invoke + 50\r\n    10  CoreFoundation                      0x000000010c943132 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826\r\n    11  CoreFoundation                      0x000000010c942291 _CFXNotificationPost + 673\r\n    12  Foundation                          0x000000010b367328 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n    13  MapKit                              0x000000010e73f916 -[MKAnnotationView setDragState:animated:] + 224\r\n    14  MapKit                              0x000000010e7ebb4f -[MKAnnotationContainerView _dropDraggingAnnotationViewAnimated:] + 276\r\n    15  MapKit                              0x000000010e66b928 -[MKMapView _dropDraggingAnnotationView:] + 91\r\n    16  MapKit                              0x000000010e66bbac -[MKMapView handleLongPress:] + 604\r\n    17  UIKit                               0x000000010f553751 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57\r\n    18  UIKit                               0x000000010f55b54f _UIGestureRecognizerSendTargetActions + 109\r\n    19  UIKit                               0x000000010f558f03 _UIGestureRecognizerSendActions + 225\r\n    20  UIKit                               0x000000010f5581c6 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 981\r\n    21  UIKit                               0x000000010f544728 _UIGestureEnvironmentUpdate + 1219\r\n    22  UIKit                               0x000000010f544219 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 484\r\n    23  UIKit                               0x000000010f5433e0 -[UIGestureEnvironment _updateGesturesForEvent:window:] + 274\r\n    24  UIKit                               0x000000010f092baa -[UIWindow sendEvent:] + 4092\r\n    25  UIKit                               0x000000010f03f274 -[UIApplication sendEvent:] + 352\r\n    26  UIKit                               0x000000010f81efa8 __dispatchPreprocessedEventFromEventQueue + 2932\r\n    27  UIKit                               0x000000010f816f74 __handleEventQueue + 1115\r\n    28  CoreFoundation                      0x000000010c986c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n    29  CoreFoundation                      0x000000010c96c0af __CFRunLoopDoSources0 + 527\r\n    30  CoreFoundation                      0x000000010c96b5df __CFRunLoopRun + 911\r\n    31  CoreFoundation                      0x000000010c96aff6 CFRunLoopRunSpecific + 406\r\n    32  GraphicsServices                    0x0000000112905979 GSEventRunModal + 62\r\n    33  UIKit                               0x000000010f021bb1 UIApplicationMain + 159\r\n    34  mojazastavka_ios                    0x000000010aecd67f main + 111\r\n    35  libdyld.dylib                       0x00000001109fc66d start + 1\r\n    36  ???                                 0x0000000000000001 0x0 + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n```\r\n\r\nMy code: \r\n```\r\nimport React, {Component} from 'react';\r\nimport MapView from 'react-native-maps';\r\nimport MyCustomCallout from './MyCustomCallout';\r\n\r\nexport default class Map extends Component{\r\n\r\n  constructor(props) {\r\n    super(props);\r\n\r\n    let marker = null;\r\n  }\r\n\r\n  render(){\r\n      return (\r\n          <MapView>\r\n              <MapView.Marker \r\n                draggable \r\n                onDragEnd={e => console.log(e.nativeEvent)}\r\n                coordinate={{\r\n                  latitude: this.props.latitude,\r\n                  longitude: this.props.longitude\r\n                }}\r\n                ref={ref => this.marker = ref }\r\n                image={finishImg}>\r\n                  <MyCustomCallout type={'FINISH'}  descriptionText={this.props.destinationName} />\r\n              </MapView.Marker>\r\n          </MapView>\r\n      );\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/airbnb/react-native-maps/issues/comments/329570016","html_url":"https://github.com/airbnb/react-native-maps/issues/1089#issuecomment-329570016","issue_url":"https://api.github.com/repos/airbnb/react-native-maps/issues/1089","id":329570016,"user":{"login":"kcfgl","id":19731815,"avatar_url":"https://avatars2.githubusercontent.com/u/19731815?v=4","gravatar_id":"","url":"https://api.github.com/users/kcfgl","html_url":"https://github.com/kcfgl","followers_url":"https://api.github.com/users/kcfgl/followers","following_url":"https://api.github.com/users/kcfgl/following{/other_user}","gists_url":"https://api.github.com/users/kcfgl/gists{/gist_id}","starred_url":"https://api.github.com/users/kcfgl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcfgl/subscriptions","organizations_url":"https://api.github.com/users/kcfgl/orgs","repos_url":"https://api.github.com/users/kcfgl/repos","events_url":"https://api.github.com/users/kcfgl/events{/privacy}","received_events_url":"https://api.github.com/users/kcfgl/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T18:30:35Z","updated_at":"2017-09-14T18:30:35Z","author_association":"NONE","body":"I can confirm this is still happening. For me it is both with and without the callout."}}
{"actor":{"display_login":"kcfgl"}}