Closed
Conversation
10 tasks
Author
|
I'm not entirely convinced that this is correct either. I'm having a hard time wrapping my head around the implementation details of this crate, so I've worked around the issue by rolling my own bindings and using carefully placed |
Member
|
Sorry for forgetting about this. Could you file an issue with sample code that reproduces the problem? |
Author
|
I've filed issue #319 to track this. |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was some bizarre behaviour going on with
CGDisplayMode::all_display_modes(), which I believe was resulting in objects being freed that weren't supposed to. In my project, all calls toCGConfigureDisplayWithDisplayMode()would crash after this function call, and any subsequent calls toCGDisplayMode::all_display_modes()would crash as well.Familiarising myself with this codebase, I think the right solution here is to wrap the array elements with
TCFType::wrap_under_get_rule()as indicated by the comment in theCFArray::iter()function. In order to do this, instead of theforeign_type!()macro we will have to useimpl_TCFType!()for theCGDisplayModetype.This change is