objectbox / objectbox-java

Android Database - first and fast, lightweight on-device vector database
https://objectbox.io
Apache License 2.0
4.33k stars 297 forks source link

Calling Box<Any>. query() must result in a crash. #1152

Closed 0xm1nam0 closed 6 months ago

0xm1nam0 commented 7 months ago

Describe the bug Calling Box. query() must result in a crash.

Basic info (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Box.query()
  2. Crash

Expected behavior Crash: Fatal signal 7 (SIGBUS), code 2, fault addr 0x7f29f0fbf0 in tid 13621 (pool-3-thread-1)

Code

                 val browsingRecordQuery = getObjectBox(BrowsingRecord::class.java)?.query {
                     order(BrowsingRecord_.seqNo)
                     browsingRecord?.let {
                         notEqual(BrowsingRecord_.seqNo, it.seqNo)
                     }
                 }
                 return@async browsingRecordQuery?.find()

Logs, stack traces

2023-10-10 15:23:08.436 13744-13744/? A/DEBUG: signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x7f29f0fbf0
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x0   0000007f75832b30  x1   0000007f5db6e998  x2   0000007f5d9c50d8  x3   0000000000000002
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x4   0000000000000000  x5   0000000070d8ac47  x6   00000000ffffffff  x7   ffffffffffffffff
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x8   0000007f29f0fbf0  x9   000000000000000e  x10  0000000004000018  x11  1700000000000000
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x12  0000007f75846b78  x13  000000000000001e  x14  000000000000001c  x15  0000000000000000
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x16  0000007f80f9e5a0  x17  0000007f80f45d1c  x18  00000000ffffffff  x19  0000007f7589de00
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x20  0000007f75819500  x21  0000007f75816380  x22  0000007f758aa540  x23  0000000000000000
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x24  0000007f5db6e9b8  x25  0000007f5db6e948  x26  0000007f7589de98  x27  0000007f75812a20
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     x28  0000007f5db714e8  x29  0000007f5db6e9e0  x30  0000007f5d956358
2023-10-10 15:23:08.437 13744-13744/? A/DEBUG:     sp   0000007f5db6e8e0  pc   0000007f5d9c50e0  pstate 0000000060000000
greenrobot-team commented 7 months ago

Thanks for reporting. If this can always be reproduced, can you share a code example that we can use to do so?

Can you also share the backtrace: part of the error message? E.g. similar to what is shown here.

Also, what device was this on? (Specifically need the architecture to possibly symbolize the crash trace.)

github-actions[bot] commented 6 months ago

Without additional information, we are unfortunately not sure how to resolve this issue. Therefore this issue has been automatically closed. Feel free to comment with additional details and we can re-open this issue.

greenrobot-team commented 6 months ago

This may be related to #1154.