cgeo / cgeo

c:geo - The powerful Android geocaching app.
www.cgeo.org
Apache License 2.0
1.4k stars 567 forks source link

All stored caches disappeared #12669

Closed RalfJung closed 2 years ago

RalfJung commented 2 years ago

Describe your problem!

I was using the app, exploring a stored cache list on the map, checking which caches to explore on a short hike. I opened a multi cache and clicked "more information", which strangely did not work. I tapped the button a few more times, until suddenly the cache window closed and a notification said something about cache details not having been found. And now all my stored caches are gone! I had several hundred caches stored in a few lists, but when I open c:geo now none of them show up. I tried rebooting my phone, to now avail. c:geo still logs in to my accounts, but all the stored caches and offline logs seem to be completely gone.

I assume the data is gone for good, and it's not the world's end, but I figured it might still be worth to notify you of this problem.

How to reproduce?

The problem is not reproducible, it seems. (Opening the same cache again now works just fine.)

Actual result after these steps?

No response

Expected result after these steps?

No response

Reproducible

No

c:geo Version

2021.12.24

System information

## System information

c:geo version: 2021.12.24

Device:
-------
- Device type: moto g(7) power (ocean, motorola)
- Available processors: 8
- Android version: 11
- Android build: lineage_ocean-userdebug 11 RQ3A.211001.001 eng.root.20211020.235229 dev-keys
- Screen resolution: 720x1371px (360x685dp)
- Pixel density: 2.0
- System font scale: 1.0 / used scale: 1.0
- Sailfish OS detected: false
- Google Play services: enabled - 0.2.22.212658

Sensor and location:
-------
- Low power mode: inactive
- Compass capabilities: no
- Rotation vector sensor: absent
- Orientation sensor: absent
- Magnetometer & Accelerometer sensor: absent
- Direction sensor used: magnetometer & accelerometer

Program settings:
-------
- Settings: v8, Count:155
- Set language: de_DE (system default)
- System date format: dd.MM.yy
- Time zone: GMT+01:00
- Debug mode active: no
- Last backup: never
- Routing mode: Walk
- Live map mode: false
- OSM multi-threading: false / threads: 1
- Map: OpenStreetMap.de
  - Id: cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider$OsmdeMapSource
  - Atts: © OpenStreetMap DE, map data OpenStreetMap contributors
  - Theme: none

Filters:
-------
- Hide waypoints: -
- LIVE: Cache-Typ:5 Elemente ([:inconclusive=false:advanced=false]AND(type:CITO:ADVLAB:USER_DEFINED:TRADITIONAL:MULTI;difficulty_terrain:d=-:d=-:t=-:t=-;status))
- OFFLINE: Keine ([:inconclusive=false:advanced=false]AND(type;difficulty_terrain:d=-:d=-:t=-:t=-;status))

Services:
-------
- Geocaching sites enabled:
   geocaching.com: Logged in (Anmeldung OK) / BASIC
   opencaching.de: Logged in (Anmeldung OK)
- Geocaching.com date format: M/d/yyyy
- Routing: external / BRouter installed: false
- Installed c:geo plugins:  none

