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

fix (**) deallocate only when we're sure we've allocated something #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kuamanet
Copy link

@kuamanet kuamanet commented Sep 19, 2022

Fix #169

@Sethi1998
Copy link

The error is solved but if are playing from a list then its stucks on the screen and there is no crash but its stuck in the same

@Sethi1998
Copy link

the main crash was in this line " lastDescription.deallocate()"

@kuamanet
Copy link
Author

@Sethi1998 can you provide a little snippet to reproduce the error?

@Sethi1998
Copy link

@Sethi1998 can you provide a little snippet to reproduce the error?

there is no error if I have used your methods which you have changed

@Sethi1998
Copy link

" if outPacketDescriptions?.pointee == nil {
outPacketDescriptions?.pointee = UnsafeMutablePointer.allocate(capacity: 1)
if let lastDescription = selfAudioConverter.converterDescriptions {
lastDescription.deallocate()
}
} "

@GabM3
Copy link

GabM3 commented Sep 19, 2022

@Sethi1998 I've just tried this a few times, the queue is correctly played in iOS 16, can you explain how this is not working for you?

micahjon added a commit to micahjon/SwiftAudioPlayer that referenced this pull request Oct 11, 2022
Incorporate changes from PR tanhakabir#175 (Kuama-IT:fix-ios-16-crash)
tanhakabir@97a9bf6

Only bring over code changes, not whitespace
Unsure if max() -> min() change in totalPredictedPacketCount is necessary, but kept it just in case
micahjon added a commit to micahjon/SwiftAudioPlayer that referenced this pull request Dec 15, 2022
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.

‼️ Crash on iOS 16 for 100% users – signal SIGABRT
3 participants