new DuringSplashScreen().runDuringSplashScreen() fails on first run
See original GitHub issueIssue Type
[x] Improvement
Description and/or steps/code to reproduce the problem
When starting the new DuringSplashScreen().runDuringSplashScreen()
on Splash of a freshly installed app, it seems to break, since the database is not yet existing.
07-19 19:31:35.037 8155-8256/de.spieleck.app.badgers.debug E/SQLiteLog: (14) cannot open file at line 31278 of [2ef4f3a5b1]
(14) os_unix.c:31278: (13) open(/storage/emulated/0/osmdroid/tiles/cache.db) -
Would be most convenient, if it checked for existence of the database first.
Currently it seems to work now when used like
onCreate(...) {
...
AsyncSomething.execute(new Runnable() {
@Override
public void run() {
try {
new DuringSplashScreen().runDuringSplashScreen();
} catch ( Exception ignore ) { }
}
});
...
}
simply
new DuringSplashScreen().runDuringSplashScreen();
would be nicer maybe.
If it’s a bug, version(s) of android this affects:
Probably All
Version of osmdroid the issue relates to:
6.0.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Index (osmdroid-android 6.1.1 API)
DuringSplashScreen() - Constructor for class org.osmdroid.util.DuringSplashScreen ... Returns the expiry time of the tile that expires first. getFocus() ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@InI4 Couldn’t reproduce this bug with the demo app, even when it was removed then reinstalled. And when I have a look at the code, I don’t understand in which cases it should happen when calling
new DuringSplashScreen().runDuringSplashScreen
:… as the
SqlTileWriter
constructor calls itsgetDb
method, that precisely creates thecache.db
file and the database.I’m puzzled. Are you able to reproduce this bug on the demo app?
@InI4 I just wanted to be able to reproduce this issue, and the demo app was appropriate for that. I don’t know that much about device/android version issues. The best you can do is perhaps to track step by step what goes wrong, given that: