-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
<!---
Bugs: To help you as fast as possible with an issue please describe your issue
and the steps you have taken to reproduce it in as many details as possible.
-->
Goal
> What do you want to achieve?
Expected Results - No Full App Crashing atleast error reporting
Actual Results - App immediately crashes on init and no logs are reported to Crashlytics
Steps & Code to Reproduce
Cannot reproduce on our own, steps given was user used app for a full day. Unlocked phone next day and tried to open app but app kept crashing only after clearing data was issue resolved. We were given logs with the same native crash and were not able to see these in our error reporting tools.
I suspect it has to do when we are trying to migrate from an older realm db version from a legacy user but if this user was previously using the app that cannot be the case we would already have a running realm db at that point.
Code Sample
When migrating from older realm db we use realm.writeEncryptedCopyTo(newRealmFile, newRealmKey); if old realm was encrypted and realm.writeCopyTo(newRealmFile); when it isn't.
03-22 08:27:41.331: A/DEBUG(17024): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 03-22 08:27:41.331: A/DEBUG(17024): Build fingerprint: 'Verizon/heroqltevzw/heroqltevzw:7.0/NRD90M/G930VVRS4BRA1:user/release-keys' 03-22 08:27:41.331: A/DEBUG(17024): Revision: '15' 03-22 08:27:41.331: A/DEBUG(17024): ABI: 'arm64' 03-22 08:27:41.331: A/DEBUG(17024): pid: 16983, tid: 16983, name: y.package >>> com.my.package <<< 03-22 08:27:41.331: A/DEBUG(17024): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 03-22 08:27:41.331: A/DEBUG(17024): x0 0000000000000000 x1 0000007f6f91e0a6 x2 000000000000000c x3 0000000000000000 03-22 08:27:41.332: A/DEBUG(17024): x4 ffffffffffffffff x5 0000007f6f91e008 x6 0000000000000002 x7 0000000000000000 03-22 08:27:41.332: A/DEBUG(17024): x8 0000000000000000 x9 0000000000000002 x10 0000000000000001 x11 0000000000000000 03-22 08:27:41.332: A/DEBUG(17024): x12 0000000000000021 x13 0000000000000300 x14 000000000000000c x15 2e8ba2e8ba2e8ba3 03-22 08:27:41.332: A/DEBUG(17024): x16 0000007f701527d0 x17 0000007f9c5de554 x18 00000000000000c6 x19 0000000000000000 03-22 08:27:41.332: A/DEBUG(17024): x20 0000007f6f91e0a6 x21 000000000000000c x22 0000007f8db232c0 x23 0000007fc228fb30 03-22 08:27:41.332: A/DEBUG(17024): x24 0000007f8db89008 x25 0000007f8db89000 x26 0000007f8c424010 x27 0000007f6f91e0a6 03-22 08:27:41.332: A/DEBUG(17024): x28 000000000000000c x29 0000007fc228f960 x30 0000007f7003e010 03-22 08:27:41.332: A/DEBUG(17024): sp 0000007fc228f930 pc 0000007f7003e028 pstate 0000000080000000 03-22 08:27:41.338: A/DEBUG(17024): backtrace: 03-22 08:27:41.338: A/DEBUG(17024): #00 pc 00000000001f1028 /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #01 pc 00000000000d2b54 /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #02 pc 00000000000d0b38 /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #03 pc 00000000000d72ec /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #04 pc 00000000000e9adc /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #05 pc 00000000000e9a7c /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #06 pc 00000000000ed170 /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #07 pc 0000000000109a94 /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #08 pc 00000000000ea81c /data/app/com.my.package-1/lib/arm64/librealm-jni.so 03-22 08:27:41.338: A/DEBUG(17024): #09 pc 000000000006edf4 /data/app/com.my.package-1/lib/arm64/librealm-jni.so (Java_io_realm_internal_SharedRealm_nativeGetSharedRealm+480) 03-22 08:27:41.338: A/DEBUG(17024): #10 pc 0000000000f03ca0 /data/app/com.my.package-1/oat/arm64/base.odex (offset 0xdbe000)
Version of Realm and tooling
Realm version(s): 4.1.1
Encryption: YES!!!
Realm sync feature enabled: no
Which Android version and device: 7.0 Samsung Galaxy S7