[hotfix] catch `OutOfMemoryError`s in signald's `loadEnvelope`
context:
- bug: experiencing bugs on startup that cause numbers to become completely unresponsive
- likely cause:
- on startup, signald calls
Manager.loadEnvelope
to try to resend failed messages that have been cached on the filesystem -
Manager.loadEnvelope
tries to allocate byteArray of contentLen to deserialize the cached messages, but contentLen is ridiculously large b/c file was garbage, causingin.readInt()
to return nonsense value - :. when system tries to allocate byte array, it runs out of heap space
- on startup, signald calls
- attempted fix:
- catch the OOM and return null (which is handled gracefully by
- caller in `Manager.retryFailedMessages``
changes:
- this uses the signald build committed in our upstream fork as of: signald-fork@bed9ba6d
Edited by aguestuser