ashare80 / TSClusterMapView

MKMapView with animated clustering for iOS and OSX
MIT License
149 stars 21 forks source link

Crashes when adding annotations on iOS7 #13

Closed sterranova closed 9 years ago

sterranova commented 9 years ago

The app crahes when trying to add an annotation on a mapView from which a number of annotations has been just removed.

The issue can be reproduced launching the ClusterDemo on an iOS7 device on simulator: add all annotations via "+All" and remove them via "-All". If "+All" is pressed again, it crashes at:

ADClusterAnnotation.m (row 58)

ashare80 commented 9 years ago

@iMone Should be fixed in latest update. Thanks

ehealthADMatt commented 9 years ago

I am still having this problem with the latest version of the pod ... both on simulator and device.

ashare80 commented 9 years ago

@ehealthADMatt I can't recreate the issue in the example project. When does the problem arise?

yorgosg commented 9 years ago

The crash is happening on iOS 7 for me too. This is a stack trace of the crash:

Crashed Thread 0
libobjc.A.dylib 0x3973c626 objc_msgSend + 6 1
Foundation 0x2f8cce87 NSKeyValueWillChange + 472 2
Foundation 0x2f8b9a29 -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 178 3
Foundation 0x2f8de97f NSKVOForwardInvocation + 128 4
CoreFoundation 0x2ef99f95 _forwarding_ + 350 5
CoreFoundation 0x2eee9058 _CF_forwarding_prep_0 + 22 6
APP NAME 0x00186559 -ADClusterAnnotation reset 7
APP NAME 0x00191db1 30-[TSClusterOperation resetAll]_block_invoke (TSClusterOperation.m:436) 8
Foundation 0x2f8dc64f -[NSBlockOperation main] + 128 9
Foundation 0x2f8cc875 -[
NSOperationInternal _start:] + 770 10
Foundation 0x2f970745 __NSOQSchedule_f + 58 11
libdispatch.dylib 0x39c1bd3f _dispatch_client_callout + 20 12
libdispatch.dylib 0x39c1e6c3 _dispatch_main_queue_callback_4CF + 276 13
CoreFoundation 0x2ef62641 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 6 14
CoreFoundation 0x2ef60f0d __CFRunLoopRun + 1306 15
CoreFoundation 0x2eecb729 CFRunLoopRunSpecific + 522 16
CoreFoundation 0x2eecb50b CFRunLoopRunInMode + 104 17
GraphicsServices 0x33e3a6d3 GSEventRunModal + 136 18
UIKit 0x3182c871 UIApplicationMain + 1134 19
APP NAME 0x0005e84b main (main.m:16) 20
libdyld.dylib 0x39c30ab7 start + 0

ehealthADMatt commented 9 years ago

I am still looking into this but it looks like it crashes after this line in my code.

self.mapView showAnnotations:self.mapView.annotations animated:YES];

I am using this line of code because it figures out the best region and zoom to display all annotations. This is important because I filter my annotations via a search input box.

Offending code is ADClusterAnnotation reset

ashare80 commented 9 years ago

@yorgosg @ehealthADMatt your issues are both a bit different but see if they are fixed in this latest update