====== Problems with the database of points&tracks ====== ---- Locus Map uses the SQLite database system for storing data. This database is supported by all Android devices and is considered safe and convenient. However, it can happen that the database gets damaged and the app ends up with an error. ===== How does it look? ===== Usually, the app displays an error message during initialization, informing about the problem with the user database and the **error number 11556**. ===== How to prevent it ===== * **Use the default private directory for the app's data in the internal storage** - working with the data is faster, more stable, and there is almost no chance of damaging the internal memory of the mobile phone - your data is protected better than on an SD card. * If you decide to place the Locus directory on the SD card, please **check occasionally that your card is in good shape**. Use some of the Windows/Linux diagnostic tools for the SD card check-up. We also suggest not to keep Locus backup files only on your SD card, but also at some location outside your phone (Dropbox, OneDrive). ===== How to fix it ===== Unfortunately, there is no guaranteed method of repairing a corrupted database. Actually, there are **three methods that you can try**: **1. Restart your phone** - some errors may be caused by reading or recording on your SD card. Violation of the card may result in database locking, for example. In most cases, a simple restart helps. Then it is highly recommended to check your SD card. **2. Restore backup of your database** - all backup files are stored in Locus/backup directory (automatic backups in the Locus/backup/auto/ directory). This backup is a simple zip file. * Close Locus Map * Connect your phone to a PC via USB and allow data transfer * Open a file browser on the PC and navigate to the Locus/data/database directory on your phone. Move tracks.db and waypoints.db into your PC (it is not necessary, just for greater safety) * Navigate to the directory Locus/backup/auto and find the latest backup file (*.zip) * Unpack the *.zip file * Copy the unzipped tracks.db and waypoints.db to the Locus/data/database folder * Start Locus Map **3. If 1 or 2 fail** - try the following: * go to your phone file browser > find /Locus/data/database/ directory and copy files tracks.db and waypoints.db somewhere out of this directory * uninstall Locus Map * delete the whole /Locus/ directory * re-install Locus Map from Google Play * copy your original files tracks.db and waypoints.db to /Locus/data/database/ - overwrite the newly created ones **4. Advanced method** - visit [[manual:advanced:map_tools:corrupted_sqlite|here >>]]