From db021 -> db022: total crash "xxxx has stopped working"


#1

Hi,

I have installed db022. Whenever a function of CBL is called the app crashes: "xxxxx has stopped working"
Even the most basic function causes the crash. Wether it is in my app environment or test environment.

var db = new Database("my-database");

Am I missing something? I fond following hint of cause:

02-12 12:18:27.545 D/Mono    (27660): DllImport attempting to load: 'LiteCore'.
02-12 12:18:27.547 D/Mono    (27660): DllImport error loading library '/storage/emulated/0/Android/data/xxxxx.Android.Test/files/.__override__/libLiteCore': 'dlopen failed: library "/data/app/xxxxx.Android.Test-1/lib/arm//storage/emulated/0/Android/data/xxxxxx.Android.Test/files/.__override__/libLiteCore" not found'.
WARNING: linker: 
libLiteCore.so: unused DT entry: type 0x6ffffffe arg 0xa1038

WARNING: linker: libLiteCore.so: unused DT entry: type 0x6fffffff
 arg 0x3
02-12 12:18:27.552 D/Mono    (27660): DllImport error loading library '/storage/emulated/0/Android/data/xxxxx.Android.Test/files/.__override__/libLiteCore.so': 'dlopen failed: library "/data/app/xxxx.Android.Test-1/lib/arm//storage/emulated/0/Android/data/xxxxxx.Android.Test/files/.__override__/libLiteCore.so" not found'.
02-12 12:18:27.553 D/Mono    (27660): DllImport error loading library '/system/lib/libLiteCore': 'dlopen failed: library "/data/app/xxxxx.Android.Test-1/lib/arm//system/lib/libLiteCore" not found'.
02-12 12:18:27.553 D/Mono    (27660): DllImport error loading library '/system/lib/libLiteCore.so': 'dlopen failed: library "/data/app/xxxxxx.Android.Test-1/lib/arm//system/lib/libLiteCore.so" not found'.
02-12 12:18:27.554 D/Mono    (27660): DllImport error loading library 'libLiteCore': 'dlopen failed: library "/data/app/xxxxxx.Android.Test-1/lib/arm/libLiteCore" not found'.
02-12 12:18:27.554 W/linker  (27660): libLiteCore.so: unused DT entry: type 0x6ffffffe arg 0xa1038
02-12 12:18:27.556 W/linker  (27660): libLiteCore.so: unused DT entry: type 0x6fffffff arg 0x3
02-12 12:18:27.578 D/Mono    (27660): DllImport loaded library 'libLiteCore.so'.
02-12 12:18:27.578 D/Mono    (27660): DllImport searching in: 'LiteCore' ('libLiteCore.so').
02-12 12:18:27.578 D/Mono    (27660): Searching for 'c4_getVersion'.
02-12 12:18:27.578 D/Mono    (27660): Probing 'c4_getVersion'.
02-12 12:18:27.578 D/Mono    (27660): Found as 'c4_getVersion'.
02-12 12:18:27.604 D/Mono    (27660): DllImport searching in: 'LiteCore' ('libLiteCore.so').
02-12 12:18:27.604 D/Mono    (27660): Searching for 'c4slice_free'.
02-12 12:18:27.605 D/Mono    (27660): Probing 'c4slice_free'.
02-12 12:18:27.605 D/Mono    (27660): Found as 'c4slice_free'.

#2

That’s quite troubling. Does the same thing happen on an x86 emulator?


#3

I just tried real quick on my armv7 device and I didn’t face the same issue. Perhaps try fully uninstalling the app before running it again?


#4

Ah @borrrden ,

thanks, I was fighting with my emulator. Yes I already uninstalled/reinstalled the app… . Also deleted the bin and obj folder.

I’ll keep searching and keep you posted


#5

Let me know the model, API version, etc and to be clear, does that mean it does not happen on the emulator but it does on the device? Or something else?


#6

@borrrden,

We don’t test on emulators but on the devices
It happens on all models I’ve tested:

Google Nexus with android v 5.1.1
Motorola Moto G5 Plus android v 7.0

Config is as followed:
settings2


settings3settings4

maybe the manifest is of help:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" android:versionCode="3" android:versionName="1.1" package="xxxxxxx">
	<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
	<uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" />
	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.BATTERY_STATS" />
	<uses-permission android:name="android.permission.DEVICE_POWER" />
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
	<uses-permission android:name="android.permission.READ_PHONE_STATE" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
	<application android:label="SummitMobile" android:icon="@drawable/icon">
		<meta-data android:name="io.fabric.ApiKey" android:value="1.0" />
	</application>
</manifest>

#7

This may be off base, but I notice the issue is in finding a library, and it looks like you have install set to use external. I’m wondering it there’s an issue with path setup. In the error IIRC emulated is internal storage.
Maybe try it without prefer external storage?


#8

According to the logs the library was found. I’m not sure what the actual crash is but note that we compile with Android 8.0 as the target version. I remember there being a lot of difference between 6.0 and 7.0 so perhaps the issue is there too?


#9

My bad, Jim is right, it’s finding the library. The linker is finding the library and the logs show no problem resolving the symbols needed (as far as the original logs show). The ‘unused DT entry’ part is discussed pretty well here: https://stackoverflow.com/questions/33206409/unused-dt-entry-type-0x1d-arg

All that looks benign. I found some writeups about Android getting more picky about DT entries and paths, but again, the logs don’t seem to show a problem. That should also be post 5.1.1, so even if it was a problem the Nexus shouldn’t show it.

Any other leads?


#10

Ok,

I’ve updated Visual Studio to 15.5.6 and now it works. We had to abandon updating VS for a while after a problem with Xamarin on one of the previous updates.

This post can be closed