-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Describe the bug
While leaving my app open on a screen that has a channel subscription, after around 20 minutes without touching the app it crashed, saying "malloc: Heap corruption detected, free list is damaged". This has happened several times, on different devices.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Make a channel subscription:
let client = self.supabaseClient.realtime
client.connect()
let allChanges = client.channel(.column("id", value: id, table: "table-name", schema: "schema-name"))
client.onOpen { [weak self] in
print("Realtime client opened")
}
allChanges.on(.update) { [weak self] _ in
print("Realtime update")
}
allChanges.subscribe()
self.realtimeChannel = allChanges
- Wait with the app open for a while, while triggering lots of updates to the database on another device/directly to the db
- At a seemingly random time, the app will crash with a signal SIGABRT.
Expected behavior
The client should be able to stay open indefinitely with no crashes.
Screenshots
Image of where the crash occurred in the library
Image of the thread stack trace
System information
- OS: [iOS 16.4.1]
- Version of supabase-realtime: [0.0.2]
- Version of supabase-swift: [0.2.1]
Additional context
This is happening quite consistently, please advise how to fix the crash if it's a usage issue!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working