realm / realm-core

Core database component for the Realm Mobile Database SDKs
https://realm.io
Apache License 2.0
1.02k stars 163 forks source link

terminating with uncaught exception of type realm::InvalidTableRef #4379

Closed sterien7 closed 3 years ago

sterien7 commented 3 years ago

SDK and version

SDK : io.realm:realm-gradle-plugin Version: 10.3.1 Android Kotiln app

Observations

Crash log / stacktrace

2021-02-02 17:55:51.140 26749-26749/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2021-02-02 17:55:51.140 26749-26749/? A/DEBUG: Abort message: 'terminating with uncaught exception of type realm::InvalidTableRef: transaction_ended
    Exception backtrace:
    <backtrace not supported on this platform>'
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x0  0000000000000000  x1  0000000000005c8f  x2  0000000000000006  x3  0000007cf7ca35e0
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x4  fefeff3d6c716e65  x5  fefeff3d6c716e65  x6  fefeff3d6c716e65  x7  7f7f7f7f7f7f7f7f
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x8  00000000000000f0  x9  3748c3a1b0eea3db  x10 0000000000000001  x11 0000000000000000
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x12 fffffff0fffffbdf  x13 0000000060198415  x14 00240e0d86e0a1b4  x15 00007c0af6d48a1a
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x16 0000007d917568c0  x17 0000007d91732ff0  x18 0000007c9b558000  x19 000000000000565b
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x20 0000000000005c8f  x21 00000000ffffffff  x22 ffffff80ffffffc8  x23 0000007cf7ca3830
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x24 0000007cf7ca3710  x25 0000007cf7ca3750  x26 0000007cf7ca4020  x27 0000007d93f41020
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     x28 0000007fde214a00  x29 0000007cf7ca3680
2021-02-02 17:55:51.141 26749-26749/? A/DEBUG:     sp  0000007cf7ca35c0  lr  0000007d916e427c  pc  0000007d916e42a8
2021-02-02 17:55:51.149 26749-26749/? A/DEBUG: backtrace:
2021-02-02 17:55:51.149 26749-26749/? A/DEBUG:       #00 pc 00000000000832a8  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: d00c50b4798c95f2447d684ed3ea7dcb)
2021-02-02 17:55:51.149 26749-26749/? A/DEBUG:       #01 pc 000000000041939c  /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
2021-02-02 17:55:51.149 26749-26749/? A/DEBUG:       #02 pc 00000000004194f4  /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
2021-02-02 17:55:51.150 26749-26749/? A/DEBUG:       #03 pc 0000000000415638  /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
2021-02-02 17:55:51.150 26749-26749/? A/DEBUG:       #04 pc 0000000000414f40  /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (__cxa_rethrow+196) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
2021-02-02 17:55:51.150 26749-26749/? A/DEBUG:       #05 pc 00000000001c6250  /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
2021-02-02 17:55:51.150 26749-26749/? A/DEBUG:       #06 pc 00000000000e6f20  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: d00c50b4798c95f2447d684ed3ea7dcb)
2021-02-02 17:55:51.150 26749-26749/? A/DEBUG:       #07 pc 00000000000850c8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: d00c50b4798c95f2447d684ed3ea7dcb)
jedelbo commented 3 years ago

I think this needs processing by Android team first. @cmelchior will you handle this?

clementetb commented 3 years ago

That stack trace isn't of version 10.3.1 but 10.0.1. Here is the unrolled stack trace:


Unrolling /Users/clemente.tort/realm-java/tools/stack.log from Realm Java 10.0.1 (base) using ABI arm64-v8a
********** Crash dump: **********
#00 0x00000000000832a8 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: d00c50b4798c95f2447d684ed3ea7dcb)
#01 0x000000000041939c /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
                                                                                                                     abort_message
                                                                                                                     /usr/local/google/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:76:5
#02 0x00000000004194f4 /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
                                                                                                                     demangling_terminate_handler()
                                                                                                                     /usr/local/google/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/cxa_default_handlers.cpp:62:21
#03 0x0000000000415638 /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
                                                                                                                     std::__terminate(void (*)())
                                                                                                                     /usr/local/google/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/cxa_handlers.cpp:59:9
#04 0x0000000000414f40 /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (__cxa_rethrow+196) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
                                                                                                                     __cxa_rethrow
                                                                                                                     /usr/local/google/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:617:9
#05 0x00000000001c6250 /data/app/com.carmaproject.android.staging-I0f4A9QHLNXw3mEwcEyKKA==/base.apk!librealm-jni.so (offset 0x1b0000) (BuildId: 6ad7f63d64a38561c8e8c41f3d5d36021f8749c5)
                                                                                                                     realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0::operator()() const
                                                                                                                     /tmp/realm-java/realm/realm-library/src/main/cpp/object-store/src/impl/epoll/external_commit_helper.cpp:201:13
                                                                                                                     decltype(std::__ndk1::forward<realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0>(fp)()) std::__ndk1::__invoke<realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0>(realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0&&)
                                                                                                                     /opt/android-sdk-linux/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/type_traits:3501:0
                                                                                                                     void std::__ndk1::__thread_execute<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0>(std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0>&, std::__ndk1::__tuple_indices<>)
                                                                                                                     /opt/android-sdk-linux/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/thread:273:0
                                                                                                                     void* std::__ndk1::__thread_proxy<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, realm::_impl::ExternalCommitHelper::DaemonThread::DaemonThread()::$_0> >(void*)
                                                                                                                     /opt/android-sdk-linux/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/thread:283:0
#06 0x00000000000e6f20 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: d00c50b4798c95f2447d684ed3ea7dcb)
#07 0x00000000000850c8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: d00c50b4798c95f2447d684ed3ea7dcb```
fealebenpae commented 3 years ago

I'm pretty sure we've seen this before and we've already fixed it. I suggest trying again with the latest SDK.

sync-by-unito[bot] commented 3 years ago

➤ Brian Munkholm commented:

Let us know if the latest SDK doesn't solve your issues. Thanks!