mediapipe
mediapipe copied to clipboard
Memory Leak in segmentAsync Method of ImageSegmentService Causing App Crash - IOS
We have identified a memory leak in the segmentAsync method of the ImageSegmentService class. The issue occurs during the invocation of the segmentAsync(image:timestampInMilliseconds:) method provided by the library. This leak is causing excessive memory consumption, eventually leading to an app crash during prolonged usage or high-frequency calls.
func segmentAsync(
sampleBuffer: CMSampleBuffer,
orientation: UIImage.Orientation,
timeStamps: Int) {
guard let image = try? MPImage(sampleBuffer: sampleBuffer, orientation: orientation) else {
return
}
do {
try imageSegmenter?.segmentAsync(image: image, timestampInMilliseconds: timeStamps) <------ Leaks here 484 Bytes
} catch {
print(error)
}
}
Thanks for the heads up, reported internally.
Hi @PaulTR, Any updates on the reported issue? Let me know! Thanks!
No, it's been assigned. Unfortunately I don't have any timelines for when it'll be prioritized. Thanks.
HI @PaulTR , Thank you for the update. I understand that prioritization takes time, but this memory leak issue is affecting our live project, and we also tried with the latest version, but the same result. Please let me know if there's anything I can do to help expedite the process or provide additional details for debugging. Looking forward to any updates at the earliest. Appreciate your time!
Hi @PaulTR , just following up on this issue.
Hey. I sent it to eng with mention of it being in production, so it depends on when they prioritize. Unfortunately I'm no longer with that team so can't do much more at this point.
Hi @PaulTR, Thanks for the update. Since it's in production, do you know who is currently leading this project or who I can reach out to for a status check?
Hi @PaulTR @niuchl @markmcd @arfaian Just following up on this issue to check if there’s been any progress or updates from your side. We’re still encountering the same crash in our project and wanted to know if there’s any workaround or fix planned in an upcoming release.
Thanks for your time and support!
I just added a new admin who will be taking on these projects soon.
On Fri, Oct 31, 2025, 6:25 AM msssoftprodigy008 @.***> wrote:
msssoftprodigy008 left a comment (google-ai-edge/mediapipe-samples#488) https://github.com/google-ai-edge/mediapipe-samples/issues/488#issuecomment-3472869133
Hi @PaulTR https://github.com/PaulTR @niuchl https://github.com/niuchl @markmcd https://github.com/markmcd @arfaian https://github.com/arfaian Just following up on this issue to check if there’s been any progress or updates from your side. We’re still encountering the same crash in our project and wanted to know if there’s any workaround or fix planned in an upcoming release.
Thanks for your time and support!
— Reply to this email directly, view it on GitHub https://github.com/google-ai-edge/mediapipe-samples/issues/488#issuecomment-3472869133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR2C3ZUXQYZYYBDTRPAEGT32NILFAVCNFSM6AAAAACKYTXGYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTINZSHA3DSMJTGM . You are receiving this because you were mentioned.Message ID: @.***>