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

[SR-13729] Foundation notification unconditional bridging crash #3242

Open
iby opened this issue Oct 13, 2020 · 1 comment
Open

[SR-13729] Foundation notification unconditional bridging crash #3242

iby opened this issue Oct 13, 2020 · 1 comment

Comments

@iby
Copy link

iby commented Oct 13, 2020

Previous ID SR-13729
Radar rdar://problem/70298055
Original Reporter @iby
Type Bug

Attachment: Download

Environment

Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
Xcode version 12.0.1 (12A7300)

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 841949ae77a2a5fa0ef339fdd2b3d21c

Issue Description:

Came across this here. This is the isolated example that crashes in a playground:

import AVFoundation
import Foundation
let observer = NotificationCenter.default.addObserver(forName: nil, object: nil, queue: nil, using: { _ in })
let asset = AVAsset(url: URL(fileURLWithPath: "~/Downloads/bbb.mov"))
let _ = asset.tracks(withMediaType: .video).first
NotificationCenter.default.removeObserver(observer)

Not adding the observer or not invoking tracks method doesn't cause the crash. This happens with any asset file, but attaching one as a sample.

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants