Skip to content

Crash when MBTiles is invalid #161

@mojodna

Description

@mojodna

With 1.1:

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.redcross.openmapkit/org.redcross.openmapkit.MapActivity}: android.database.sqlite.SQLiteDatabaseCorruptException: file is encrypted or is not a database (code 26): , while compiling: SELECT value FROM metadata WHERE name = ?
    at org.redcross.openmapkit.Basemap.selectMBTilesBasemap(Basemap.java:204)
    at org.redcross.openmapkit.Basemap.<init>(Basemap.java:60)
    at org.redcross.openmapkit.MapActivity.onCreate(MapActivity.java:152)

Indeed, the MBTiles archive is not a database. Rather, it's a text file with the contents of http://posm.io.

I suspect that this happened because the list of available deployments was cached; more in #162.

(I think this was the error that was repeatedly causing OMK to crash while I was attempting to demo in Brussels.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions