Hi, I'm looking for a way to stop the UtraliteJ synchronization in the Android API. I've seen in another question that the best way to do it, it is return true from a SyncObserver. However, it isn't solve my use case. I need to interrupt synchronously the synchronism process when I close my application. I've tried to call the DatabaseManager.release(), but it crashes the ultralite JNI: > 05-05 17:15:37.797: I/DEBUG(4151): backtrace: > 05-05 17:15:37.797: I/DEBUG(4151): #00 pc 00018086 /system/lib/libc.so > 05-05 17:15:37.797: I/DEBUG(4151): #01 pc 0000dbd4 /system/lib/libc.so (abort+4) > 05-05 17:15:37.797: I/DEBUG(4151): #02 pc 00076281 /data/data/mypackage/lib/libultralitej12.so (ULHardStop()+72) > 05-05 17:15:37.797: I/DEBUG(4151): #03 pc 0007705f /data/data/mypackage/lib/libultralitej12.so > 05-05 17:15:37.797: I/DEBUG(4151): #04 pc 000774e3 /data/data/mypackage/lib/libultralitej12.so (ulpp\_disconnect\_by\_num(\_sqlca\*, unsigned char)+58) > 05-05 17:15:37.797: I/DEBUG(4151): #05 pc 000a5d73 /data/data/mypackage/lib/libultralitej12.so (dbpp_disconnect+50) > 05-05 17:15:37.797: I/DEBUG(4151): #06 pc 000b2373 /data/data/mypackage/lib/libultralitej12.so (ULConnectionImpl::Close(ULError\*)+18) > 05-05 17:15:37.797: I/DEBUG(4151): #07 pc 0004844d /data/data/mypackage/lib/libultralitej12.so (Java\_com\_ianywhere\_ultralitejni12\_implementation\_JniConnection\_release+100) Is there any different way to interrupt synchronously the synchronism process ? asked 05 May '14, 17:42 Marcelo Papa... Breck Carter |
Have you confirmed that the observer is returning the true at the time that you want to cancel the sync.
Can you provide a more detail on the version and build that you are running and describe how you are implementing the release in your code (at a high level).
Hi Chris,
The version and build that I'm using is 12.0.1 build 3994.
I'm releasing all ultralite connections (being the sync connection one of them) by calling the method DatabaseManager.release() when the application is going to be closed.
I believe that the problem is related with two different threads (sync and application finishing) interacting with the database. The documentation said that is recommended to call the release only once by a single thread when the application is finished.