Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime crashes on Android using cloud sync #1845

Closed
pfedotovsky opened this issue Apr 7, 2019 · 2 comments
Closed

Runtime crashes on Android using cloud sync #1845

pfedotovsky opened this issue Apr 7, 2019 · 2 comments

Comments

@pfedotovsky
Copy link

pfedotovsky commented Apr 7, 2019

Goals

I'm using Realm Cloud with my Xamarin.Forms application. Recently I noticed that Google pre-launch report shows weird exceptions:

04-06 14:01:10.324: E/REALM(14014): uncaught exception in notifier thread: N5realm15InvalidDatabaseE: Invalid top array (ref: 50408, size: 0)
04-06 14:01:10.324: E/REALM(14014): --------- beginning of crash
04-06 14:01:10.324: A/libc(14014): Fatal signal 6 (SIGABRT), code 6 in tid 14222 (Thread5)
04-06 14:01:10.324: A/libc(14014): [ 04-06 14:01:10.326 393: 393 W/ ]
04-06 14:01:10.324: A/libc(14014): debuggerd: handling request: pid=14014 uid=10109 gid=10109 tid=14222
04-06 14:01:10.327: I/AppManager(1784): removeProcessDependency pid:14014
04-06 14:01:10.404: A/DEBUG(16630):


04-06 14:01:10.404: A/DEBUG(16630): Build fingerprint: 'HUAWEI/MHA-L29/HWMHA:7.0/HUAWEIMHA-L29/C567B138:user/release-keys'
04-06 14:01:10.404: A/DEBUG(16630): Revision: '0'
04-06 14:01:10.404: A/DEBUG(16630): ABI: 'arm'
04-06 14:01:10.404: A/DEBUG(16630): pid: 14014, tid: 14222, name: Thread-5 >>> com.pfedotovsky.app<<<
04-06 14:01:10.404: A/DEBUG(16630): signal 6 (SIGABRT), code 6 (SI_TKILL), fault addr -------
04-06 14:01:10.404: A/DEBUG(16630): r0 00000000 r1 0000378e r2 00000006 r3 00000008
04-06 14:01:10.404: A/DEBUG(16630): r4 ce286978 r5 00000006 r6 ce286920 r7 0000010c
04-06 14:01:10.404: A/DEBUG(16630): r8 ff965ecc r9 ce6dbbac sl ce5b3514 fp ce2868f4
04-06 14:01:10.404: A/DEBUG(16630): ip 00000004 sp ce286888 lr f15ceac7 pc f15d1330 cpsr 600f0010
04-06 14:01:10.412: A/DEBUG(16630): backtrace:
04-06 14:01:10.413: A/DEBUG(16630): #00 pc 0004a330 /system/lib/libc.so (tgkill+12)
04-06 14:01:10.413: A/DEBUG(16630): #1 pc 00047ac3 /system/lib/libc.so (pthread_kill+34)
04-06 14:01:10.413: A/DEBUG(16630): #2 pc 0001d925 /system/lib/libc.so (raise+10)
04-06 14:01:10.413: A/DEBUG(16630): #3 pc 00019471 /system/lib/libc.so (__libc_android_abort+34)
04-06 14:01:10.413: A/DEBUG(16630): #4 pc 000170b4 /system/lib/libc.so (abort+4)
04-06 14:01:10.413: A/DEBUG(16630): #5 pc 0032d634 /data/app/com.pfedotovsky.app-1/lib/arm/librealm-wrappers.so (_ZN9__gnu_cxx27__verbose_terminate_handlerEv+348)
04-06 14:01:10.413: A/DEBUG(16630): #6 pc 002fb174 /data/app/com.pfedotovsky.app-1/lib/arm/librealm-wrappers.so (_ZN10__cxxabiv111__terminateEPFvvE+8)
04-06 14:01:10.413: A/DEBUG(16630): #7 pc 002fb214 /data/app/com.pfedotovsky.app-1/lib/arm/librealm-wrappers.so (_ZSt9terminatev+12)
04-06 14:01:10.413: A/DEBUG(16630): #8 pc 0032c5e0 /data/app/com.pfedotovsky.app-1/lib/arm/librealm-wrappers.so (execute_native_thread_routine+204)
04-06 14:01:10.413: A/DEBUG(16630): #9 pc 00047593 /system/lib/libc.so (_ZL15__pthread_startPv+22)
04-06 14:01:10.413: A/DEBUG(16630): #10 pc 00019ecd /system/lib/libc.so (__start_thread+6)

Can someone advise how to troubleshoot it?

Expected Results

No exceptions.

Actual Results

Weird exceptions (see above).

Steps to Reproduce

I don't know what results to this - the app use Realm Cloud in read-only mode.

Version of Realm and Tooling

  • Realm Cloud
  • Client SDK Version: Realm 3.4.0
  • Client OS & Version: Windows 10 October update
@pfedotovsky
Copy link
Author

It seems that the issue was because I tried to open the cloud realm with a pre-populated database

var syncConfiguration = new FullSyncConfiguration(RealmUri, user, **RealmPath**);
OnlineRealm = await Realm.GetInstanceAsync(syncConfiguration);

Is this scenario supported?

@nirinchev
Copy link
Member

No, that's not supported, but it's surprising you're getting this type of crash. I'll need to ask someone on the native team to look into it and see if you're hitting some corner case we haven't guarded properly against. And just to be clear, you would still get an exception, it should just be a more informative one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants