You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Let's imagine this example in the Android world - we set a custom database path, receive a callback that the path has been successfully set and immediately change the path again while removing the previous directory. Pseudocode:
fileSource.changePath(TEST_PATH) {
fileSource.changePath(ORIGINAL_PATH) {
val testFile = File(TEST_PATH)
if (testFile.exists()) {
testFile.deleteRecursively()
}
}
}
Because we can change the path only when the default_file_source is not active, which means that its thread is going to be paused, those updates are going to be queued in the actor's queue and executed when we activate the default_file_source next time around, for example when launching the map. The issue is, that the first update's path (TEST_PATH) doesn't exist anymore and we're going to run into a
abort_message: assertion "terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file" failed'
To resolve this issue, we can either verify the path again in the OfflineDatabase::initialize, or overwrite the updates and run only the latest one when the default_file_source's thread is resumed.
The text was updated successfully, but these errors were encountered:
Let's imagine this example in the Android world - we set a custom database path, receive a callback that the path has been successfully set and immediately change the path again while removing the previous directory. Pseudocode:
Because we can change the path only when the
default_file_source
is not active, which means that its thread is going to be paused, those updates are going to be queued in theactor
's queue and executed when we activate thedefault_file_source
next time around, for example when launching the map. The issue is, that the first update's path (TEST_PATH
) doesn't exist anymore and we're going to run into aTo resolve this issue, we can either verify the path again in the
OfflineDatabase::initialize
, or overwrite the updates and run only the latest one when thedefault_file_source
's thread is resumed.The text was updated successfully, but these errors were encountered: