Fix closed Realm instance during send#552
Merged
octoshrimpy merged 1 commit intoquik-sms:masterfrom Oct 4, 2025
Merged
Conversation
I found a bug where sending messages doesn't work: 1. Quit the app (swipe it away in the Recent Apps view) 2. Open QUIK 3. Send a message 4. The message disappears 5. This is logged: ``` 2025-09-29 10:30:29.806 3110-3110 Interactor$execute dev.octoshrimpy.quik.debug W java.lang.IllegalStateException: This Realm instance has already been closed, making it unusable. at io.realm.BaseRealm.checkIfValid(BaseRealm.java:525) at io.realm.dev_octoshrimpy_quik_model_ConversationRealmProxy.realmGet$id(dev_octoshrimpy_quik_model_ConversationRealmProxy.java:130) at dev.octoshrimpy.quik.model.Conversation.getId(Conversation.kt:27) at dev.octoshrimpy.quik.interactor.SendMessage$buildObservable$2.invoke(SendMessage.kt:51) at dev.octoshrimpy.quik.interactor.SendMessage$buildObservable$2.invoke(SendMessage.kt:48) at dev.octoshrimpy.quik.interactor.SendMessage.buildObservable$lambda$1(SendMessage.kt:48) at dev.octoshrimpy.quik.interactor.SendMessage.$r8$lambda$hlSlgpBA9ul6H285iTbkv7pF6zA(Unknown Source:0) at dev.octoshrimpy.quik.interactor.SendMessage$$ExternalSyntheticLambda1.accept(Unknown Source:2) at io.reactivex.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onNext(FlowableDoOnEach.java:86) ``` Fix below. Unsure if it's the same issue as quik-sms#509
Closed
This was referenced Nov 13, 2025
Merged
Closed
Merged
This was referenced Dec 9, 2025
Closed
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found a bug where sending messages doesn't work:
Fix below. Unsure if it's the same issue as #509
Looks like there are a lot of instances of
Realm.getDefaultInstance().use { }which auto-closes the realm instance. is that ever desirable?