Guarding against a crash due to improper mutable array access #328

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

cnstoll commented Mar 10, 2014

Trying to prevent a crash due to something else modifying the mutable delegateNodes array when it shouldn't be.

Collaborator

ObjColumnist commented Mar 15, 2014

Have you had this crasher yourself?

Trying to work out why it isn't a common occurrence.

cnstoll commented Mar 16, 2014

I'm actually going to update the PR soon with some new changes. It turns out that this wasn't sufficient to address the issue.

I feel like this class's public interface needs to be thread safe. We've done our best to make our own code that interacts with this class all bound to the same queue, but its really messy and still isn't as reliable as I would like. Without calling all the methods in this class from the same thread it will crash pretty often. Its far cleaner and more reliable once we made the changes within this class.

I'll update with some new commits very soon.

cnstoll commented Mar 16, 2014

@ObjColumnist just pushed some updates. The main idea is to drive all traffic that accesses the internal mutable array through the same queue. Let me know if this approach seems interesting and if you guys are open to this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment