Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain calayer after creation #546

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xiaopengli89
Copy link
Contributor

@xiaopengli89 xiaopengli89 commented Apr 21, 2023

Run create_calayer test:

signal: 11, SIGSEGV: invalid memory reference

@xiaopengli89 xiaopengli89 changed the title Retain calayer before add/insert/replace Retain calayer after creation Apr 21, 2023
@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably b009c87) made this pull request unmergeable. Please resolve the merge conflicts.

@jdm
Copy link
Member

jdm commented Sep 10, 2023

@xiaopengli89 What is create_calayer test? I'd like to understand the code that is triggering this crash, since I worry that we might end up leaking layer objects with this change.

@xiaopengli89
Copy link
Contributor Author

@xiaopengli89 What is create_calayer test? I'd like to understand the code that is triggering this crash, since I worry that we might end up leaking layer objects with this change.

Creating CALayer in autoreleasepool, event loop or child thread will trigger this crash, in which case the runtime will hold ownership of the CALayer.

@nicoburns
Copy link

nicoburns commented May 1, 2024

This is also reported in #643

cocoa/src/quartzcore.rs Outdated Show resolved Hide resolved
cocoa/src/quartzcore.rs Show resolved Hide resolved
@xiaopengli89 xiaopengli89 requested a review from madsmtm May 6, 2024 03:25
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.

None yet

5 participants