-
Notifications
You must be signed in to change notification settings - Fork 27
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
Segmentation Fault while using 0.2.1 version #29
Comments
Oh I will look into it. If you set the rust flags like this: $ export RUSTFLAGS=-Zsanitizer=address RUSTDOCFLAGS=-Zsanitizer=address And run your code with the nightly version, what does the dump say? |
I also forked the repo and tried running the tests in |
Cool that helps! It's an issue with how something being dropped with the wrong refcount. This will be fixed with my core-foundation pr. but I can fix it here too. Thanks |
Great! Do you have an estimate on by when this'll be available? Also, out of curiosity, how did you figure |
Fixed and pushed a new version v0.2.2 |
It was the call to CFRelease at the top which is called via the Id/ShareId traits which calls the CFRelease via its drop trait. Objective C uses refcounting a similar model as RC and ARC. The segfault happened in the CMSampleBuffer as it hold references to underlying image/pixelbuffers which was created in a bad way messing up the ref count. |
Previously, I was using a older version of the library and the screen capturing logic was working as expected. I've recently updated my code to use the latest version of
screencapturekit-rs
( 0.2.1 ) and I've started seeing aSegmentation Fault
.Here's a sample code which reproduces the issue -
This is the output I see

Maybe I'm using some part incorrectly but would be great if someone could look into this and help me out. Let me know if you need more help with the reproduction.
The text was updated successfully, but these errors were encountered: