question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

new DuringSplashScreen().runDuringSplashScreen() fails on first run

See original GitHub issue

Issue 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:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
monsieurtanukicommented, Jul 20, 2018

@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:

final SqlTileWriter sqlTileWriter = new SqlTileWriter();
sqlTileWriter.runDuringSplashScreen();

… as the SqlTileWriter constructor calls its getDb method, that precisely creates the cache.db file and the database.

I’m puzzled. Are you able to reproduce this bug on the demo app?

0reactions
monsieurtanukicommented, Jul 24, 2018

@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:

  • from reading the code, I can say it’s not supposed to happen
  • I was not able to reproduce this issue
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found