Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when MBTiles is invalid #161

Open
mojodna opened this issue Nov 17, 2016 · 0 comments
Open

Crash when MBTiles is invalid #161

mojodna opened this issue Nov 17, 2016 · 0 comments

Comments

@mojodna
Copy link
Member

mojodna commented Nov 17, 2016

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant