Skip to content

Conversation

@monojenkins
Copy link
Collaborator

The initial solution fixed the rance condition in which the index
changed, but that did not guarantee that we would get the correct
bundles. We now clone the CFArray (which also clones the callbacks set
to the array) and iterate over it to make sure Apple does not do evil
things while we are iteraing.

Better Fixes: https://github.com/xamarin/maccore/issues/940

Backport of #7425.

/cc @mandel-macaque

The initial solution fixed the rance condition in which the index
changed, but that did not guarantee that we would get the correct
bundles. We now clone the CFArray (which also clones the callbacks set
to the array) and iterate over it to make sure Apple does not do evil
tings while we are iteraing.

Better Fixes: https://github.com/xamarin/maccore/issues/940
@monojenkins
Copy link
Collaborator Author

Build failure
Build failed or was aborted

🔥 Build failed 🔥

@mandel-macaque
Copy link
Contributor

build

@monojenkins
Copy link
Collaborator Author

Build failure
Build failed or was aborted

🔥 Build failed 🔥

@mandel-macaque
Copy link
Contributor

Argh, is missing the CFArray commit :/. I'll fix it

When working on https://github.com/xamarin/maccore/issues/940 we noticed
that clone the array would be a better approach.

The CFArrayCreateCopy add some nice things:

* The pointer values from theArray are copied into the new array.
* The values are also retained by the new array.
* The count of the new array is the same as theArray
* The new array uses the same callbacks as theArray. [IMPORTANT]

Whith this in, we can have a better fix for https://github.com/xamarin/maccore/issues/940
@monojenkins
Copy link
Collaborator Author

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
🔥 Test run failed 🔥

Test results

1 tests failed, 86 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed

@mandel-macaque
Copy link
Contributor

@mandel-macaque mandel-macaque merged commit 54b2164 into dotnet:d16-5 Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants