Getting Fatal Error on Sync in 2.0 and as well as in 2.1

@priya.rajagopal @jens @pasin It’s been a whole year I am getting the same issue. I am still working on couchbase lite 1.6. I am unable to move on 2.1. Every time it crashes whenever I start sync methods. I am trying to sync four different buckets from server to couchbase mobile. Every time I am getting this same fatal error. Please help me what I am doing wrong over here.

I have written a replication method over application class. Is this creating an issue? Or do I need to run this replication function in threads?

public void startReplication(Database database) {

URI uri;
try {
    uri = new URI(PATIENT_PRESCRIPTION_SYNC_URL);
} catch (URISyntaxException e) {
    e.printStackTrace();
    return;
}
if (!SharedPrefrenceUtils.loadSavedPreferences(context, SharedPrefrenceUtils.doctorId, "").equalsIgnoreCase("")) {
    ArrayList<String> channelList = new ArrayList<>();
    channelList.add(SharedPrefrenceUtils.loadSavedPreferences(context, SharedPrefrenceUtils.doctorId, ""));
    if (channelList.size() > 0) {
        Endpoint endpoint = new URLEndpoint(uri);
        ReplicatorConfiguration config = new ReplicatorConfiguration(database, endpoint);
        config.setReplicatorType(ReplicatorConfiguration.ReplicatorType.PUSH_AND_PULL);
        config.setChannels(channelList);
        config.setContinuous(true);

        // authentication

        replicator = new Replicator(config);
        replicator.start();
    }
}
}

I need a serious help on this. Its been whole one year I am facing the same issue.

  --------- beginning of crash
