Code Monkey home page Code Monkey logo

Comments (6)

uknowmeright avatar uknowmeright commented on August 15, 2024

This bug makes this library virtually unusable. Has there been a fix or at least a workaround for this yet?

from cchmapclustercontroller.

choefele avatar choefele commented on August 15, 2024

For me, this only happens when I quickly add and remove annotations at the same time to the clustering – which is a use case I don't have.

You can help by

  • Creating a unit tests that reproduces this problem
  • Provide a solution that avoids this issue

Looking forward to your contributions

from cchmapclustercontroller.

bhapca avatar bhapca commented on August 15, 2024

I can reproduce it consistently on the simulator iOS 9.2 (13C75). It seems to be a problem with MKPointAnnotation, which gets added to the set of annotations without detecting duplicates.

screen shot 2016-03-14 at 16 21 42
screen shot 2016-03-14 at 16 22 02

Overriding the hash and isEqual as I did in 539c98b seems to be fixing the problem.

from cchmapclustercontroller.

choefele avatar choefele commented on August 15, 2024

@bhapca Can you please let me know how to reproduce this issue? I'm running the sample app in this repo on Xcode 7.2.1/iPhone 6/iOS 9.2 and tap the reset button. Where does the crash occur for you?

from cchmapclustercontroller.

bhapca avatar bhapca commented on August 15, 2024

@choefele, I'm not experiencing any crash, instead I'm getting the duplicate annotations discussed in this issue. The screenshots I included show how the annotations set double in size after 2 consecutive taps on the Reset button. They're screenshots of the debug session, stopped at breakpoint, not crashed, (look at the lldb prompt) which shows the issue.

The steps to repro are the same as described by @grigorye at the beginning of this thread. Essentially launch the sample app, wait for the map to load, tap Reset, see how the number of annotations increase. Repeat tapping Reset, to see the number of annotations keeping growing.

It appears that the allAnnotations property of CCHMapClusterController doesn't behave like a set when it's fed instances of MKPointAnnotation, because it accepts duplicate entries.

It seems that the isEqual method of MKPointAnnotation is messed-up:
screen shot 2016-03-21 at 11 02 23

from cchmapclustercontroller.

choefele avatar choefele commented on August 15, 2024

I believe this is fixed in 674ec58

from cchmapclustercontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.