Permissions & paths:
-------
- Fine location permission: granted
- Write external storage permission: granted
- System internal c:geo dir: /data/user/0/cgeo.geocaching (36,9 GB free) v3 internal isDir(6 entries)
- Legacy User storage c:geo dir: /storage/emulated/0/cgeo (36,9 GB free) v3 external non-removable isDir(7 entries)
- Geocache data: /storage/25AC-1ADF/Android/data/cgeo.geocaching/files/GeocacheData (13,5 GB free) v3 external removable isDir(417 entries)
- Internal theme sync (is turned off): /data/user/0/cgeo.geocaching/MapThemeData (36,9 GB free) v3 internal isDir(0 entries)
- Public Folders: #11
  - BASE: /cgeo (User-Defined)[/cgeo[DOCUMENT#0:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo, Av:true, files:>=0, dirs:>=7, totalFileSize:>=0 B, free space: 36,9 GB, files on device: 12965888)
  - OFFLINE_MAPS: SD-Karte von SanDisk/CGeoMaps (User-Defined)[SD-Karte von SanDisk/CGeoMaps[DOCUMENT#0:p-content://com.android.externalstorage.documents/tree/25AC-1ADF%3ACGeoMaps::]] (Uri: content://com.android.externalstorage.documents/tree/25AC-1ADF%3ACGeoMaps/document/25AC-1ADF%3ACGeoMaps, Av:true, files:4, dirs:1, totalFileSize:3,2 GB, free space: 13,5 GB, files on device: 0)
  - OFFLINE_MAP_THEMES: SD-Karte von SanDisk/CGeoMaps/_themes (Default)[SD-Karte von SanDisk/CGeoMaps/_themes[PERSISTABLE_FOLDER(OFFLINE_MAPS)#1:p-content://com.android.externalstorage.documents/tree/25AC-1ADF%3ACGeoMaps::/_themes]] (Uri: content://com.android.externalstorage.documents/tree/25AC-1ADF%3ACGeoMaps/document/25AC-1ADF%3ACGeoMaps%2F_themes, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 13,5 GB, files on device: 0)
  - LOGFILES: /cgeo/logfiles (Default)[/cgeo/logfiles[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/logfiles]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Flogfiles, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: 12965888)
  - GPX: /cgeo/gpx (Default)[/cgeo/gpx[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/gpx]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Fgpx, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: 12965888)
  - BACKUP: /cgeo/backup (Default)[/cgeo/backup[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/backup]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Fbackup, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: 12965888)
  - FIELD_NOTES: /cgeo/field-notes (Default)[/cgeo/field-notes[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/field-notes]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Ffield-notes, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: 12965888)
  - SPOILER_IMAGES: /cgeo/GeocachePhotos (Default)[/cgeo/GeocachePhotos[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/GeocachePhotos]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2FGeocachePhotos, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: 12965888)
  - ROUTING_BASE: /cgeo/routing (Default)[/cgeo/routing[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/routing]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Frouting, Av:true, files:7, dirs:1, totalFileSize:81,2 KB, free space: 36,9 GB, files on device: 12965888)
  - ROUTING_TILES: /cgeo/routing/segments4 (Default)[/cgeo/routing/segments4[PERSISTABLE_FOLDER(ROUTING_BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/routing/segments4]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Frouting%2Fsegments4, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: 12965888)
  - TEST_FOLDER: [Legacy]/data/user/0/cgeo.geocaching/files/unittest (Default)[/data/user/0/cgeo.geocaching/files/unittest[FILE#1:p-file:///data/user/0/cgeo.geocaching/files::/unittest]] (Uri: file:///data/user/0/cgeo.geocaching/files/unittest, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 36,9 GB, files on device: -1)
- Map render theme path: 
- PersistedDocumentUris: #1
- TRACK: null
- Persisted Uri Permissions: #2
  - content://com.android.externalstorage.documents/tree/25AC-1ADF%3ACGeoMaps (31. Juli 2021, 17:31):RW
  - content://com.android.externalstorage.documents/tree/primary%3Acgeo (31. Juli 2021, 17:32):RW
- Database: /data/user/0/cgeo.geocaching/databases/data (v98, Size:836,0 KB) on system internal storage

--- End of system information ---

Additional Information

No response

Lineflyer commented 2 years ago

Its difficult to judge what happened from remote. It sounds like some fatal database crash/error, in which case c:geo will drop the faulty database.

If this has happend just recently, please do go to c:geo Menu - Settings - System and generate a log file. Not sure though if those logs are still available after the reboot.

@cgeo/team AFAIR the dropped database will be dumped in some file?!

RalfJung commented 2 years ago

This happened just before I reported the issue, but when I just dumped a log that only went back a few minutes. I guess I should have done that immediately...

It sounds like some fatal database crash/error, in which case c:geo will drop the faulty database.

That was my first guess as well.

Lineflyer commented 2 years ago

@RalfJung Can you take a look whether your folder /cgeo/backup contains a file named cgeo.corrupted or cgeo.sqlite.corrupted ? If yes, please kindly send it to support@cgeo.org referencing this issue (#12669).

RalfJung commented 2 years ago

There is a cgeo/backup folder (in my home directory or whatever that is called in Android -- the part of the file system that I can easily access with a file explorer without root), but that folder seems to be empty. I also checked via adb shell and /storage/self/primary/cgeo/backup is empty.

Lineflyer commented 2 years ago

Sorry, so that probably means there is no chance to recover any data. I also could not imagine a way to find out what caused this database corruption. Not sure how to continue.

Lineflyer commented 2 years ago

Closing here as there is no possible way to analyze this case. Such total DB corruptions are very rarely reported after all and in most cases the "corrupted" dump is available to try to recover.