11-23 19:32:50.278 32761-328/in.digiscribe A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 328 (Thread-19003)
11-23 19:32:50.278 290-290/? D/AEE/AED: $===AEE===AEE===AEE===$
11-23 19:32:50.278 290-290/? D/AEE/AED: p 0 poll events 1 revents 0
11-23 19:32:50.278 290-290/? D/AEE/AED: not know revents:0
11-23 19:32:50.278 290-290/? D/AEE/AED: p 1 poll events 1 revents 0
11-23 19:32:50.278 290-290/? D/AEE/AED: not know revents:0
11-23 19:32:50.279 290-290/? D/AEE/AED: p 2 poll events 1 revents 1
11-23 19:32:50.279 290-290/? D/AEE/AED: aed_main_fork_worker: generator 0x7f8e412080, worker 0x7ff93a64d0, recv_fd 12
11-23 19:32:50.280 290-290/? D/AEE/AED: aee handle:-1, cpu cores:4, online:1
11-23 19:32:50.280 290-290/? D/AEE/AED: p 3 poll events 1 revents 0
11-23 19:32:50.281 290-290/? D/AEE/AED: not know revents:0
11-23 19:32:50.283 414-414/? I/AEE/AED: handle_request(12)
11-23 19:32:50.284 414-414/? I/AEE/AED: check process 32761 name:in.digiscribe
11-23 19:32:50.284 414-414/? I/AEE/AED: tid 328 abort msg address is:0x0000000000000000 si_code is:1 (request from 32761:10454)
11-23 19:32:50.284 414-414/? I/AEE/AED: BOOM: pid=32761 uid=10454 gid=10454 tid=328
11-23 19:32:50.287 414-414/? I/AEE/AED: [OnPurpose Redunant in void preset_info(aed_report_record*, int, int)] pid: 32761, tid: 328, name: Thread-19003  >>> in.digiscribe <<<
11-23 19:32:50.290 414-414/? I/AEE/AED: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-23 19:32:50.291 414-414/? I/AEE/AED: Build fingerprint: 'Lenovo/LenovoTB3-850F/TB3-850F:6.0/MRA58K/TB3-850F_S100031_171010_ROW:user/release-keys'
11-23 19:32:50.292 414-414/? I/AEE/AED: Revision: '0'
11-23 19:32:50.293 414-414/? I/AEE/AED: ABI: 'arm64'
11-23 19:32:50.294 414-414/? I/AEE/AED: pid: 32761, tid: 328, name: Thread-19003  >>> in.digiscribe <<<
11-23 19:32:50.295 414-414/? I/AEE/AED: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
11-23 19:32:50.317 414-414/? I/AEE/AED:     x0   0000007f9576a800  x1   0000000000000000  x2   0000000000000000  x3   0000000000000000
11-23 19:32:50.318 414-414/? I/AEE/AED:     x4   0000000000000002  x5   00000000000000ba  x6   00000000000000bb  x7   0000007fb3bf4000
11-23 19:32:50.318 414-414/? I/AEE/AED:     x8   0000000000000000  x9   0eb59958d3816f06  x10  000000000007baf8  x11  000000000007bc38
11-23 19:32:50.319 414-414/? I/AEE/AED:     x12  0000000000000000  x13  0000007fb3c34000  x14  0000000000000000  x15  0000007fb3c26000
11-23 19:32:50.320 414-414/? I/AEE/AED:     x16  0000007f99fbf048  x17  0000007f99e2acc8  x18  0000007fb3c37f60  x19  0000007f9576a800
11-23 19:32:50.321 414-414/? I/AEE/AED:     x20  0000000000000000  x21  0000000000000000  x22  0000000000000000  x23  0000007f963ff4f0
11-23 19:32:50.322 414-414/? I/AEE/AED:     x24  0000007f93db72fc  x25  0000007fab1a2698  x26  0000007f963ff4f0  x27  0000007f93c35000
11-23 19:32:50.323 414-414/? I/AEE/AED:     x28  0000007fab1a2640  x29  0000007f963ff100  x30  0000007f99e2fc40
11-23 19:32:50.324 414-414/? I/AEE/AED:     sp   0000007f963ff0a0  pc   0000007f99e2ad50  pstate 0000000060000000
11-23 19:32:50.332 414-414/? I/AEE/AED: backtrace:
11-23 19:32:50.333 414-414/? I/AEE/AED:     #00 pc 00000000002aad50  /data/app/in.digiscribe-1/lib/arm64/libLiteCoreJNI.so (_ZN6fleece7Encoder10writeValueEPKNS_5ValueEPKNS_10SharedKeysEPKNS_12function_refIFbS3_S3_EEE+136)
11-23 19:32:50.334 414-414/? I/AEE/AED:     #01 pc 00000000002afc3c  /data/app/in.digiscribe-1/lib/arm64/libLiteCoreJNI.so (FLEncoder_WriteValueWithSharedKeys+44)
11-23 19:32:50.335 414-414/? I/AEE/AED:     #02 pc 0000000000270780  /data/app/in.digiscribe-1/lib/arm64/libLiteCoreJNI.so (_ZN8litecore4repl8DBWorker19_insertRevisionsNowEv+460)
11-23 19:32:50.336 414-414/? I/AEE/AED:     #03 pc 0000000000296480  /data/app/in.digiscribe-1/lib/arm64/libLiteCoreJNI.so (_ZN8litecore5actor15ThreadedMailbox18performNextMessageEv+144)
11-23 19:32:50.337 414-414/? I/AEE/AED:     #04 pc 0000000000296360  /data/app/in.digiscribe-1/lib/arm64/libLiteCoreJNI.so (_ZN8litecore5actor9Scheduler4taskEj+192)
11-23 19:32:50.338 414-414/? I/AEE/AED:     #05 pc 00000000002971ac  /data/app/in.digiscribe-1/lib/arm64/libLiteCoreJNI.so
11-23 19:32:50.338 414-414/? I/AEE/AED:     #06 pc 0000000000067438  /system/lib64/libc.so (_ZL15__pthread_startPv+52)
11-23 19:32:50.339 414-414/? I/AEE/AED:     #07 pc 000000000001ed44  /system/lib64/libc.so (__start_thread+16)
11-23 19:32:50.424 783-783/? E/WifiTrafficPoller: TRAFFIC_STATS_POLL true Token 2073 num clients 14
11-23 19:32:50.424 783-783/? E/WifiTrafficPoller:  packet count Tx=547338 Rx=678517

Previously I posted on below link.
Replication Crashing after turning off Internet CBL 2.0 - #15 by achint.

Regards,
Achint Sarkar

From the logs, it does not appear to be the same issue that was posted earlier . In the earlier case, it was a connectivity issue (ENETUNREACH ) . I don’t see any of those messages here.
Please file a bug ticket on the Android GitHub repo with all the relevant details -

  • Library Version
    – What version of the library is installed on your project

  • Operating System / Device Details
    – The OS of your DEPLOYMENT device

  • Log Output
    –Full stack trace . preferably as a gist if its too long

  • Expected behavior
    – What should have happened? Sometimes differing expectations are the cause of the issue

  • Actual behavior
    – What happened instead?

  • Steps To Reproduce
    – Please be as specific as possible, as if you needed to write an algorithm that performed the task

  • Reproduction Project
    – Please attach a project that reproduces the behavior quickly and reliably. This is optional,
    but it very greatly speeds up the time it takes to resolve the issue.

Hi @priya.rajagopal,

Thanks for the reply. Please find my demo project using this link.

https://drive.google.com/file/d/125EvmZ_VHiANh_ZJe2IE7z27MdUF-fzk/view?usp=sharing

Please request for access. I will give you once you request for it.

Project also contains a word document which have more information about device that i used.

Regards,
Achint Sarkar

Please file the ticket on the appropriate GitHub repo as suggested. If you have already done so, then we can just track it there and avoid duplicate channels of communication.