-
Notifications
You must be signed in to change notification settings - Fork 303
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue?
- I have searched existing issues
Build info
- ObjectBox version: 4.1.0
- OS: Android 9
- Device/ABI/architecture: Tablet Lilliput
Steps to reproduce
I haven't been able to replicate the problem, but it happens frequently on devices I don't have access to.
Expected behavior
Understanding the problem is key to solving it.
Actual behavior
The application is crashing when trying to call a simple query.
Code
Code
override suspend fun getMessageCountFromDatabase(): Long {
val box = equipmentMessageBoxStore.getBox(EquipmentMessageEnvelopeDTO::class.java)
val count = box.query()
.equal(EquipmentMessageEnvelopeDTO_.status, EquipmentMessageStatus.READY.value.toLong())
.build()
.use { it.count() }
return count
}Init:
@Provides
@Singleton
@EquipmentMessageStore
fun provideBoxStoreMessages(
@ApplicationContext context: Context
): BoxStore {
var boxStore: BoxStore
val storeBuilder = MyObjectBox.builder()
.validateOnOpenKv()
.androidContext(context)
.name("equipment-messages")
boxStore = storeBuilder.build()
return boxStore
}- Is there anything special about your app? No.
- May transactions or multi-threading play a role? Yes.
- Did you find any workarounds to prevent the issue? No.
Logs, stack traces
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
