We're encountering a rare crash where we see Swift/ContiguousArrayBuffer.swift:580: Fatal error: Index out of range when SwiftPhoenixClient attempts to filter bindingsDel in the Channel object while being manipulated from another thread. This is extremely hard to reproduce but we're seeing the crash in our Sentry logs. The call stack is below and we've isolated it to the code:
I wish there was more details I could provide. It may be happening for our clients when the SDK attempts to reconnect after a connection interruption but I can't concretely say that. I'd suggest using Swift Concurrency and placing the class in an Actor to avoid these types of conditions but that's a lot of work and I'm not sure if the class is in a position to adopt that framework. Let me know if we can help at all.
Hi there,
We're encountering a rare crash where we see
Swift/ContiguousArrayBuffer.swift:580: Fatal error: Index out of range
when SwiftPhoenixClient attempts to filterbindingsDel
in theChannel
object while being manipulated from another thread. This is extremely hard to reproduce but we're seeing the crash in our Sentry logs. The call stack is below and we've isolated it to the code:Code snippet:
Callstack:
I wish there was more details I could provide. It may be happening for our clients when the SDK attempts to reconnect after a connection interruption but I can't concretely say that. I'd suggest using Swift
Concurrency
and placing the class in anActor
to avoid these types of conditions but that's a lot of work and I'm not sure if the class is in a position to adopt that framework. Let me know if we can help at all.Cheers