0.56.2 keeps crashing on startup #74

Closed
opened 2021-06-29 06:23:23 +00:00 by arwagner · 30 comments

Updating 0.56.1 to 0.56.2 using the apks provided here:

  1. Try:
  • The application starts and displays the news
  • Start reading
  • After a few seconds -> The application keeps crashing -> Closed
  1. Try:
  • The application starts and displays the news
  • Click Continue
  • The application prepares data, this counts up to 100%
  • The application keeps crashing -> Closed
  1. Try:
  • Clean cache
  • Revert to Try 1 -> same result
  • Clean cache
  • Try 2 -> same result
  1. Try:
  • Reboot
  • Tries 1..3, still no luck
  1. Try:
  • Clean Cache
  • Clean User data
  • Tries 1..3, still no luck
  1. Try:
  • Remove widget
  • Clean Cache
  • Clean User data
  • 1..3, still no luck
  1. Try:
  • Deinstall everything and start from scratch
  • Same as 1 and 2
  1. Revert to 0.56.1
  • All seems well again. Data is prepared etc.
  • I end up in Hamburg Innenstadt, so we are on the defaults
  • All is well
  • Update this fresh install to 0.56.2
  • Same as above
  1. Try:
  • RC1 .. 3 from the user debugs. I see this behaviour in all of them. So it seems to happen since RC1.

Unfortunately, I see no way to provide any further debug info.

Updating 0.56.1 to 0.56.2 using the apks provided here: 1. Try: - The application starts and displays the news - Start reading - After a few seconds -> _The application keeps crashing_ -> Closed 2. Try: - The application starts and displays the news - Click Continue - The application prepares data, this counts up to 100% - _The application keeps crashing_ -> Closed 3. Try: - Clean cache - Revert to Try 1 -> same result - Clean cache - Try 2 -> same result 4. Try: - Reboot - Tries 1..3, still no luck 5. Try: - Clean Cache - Clean User data - Tries 1..3, still no luck 6. Try: - Remove widget - Clean Cache - Clean User data - 1..3, still no luck 7. Try: - Deinstall everything and start from scratch - Same as 1 and 2 8. Revert to 0.56.1 - All seems well again. Data is prepared etc. - I end up in _Hamburg Innenstadt_, so we are on the defaults - All is well - Update this fresh install to 0.56.2 - Same as above 9. Try: - RC1 .. 3 from the user debugs. I see this behaviour in all of them. So it seems to happen since RC1. Unfortunately, I see no way to provide any further debug info.
Starfish added the
bug
label 2021-07-03 17:59:47 +00:00

This is a (tricky) bug in the new stationSearchEngine. Hopefully fixed: 09094109b5

Interesting fact: I was able to reproduce it when the device was in landscape mode and the launcher was fixed to portrait mode.

As long as the device and launcher were in portrait mode, the app did not crash.

This is somehow wired, because it should not make a difference.

You can test a userdebug, if you like:
https://kaffeemitkoffein.de/nextcloud/index.php/s/4SXHaLxLSmFd8Ri

I would be happy if you could cofirm that this is fixed now, because somehow it still looks wired that the device orientation seems to play a role here ....

This is a (tricky) bug in the new stationSearchEngine. Hopefully fixed: https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/09094109b5519d3983e93a16d5b4ba353e0b566b Interesting fact: I was able to reproduce it when the device was in landscape mode and the launcher was fixed to portrait mode. As long as the device and launcher were in portrait mode, the app did not crash. This is somehow wired, because it should *not* make a difference. You can test a userdebug, if you like: https://kaffeemitkoffein.de/nextcloud/index.php/s/4SXHaLxLSmFd8Ri I would be happy if you could cofirm that this is fixed now, because somehow it still looks wired that the device orientation seems to play a role here ....

This will very likely harden the app start as well: 970a563ef1

The initial processing of the area database (which needs to be done only once!) previously could be interrupted by screen rotation, which led to an incomplete database, which as a result needed to be processed again.

This did not lead to an app crash, but now the screen rotation is locked for a couple of seconds until the database processing finishes.

There was also an issue with the progress dialog crashing when the screen got rotated during processing. The same applies to the "What is new" dialog.

Both are now being closed properly when the activity gets destroyed, e.g. due to device rotation.

Both should harden the app start significantly and prevent some crashes.

This will very likely harden the app start as well: https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/970a563ef125f33c26e66d01eaaf9f64060212bb The initial processing of the area database (which needs to be done only once!) previously could be interrupted by screen rotation, which led to an incomplete database, which as a result needed to be processed again. This did *not* lead to an app crash, but now the screen rotation is locked for a couple of seconds until the database processing finishes. There was also an issue with the progress dialog crashing when the screen got rotated during processing. The same applies to the "What is new" dialog. Both are now being closed properly when the activity gets destroyed, e.g. due to device rotation. Both should harden the app start significantly and prevent some crashes.

Interesting fact: I was able to reproduce it when the device was in landscape mode and the launcher was fixed to portrait mode.

Hm. I did not do any rotations.

As long as the device and launcher were in portrait mode, the app did not crash.

Hm/2. It was all in portrait.

You can test a userdebug, if you like

Did this ASAP and gave

TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210704-03-fixed_dialogs

a try. Unfortunately, "It is my sad duity to inform you..." I did not do all cycles above, but even with deinstall and fresh install and after a reboot, I was out of luck. :(

It starts building the database and almost as it hits the 100% The application keeps crashing and it's dead. The funny thing is, from a glimpse at the background it seems that it did already fetch data for my usual or the default location. I even see it in the task list with a proper display. As soon as I switch to the app boom.

Usually I have a widget placed on my home screen but the behaviour does not depend on it's existence, if this is of any help.

If I can provide any additional intel, please let me know.

> Interesting fact: I was able to reproduce it when the device was in landscape mode and the launcher was fixed to portrait mode. Hm. I did not do any rotations. > As long as the device and launcher were in portrait mode, the app did not crash. Hm/2. It was all in portrait. > You can test a userdebug, if you like Did this ASAP and gave TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210704-03-fixed_dialogs a try. Unfortunately, "It is my sad duity to inform you..." I did not do all cycles above, but even with deinstall and fresh install and after a reboot, I was out of luck. :( It starts building the database and almost as it hits the 100% `The application keeps crashing` and it's dead. The funny thing is, from a glimpse at the background it seems that it _did_ already fetch data for my usual or the default location. I even see it in the task list with a proper display. As soon as I switch to the app `boom`. Usually I have a widget placed on my home screen but the behaviour does _not_ depend on it's existence, if this is of any help. If I can provide any additional intel, please let me know.

There was a running condition in the weather warnings, resulting in the possibility that warnings were being read and processed before the area database was ready. This is fixed now: 4d1192ab18

Please try the latest userdebug.

There was a running condition in the weather warnings, resulting in the possibility that warnings were being read and processed before the area database was ready. This is fixed now: https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/4d1192ab18eb6554a5fbff99f5ad4b12b068d85f Please try the latest userdebug.

Please try the latest userdebug.

Unfortunately, it still dies at the same point, as far as I can judge it at least. Is there a possibility for some poor mans debugging like a print() if a function enters and/or ends? I fear my report is not really helpful at the moment as I see a "something is broken somewhere", but I have no idea where.

> Please try the latest userdebug. Unfortunately, it still dies at the same point, as far as I can judge it at least. Is there a possibility for some _poor mans debugging_ like a `print()` if a function enters and/or ends? I fear my report is not really helpful at the moment as I see a "something is broken somewhere", but I have no idea where.

Ok, we'll solve it. 😃

Please try the userdebug named error_dialog, it should display any error without crashing and it will copy the error to the clipboard.

When you enable logging, it will also put the error message in the log.

Ok, we'll solve it. 😃 Please try the userdebug named *error_dialog*, it should display any error without crashing and it will copy the error to the clipboard. When you enable logging, it will also put the error message in the log.

Please try the userdebug named error_dialog, it should display any error without crashing and it will copy the error to the clipboard.

So, we see some restiction to the issue here: it still displays the what's new, it still builds the area database but it dies before this function has a chance to kick in. IOW I do not get any display nor any text in the clipboard (Markor only offers select no paste)

> Please try the userdebug named error_dialog, it should display any error without crashing and it will copy the error to the clipboard. So, we see some restiction to the issue here: it still displays the `what's new`, it still builds the area database but it dies _before_ this function has a chance to kick in. IOW I do not get any display nor any text in the clipboard (Markor only offers `select` no `paste`)

When you enable logging, it will also put the error message in the log.

How would I do this? Point is: after the update I can not access any menues as it's dead before I have access. I set it on the 0.56, so I guess it carries over, but then how would I access the log if I can't got to the menu item to read it?

> When you enable logging, it will also put the error message in the log. How would I do this? Point is: after the update I can not access any menues as it's dead before I have access. I set it on the 0.56, so I guess it carries over, but then how would I access the log if I can't got to the menu item to read it?

What is your Android version? 10?

What is your Android version? 10?

What is your Android version?

Android 9 in the SONY flavour, running on a XPeria XZ1 compact (G8441).

> What is your Android version? Android 9 in the SONY flavour, running on a XPeria XZ1 compact (G8441).

There is one thing that changed in the code that is not apparent to the user: the xml files have been re-designed in preparation of a theme support, so that the app will be able to easily switch between different themes and will be able to respect the dark/light theming of the device that is supported in recent apis.

There was also a stupid thing in version 0.56.2: setContentView was called before setTheme. It is possible that your flavour did not tolerate this, as it is advised not to inflate any views before the setTheme call. This is a bug, however, all devices but your's seem to tolerate it. I have not received any crash reports besides this one for 0.56.2. This might solve the issue, as this has been fixed.

I also improved the check for internet connection so that it does not use any classes that are deprecated in api 29. In fact, the check is now done differently on any phone having api 23 or higher. Perhaps this was a cause, too.

Should your app keep crashing with 0.56.3, I will redesign the logging so that userdebug versions will cache logging and will present critical errors on next app launch without really starting the app. In this way, we will be able to trace what happens.

Don't worry, we will get the app working on your device sooner or later. :-)

There is one thing that changed in the code that is not apparent to the user: the xml files have been re-designed in preparation of a theme support, so that the app will be able to easily switch between different themes and will be able to respect the dark/light theming of the device that is supported in recent apis. There was also a stupid thing in version 0.56.2: setContentView was called *before* setTheme. It is possible that your flavour did not tolerate this, as it is advised not to inflate any views *before* the setTheme call. This is a bug, however, all devices but your's seem to tolerate it. I have not received any crash reports besides this one for 0.56.2. This might solve the issue, as this has been fixed. I also improved the check for internet connection so that it does not use any classes that are *deprecated* in api 29. In fact, the check is now done differently on any phone having api 23 or higher. Perhaps this was a cause, too. Should your app *keep crashing with 0.56.3*, I will redesign the logging so that userdebug versions will cache logging and will present critical errors on next app launch without really starting the app. In this way, we will be able to trace what happens. Don't worry, we will get the app working on your device sooner or later. :-)

Should your app keep crashing with 0.56.3

I fear, I have to report that it does. 🤔

However, accidentally there is some progress. It does not crash, if I disable the rain radar. This is also true for the 0.52.x userdebugs. As soon as I switch off the rain radar all of them start up fine. Switch on the radar, leave settings, it starts to build a database and as soon this is finished or very near the end it crashes.

I did install 0.56.1 switch off the radar (it's on by default, hence I need a working version to do this) and then I can happily update. As soon as I enable the radar in any version I tried, back to square 1.

> Should your app keep crashing with 0.56.3 I fear, I have to report that it does. 🤔 **However**, accidentally there is some progress. It does not crash, if I _disable_ the rain radar. This is also true for the 0.52.x userdebugs. As soon as I switch off the rain radar all of them start up fine. Switch on the radar, leave settings, it starts to build a database and as soon this is finished or very near the end it crashes. I did install 0.56.1 switch off the radar (it's on by default, hence I need a working version to do this) and then I can happily update. As soon as I enable the radar in any version I tried, back to square 1.

Also note that some change reintroduced the black menu text on dark background we already had. (My device runs in eternal night mode.)

The other difference I know of compared to the mot usual setup here in Germany, but not sure this is related, its language is set to English. (I really don't likeGerman for software).

Also note that some change reintroduced the black menu text on dark background we already had. (My device runs in eternal night mode.) The other difference I know of compared to the mot usual setup here in Germany, but not sure this is related, its language is set to English. (I really don't likeGerman for software).

I have the same issue it seems. Also German locale, but English language set. Phone has a hardware keyboard, but was not rotated during the test run. Running on Lineage 16 / Android 9.
Here is some logcat I got from Version 0.56.3 (first start of the app after clearing storage):

07-15 10:18:13.211  1314 20859 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=de.kaffeemitkoffein.tinyweatherforecastgermany/.WelcomeActivity bnds=[232,1103][437,1417]} from uid 10023
07-15 10:18:13.290  1314  1417 I ActivityManager: Start proc 29023:de.kaffeemitkoffein.tinyweatherforecastgermany/u0a180 for activity de.kaffeemitkoffein.tinyweatherforecastgermany/.WelcomeActivity
...
7-15 10:18:16.092   629   707 D SurfaceFlinger: duplicate layer name: changing de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity to de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity#2
07-15 10:18:16.106 29023 29050 D NetworkSecurityConfig: No Network Security Config specified, using platform default
07-15 10:18:16.203   819   819 W android.hardware.power@1.3-service.pro1: Acquire: called while uninitialized
07-15 10:18:16.203   819   819 W android.hardware.power@1.3-service.pro1: Acquire: called while uninitialized
07-15 10:18:16.236 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null
07-15 10:18:16.240 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null
...
07-15 10:18:16.255 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:16.256 29023 29031 I chatty  : uid=10180(de.kaffeemitkoffein.tinyweatherforecastgermany) FinalizerDaemon identical 2 lines
07-15 10:18:16.256 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:16.469 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null
07-15 10:18:16.504 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:16.504 29023 29031 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
07-15 10:18:16.504 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:16.505 29023 29031 W SQLiteLog: (28) file unlinked while open: /data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas
07-15 10:18:16.505 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:16.505 29023 29031 W System  : A resource failed to call end. 
07-15 10:18:16.590 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null
07-15 10:18:16.688 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:16.688 29023 29031 W System  : A resource failed to call close. 
...
07-15 10:18:17.638 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification removed: de.kaffeemitkoffein.tinyweatherforecastgermany: null
07-15 10:18:17.726  1314  1314 I NotificationService: Cannot find enqueued record for key: 0|de.kaffeemitkoffein.tinyweatherforecastgermany|-1455509085|null|10180
...
07-15 10:18:20.072 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:20.072 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:20.072 29023 29031 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/textforecasts' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
07-15 10:18:20.072 29023 29031 W System  : A resource failed to call close. 
07-15 10:18:20.073 29023 29031 W System  : A resource failed to call close. 
....

07-15 10:18:21.468   629  2390 W SurfaceFlinger: Attempting to set client state on removed layer: de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity#1
07-15 10:18:21.468   629  2390 W SurfaceFlinger: Attempting to destroy on removed layer: de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity#1
...
07-15 10:18:22.299 29023 29023 E SQLiteLog: (522) disk I/O error
07-15 10:18:22.300 29023 29023 E SQLiteDatabase: Failed to open database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas'.
07-15 10:18:22.300 29023 29023 E SQLiteDatabase: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAreas(Areas.java:202)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarning.initPolygons(WeatherWarning.java:115)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings.getCurrentWarnings(WeatherWarnings.java:61)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings$getWarningsForLocationRunnable.<init>(WeatherWarnings.java:108)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$15.<init>(MainActivity.java:839)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.checkIfWarningsApply(MainActivity.java:839)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.access$000(MainActivity.java:51)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$19$2.run(MainActivity.java:1116)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.os.Handler.handleCallback(Handler.java:873)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.os.Handler.dispatchMessage(Handler.java:99)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.os.Looper.loop(Looper.java:193)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at android.app.ActivityThread.main(ActivityThread.java:6718)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at java.lang.reflect.Method.invoke(Native Method)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
07-15 10:18:22.300 29023 29023 E SQLiteDatabase:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: Couldn't open areas for writing (will try read-only):
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAreas(Areas.java:202)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarning.initPolygons(WeatherWarning.java:115)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings.getCurrentWarnings(WeatherWarnings.java:61)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings$getWarningsForLocationRunnable.<init>(WeatherWarnings.java:108)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$15.<init>(MainActivity.java:839)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.checkIfWarningsApply(MainActivity.java:839)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.access$000(MainActivity.java:51)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$19$2.run(MainActivity.java:1116)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.os.Handler.handleCallback(Handler.java:873)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.os.Handler.dispatchMessage(Handler.java:99)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.os.Looper.loop(Looper.java:193)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at android.app.ActivityThread.main(ActivityThread.java:6718)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at java.lang.reflect.Method.invoke(Native Method)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper:      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
07-15 10:18:22.301 29023 29023 E SQLiteLog: (522) statement aborts at 1: [PRAGMA user_version;] disk I/O error
07-15 10:18:22.352 29023 29047 E SQLiteLog: (522) disk I/O error
07-15 10:18:22.353 29023 29047 E SQLiteDatabase: Failed to open database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas'.
07-15 10:18:22.353 29023 29047 E SQLiteDatabase: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAllAreaNames(Areas.java:238)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas$AreaNameReader.run(Areas.java:266)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-15 10:18:22.353 29023 29047 E SQLiteDatabase:        at java.lang.Thread.run(Thread.java:764)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: Couldn't open areas for writing (will try read-only):
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAllAreaNames(Areas.java:238)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas$AreaNameReader.run(Areas.java:266)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper:      at java.lang.Thread.run(Thread.java:764)
07-15 10:18:22.354 29023 29047 E SQLiteLog: (522) statement aborts at 1: [PRAGMA user_version;] disk I/O error
07-15 10:18:22.356 29023 29047 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1
07-15 10:18:22.356 29023 29047 E AndroidRuntime: Process: de.kaffeemitkoffein.tinyweatherforecastgermany, PID: 29023
07-15 10:18:22.356 29023 29047 E AndroidRuntime: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:648)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:842)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:830)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:956)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:371)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAllAreaNames(Areas.java:238)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas$AreaNameReader.run(Areas.java:266)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-15 10:18:22.356 29023 29047 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)
07-15 10:18:22.359  1314 17398 W ActivityManager:   Force finishing activity de.kaffeemitkoffein.tinyweatherforecastgermany/.MainActivity
07-15 10:18:22.364 29023 29047 I Process : Sending signal. PID: 29023 SIG: 9

I have the same issue it seems. Also German locale, but English language set. Phone has a hardware keyboard, but was not rotated during the test run. Running on Lineage 16 / Android 9. Here is some logcat I got from Version 0.56.3 (first start of the app after clearing storage): ``` 07-15 10:18:13.211 1314 20859 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=de.kaffeemitkoffein.tinyweatherforecastgermany/.WelcomeActivity bnds=[232,1103][437,1417]} from uid 10023 07-15 10:18:13.290 1314 1417 I ActivityManager: Start proc 29023:de.kaffeemitkoffein.tinyweatherforecastgermany/u0a180 for activity de.kaffeemitkoffein.tinyweatherforecastgermany/.WelcomeActivity ... 7-15 10:18:16.092 629 707 D SurfaceFlinger: duplicate layer name: changing de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity to de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity#2 07-15 10:18:16.106 29023 29050 D NetworkSecurityConfig: No Network Security Config specified, using platform default 07-15 10:18:16.203 819 819 W android.hardware.power@1.3-service.pro1: Acquire: called while uninitialized 07-15 10:18:16.203 819 819 W android.hardware.power@1.3-service.pro1: Acquire: called while uninitialized 07-15 10:18:16.236 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null 07-15 10:18:16.240 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null ... 07-15 10:18:16.255 29023 29031 W System : A resource failed to call close. 07-15 10:18:16.256 29023 29031 I chatty : uid=10180(de.kaffeemitkoffein.tinyweatherforecastgermany) FinalizerDaemon identical 2 lines 07-15 10:18:16.256 29023 29031 W System : A resource failed to call close. 07-15 10:18:16.469 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null 07-15 10:18:16.504 29023 29031 W System : A resource failed to call close. 07-15 10:18:16.504 29023 29031 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed. 07-15 10:18:16.504 29023 29031 W System : A resource failed to call close. 07-15 10:18:16.505 29023 29031 W SQLiteLog: (28) file unlinked while open: /data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas 07-15 10:18:16.505 29023 29031 W System : A resource failed to call close. 07-15 10:18:16.505 29023 29031 W System : A resource failed to call end. 07-15 10:18:16.590 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification posted: de.kaffeemitkoffein.tinyweatherforecastgermany: null 07-15 10:18:16.688 29023 29031 W System : A resource failed to call close. 07-15 10:18:16.688 29023 29031 W System : A resource failed to call close. ... 07-15 10:18:17.638 24166 24166 D nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Notification removed: de.kaffeemitkoffein.tinyweatherforecastgermany: null 07-15 10:18:17.726 1314 1314 I NotificationService: Cannot find enqueued record for key: 0|de.kaffeemitkoffein.tinyweatherforecastgermany|-1455509085|null|10180 ... 07-15 10:18:20.072 29023 29031 W System : A resource failed to call close. 07-15 10:18:20.072 29023 29031 W System : A resource failed to call close. 07-15 10:18:20.072 29023 29031 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/textforecasts' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed. 07-15 10:18:20.072 29023 29031 W System : A resource failed to call close. 07-15 10:18:20.073 29023 29031 W System : A resource failed to call close. .... 07-15 10:18:21.468 629 2390 W SurfaceFlinger: Attempting to set client state on removed layer: de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity#1 07-15 10:18:21.468 629 2390 W SurfaceFlinger: Attempting to destroy on removed layer: de.kaffeemitkoffein.tinyweatherforecastgermany/de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity#1 ... 07-15 10:18:22.299 29023 29023 E SQLiteLog: (522) disk I/O error 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: Failed to open database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas'. 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAreas(Areas.java:202) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarning.initPolygons(WeatherWarning.java:115) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings.getCurrentWarnings(WeatherWarnings.java:61) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings$getWarningsForLocationRunnable.<init>(WeatherWarnings.java:108) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$15.<init>(MainActivity.java:839) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.checkIfWarningsApply(MainActivity.java:839) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.access$000(MainActivity.java:51) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$19$2.run(MainActivity.java:1116) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.os.Handler.handleCallback(Handler.java:873) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.os.Handler.dispatchMessage(Handler.java:99) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.os.Looper.loop(Looper.java:193) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at android.app.ActivityThread.main(ActivityThread.java:6718) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at java.lang.reflect.Method.invoke(Native Method) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) 07-15 10:18:22.300 29023 29023 E SQLiteDatabase: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: Couldn't open areas for writing (will try read-only): 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAreas(Areas.java:202) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarning.initPolygons(WeatherWarning.java:115) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings.getCurrentWarnings(WeatherWarnings.java:61) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherWarnings$getWarningsForLocationRunnable.<init>(WeatherWarnings.java:108) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$15.<init>(MainActivity.java:839) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.checkIfWarningsApply(MainActivity.java:839) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity.access$000(MainActivity.java:51) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity$19$2.run(MainActivity.java:1116) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.os.Handler.handleCallback(Handler.java:873) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.os.Handler.dispatchMessage(Handler.java:99) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.os.Looper.loop(Looper.java:193) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at android.app.ActivityThread.main(ActivityThread.java:6718) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at java.lang.reflect.Method.invoke(Native Method) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) 07-15 10:18:22.300 29023 29023 E SQLiteOpenHelper: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 07-15 10:18:22.301 29023 29023 E SQLiteLog: (522) statement aborts at 1: [PRAGMA user_version;] disk I/O error 07-15 10:18:22.352 29023 29047 E SQLiteLog: (522) disk I/O error 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: Failed to open database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas'. 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAllAreaNames(Areas.java:238) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas$AreaNameReader.run(Areas.java:266) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 07-15 10:18:22.353 29023 29047 E SQLiteDatabase: at java.lang.Thread.run(Thread.java:764) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: Couldn't open areas for writing (will try read-only): 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ): , while compiling: PRAGMA journal_mode 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:939) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:684) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:369) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:299) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:355) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAllAreaNames(Areas.java:238) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas$AreaNameReader.run(Areas.java:266) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 07-15 10:18:22.353 29023 29047 E SQLiteOpenHelper: at java.lang.Thread.run(Thread.java:764) 07-15 10:18:22.354 29023 29047 E SQLiteLog: (522) statement aborts at 1: [PRAGMA user_version;] disk I/O error 07-15 10:18:22.356 29023 29047 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1 07-15 10:18:22.356 29023 29047 E AndroidRuntime: Process: de.kaffeemitkoffein.tinyweatherforecastgermany, PID: 29023 07-15 10:18:22.356 29023 29047 E AndroidRuntime: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522 SQLITE_IOERR_SHORT_READ) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:648) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:842) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:830) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:956) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:371) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at de.kaffeemitkoffein.tinyweatherforecastgermany.AreaContentProvider.query(AreaContentProvider.java:65) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas.getAllAreaNames(Areas.java:238) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at de.kaffeemitkoffein.tinyweatherforecastgermany.Areas$AreaNameReader.run(Areas.java:266) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 07-15 10:18:22.356 29023 29047 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764) 07-15 10:18:22.359 1314 17398 W ActivityManager: Force finishing activity de.kaffeemitkoffein.tinyweatherforecastgermany/.MainActivity 07-15 10:18:22.364 29023 29047 I Process : Sending signal. PID: 29023 SIG: 9 ```

Ok, seems that SQLITE_IOERR_SHORT_READ is the key.

This means that SQLite cannot read the database of areas.

I will dig into it, but one question:
Did you (or any tool) move the app on the SD card? Can you please check under app details where the app is stored?

Because of the widgets, the app must not be installed on the SD card, which is prevented by the according entry in the manifest file.

Ok, seems that SQLITE_IOERR_SHORT_READ is the key. This means that SQLite cannot read the database of areas. I will dig into it, but one question: Did you (or any tool) move the app on the SD card? Can you please check under app details where the app is stored? Because of the widgets, the app must not be installed on the SD card, which is prevented by the according entry in the manifest file.

My phone doesn't even have an sdcard ;) Also: I did have the widget installed (twice), but removed it recently to see if that causes any errors.
It was installed with the F-Droid Priviledged Extension if that makes any difference.
Here is what is in the app data folder:

/data/data/de.kaffeemitkoffein.tinyweatherforecastgermany # ls -al
total 60
drwx------   6 u0_a142 u0_a142        4096 2021-07-15 10:20 .
drwxrwx--x 227 system  system        16384 2021-07-15 10:20 ..
drwxrws--x   2 u0_a142 u0_a142_cache  4096 2021-07-15 10:20 cache
drwxrws--x   2 u0_a142 u0_a142_cache  4096 2021-07-15 10:20 code_cache
drwxrwx--x   2 u0_a142 u0_a142        4096 2021-07-15 10:20 databases
drwxrwx--x   2 u0_a142 u0_a142        4096 2021-07-15 10:50 shared_prefs
/data/data/de.kaffeemitkoffein.tinyweatherforecastgermany # cd databases/                                                                                               
/data/data/de.kaffeemitkoffein.tinyweatherforecastgermany/databases # ls -al
total 3972
drwxrwx--x 2 u0_a142 u0_a142    4096 2021-07-15 10:20 .
drwx------ 6 u0_a142 u0_a142    4096 2021-07-15 10:20 ..
-rw-rw---- 1 u0_a142 u0_a142 3813376 2021-07-15 10:20 areas
-rw-rw---- 1 u0_a142 u0_a142       0 2021-07-15 10:20 areas-wal
-rw-rw---- 1 u0_a142 u0_a142    4096 2021-07-15 10:20 textforecasts
-rw------- 1 u0_a142 u0_a142   32768 2021-07-15 10:50 textforecasts-shm
-rw------- 1 u0_a142 u0_a142   28872 2021-07-15 10:20 textforecasts-wal
-rw-rw---- 1 u0_a142 u0_a142   16384 2021-07-15 10:20 weatherforecast
-rw-rw---- 1 u0_a142 u0_a142   32768 2021-07-15 10:50 weatherforecast-shm
-rw-rw---- 1 u0_a142 u0_a142       0 2021-07-15 10:20 weatherforecast-wal
-rw-rw---- 1 u0_a142 u0_a142    4096 2021-07-15 10:20 weatherwarnings
-rw------- 1 u0_a142 u0_a142   32768 2021-07-15 10:20 weatherwarnings-shm
-rw------- 1 u0_a142 u0_a142   28872 2021-07-15 10:20 weatherwarnings-wal

Let me know if I should attach the db files

My phone doesn't even have an sdcard ;) Also: I did have the widget installed (twice), but removed it recently to see if that causes any errors. It was installed with the F-Droid Priviledged Extension if that makes any difference. Here is what is in the app data folder: ``` /data/data/de.kaffeemitkoffein.tinyweatherforecastgermany # ls -al total 60 drwx------ 6 u0_a142 u0_a142 4096 2021-07-15 10:20 . drwxrwx--x 227 system system 16384 2021-07-15 10:20 .. drwxrws--x 2 u0_a142 u0_a142_cache 4096 2021-07-15 10:20 cache drwxrws--x 2 u0_a142 u0_a142_cache 4096 2021-07-15 10:20 code_cache drwxrwx--x 2 u0_a142 u0_a142 4096 2021-07-15 10:20 databases drwxrwx--x 2 u0_a142 u0_a142 4096 2021-07-15 10:50 shared_prefs /data/data/de.kaffeemitkoffein.tinyweatherforecastgermany # cd databases/ /data/data/de.kaffeemitkoffein.tinyweatherforecastgermany/databases # ls -al total 3972 drwxrwx--x 2 u0_a142 u0_a142 4096 2021-07-15 10:20 . drwx------ 6 u0_a142 u0_a142 4096 2021-07-15 10:20 .. -rw-rw---- 1 u0_a142 u0_a142 3813376 2021-07-15 10:20 areas -rw-rw---- 1 u0_a142 u0_a142 0 2021-07-15 10:20 areas-wal -rw-rw---- 1 u0_a142 u0_a142 4096 2021-07-15 10:20 textforecasts -rw------- 1 u0_a142 u0_a142 32768 2021-07-15 10:50 textforecasts-shm -rw------- 1 u0_a142 u0_a142 28872 2021-07-15 10:20 textforecasts-wal -rw-rw---- 1 u0_a142 u0_a142 16384 2021-07-15 10:20 weatherforecast -rw-rw---- 1 u0_a142 u0_a142 32768 2021-07-15 10:50 weatherforecast-shm -rw-rw---- 1 u0_a142 u0_a142 0 2021-07-15 10:20 weatherforecast-wal -rw-rw---- 1 u0_a142 u0_a142 4096 2021-07-15 10:20 weatherwarnings -rw------- 1 u0_a142 u0_a142 32768 2021-07-15 10:20 weatherwarnings-shm -rw------- 1 u0_a142 u0_a142 28872 2021-07-15 10:20 weatherwarnings-wal ``` Let me know if I should attach the db files

Ok, not having an SD card makes it plausible that this is NOT the issue :-)

It seems that the area database is created properly according to the size. The files do not look suspicious at all.

I will check the code. The most stupid thing is that I need to reproduce it somehow to really fix it. The error points at a quite low level issue (it is basically an IO error), perhaps I do something wrong in the database access. Will check.

The point with the fdroid privileged extension is interesting: can anybody else confirm she/he is using it when installing fdroid apps?

Ok, not having an SD card makes it plausible that this is NOT the issue :-) It seems that the area database is created properly according to the size. The files do not look suspicious at all. I will check the code. The most stupid thing is that I need to reproduce it somehow to really fix it. The error points at a quite low level issue (it is basically an IO error), perhaps I do something wrong in the database access. Will check. The point with the fdroid privileged extension is interesting: can anybody else confirm she/he is using it when installing fdroid apps?

I just tried to access the DB with the sqlite3 installed on the phone and that also looks normal:

/data/data/de.kaffeemitkoffein.tinyweatherforecastgermany/databases # sqlite3 areas                                                                                   
SQLite version 3.22.0 2019-09-03 18:36:11
Enter ".help" for usage hints.
sqlite> .tables
android_metadata  tables          
sqlite> select * from tables limit 1;
1|209902000|206|2|Rothsee|49.211563,11.18254 49.226807,11.194911 49.23832,11.208389 49.22707,11.188899 49.225174,11.176717 49.211563,11.18254
sqlite>
I just tried to access the DB with the sqlite3 installed on the phone and that also looks normal: ``` /data/data/de.kaffeemitkoffein.tinyweatherforecastgermany/databases # sqlite3 areas SQLite version 3.22.0 2019-09-03 18:36:11 Enter ".help" for usage hints. sqlite> .tables android_metadata tables sqlite> select * from tables limit 1; 1|209902000|206|2|Rothsee|49.211563,11.18254 49.226807,11.194911 49.23832,11.208389 49.22707,11.188899 49.225174,11.176717 49.211563,11.18254 sqlite> ```

I think this warning might be relevant:

07-15 10:18:16.504 29023 29031 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas' was leaked!  Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.

At least to me as Java dev this looks a lot like a database connection where close() was not called for some reason. Maybe it's not closed and then opened a second time somewhere else? That might explain the IO error.

I think this warning might be relevant: ``` 07-15 10:18:16.504 29023 29031 W SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/de.kaffeemitkoffein.tinyweatherforecastgermany/databases/areas' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed. ``` At least to me as Java dev this looks a lot like a database connection where close() was not called for some reason. Maybe it's not closed and then opened a second time somewhere else? That might explain the IO error.

Yes, true. This might be the cause. Thanks!

However, it is quite clear now that the error is somewhere in the AreaContentProvider class, because this is the layer between sqlite and the app.

Thanks for the logs, that really helps!

Yes, true. This might be the cause. Thanks! However, it is quite clear now that the error is somewhere in the AreaContentProvider class, because this is the layer between sqlite and the app. Thanks for the logs, that really helps!

I had a look at the code and I think I found the problem. I started a pull request and described the problem there.

Also: Line 55 looks strange. Why is that "if" empty? Can it be removed or is there something missing? I'm not really an android dev, so I can't tell :)

I had a look at the code and I think I found the problem. I started a pull request and described the problem there. Also: Line 55 looks strange. Why is that "if" empty? Can it be removed or is there something missing? I'm not really an android dev, so I can't tell :)

Thanks for the logs, that really helps!

Just to aks: whould it have been possible for me as a lesser mortal on a standard device to provide these logs as well, and if so, how? If so, I'd be happy to learn about that.

> Thanks for the logs, that really helps! Just to aks: whould it have been possible for me as a lesser mortal on a standard device to provide these logs as well, and if so, how? If so, I'd be happy to learn about that.

I think logs should be available on adb. You should be able to unlock the developer options https://developer.android.com/studio/debug/dev-options
Then you need a tool called "adb" on your PC. On Linux it is often available in a package from your distribution. Or you can download it here: https://developer.android.com/studio/command-line/adb

Then you need to connect your phone via USB, activate "USB debugging" in the developer options, and start "adb logcat".
All this should be possible on a normal device without root as far as I remember.

I think logs should be available on adb. You should be able to unlock the developer options https://developer.android.com/studio/debug/dev-options Then you need a tool called "adb" on your PC. On Linux it is often available in a package from your distribution. Or you can download it here: https://developer.android.com/studio/command-line/adb Then you need to connect your phone via USB, activate "USB debugging" in the developer options, and start "adb logcat". All this should be possible on a normal device without root as far as I remember.

@dicer thanks for these pointers, I'll give it a try and see if I can find my way around. :)

@dicer thanks for these pointers, I'll give it a try and see if I can find my way around. :)

There is some news. The pull request from @dicer was a good start (#79), but led to some null pointer exceptions when trying to read area data.

Using ContentResolver instead of directly accessing the AreaContentProvider seems to resolve all errors.

I am not sure why, but it seems to be troublesome to query/write to the AreaContentProvider directly when doing so from different threads, this post points at a similar issue. It seems safer to wrap it with a ContentResolver.

Later this day, I will create a userdebug so that you can test this.

There is some news. The pull request from @dicer was a good start (https://codeberg.org/Starfish/TinyWeatherForecastGermany/pulls/79), but led to some null pointer exceptions when trying to read area data. Using ContentResolver instead of directly accessing the AreaContentProvider seems to resolve all errors. I am not sure why, but it seems to be troublesome to query/write to the AreaContentProvider *directly* when doing so from *different threads*, this [post](https://stackoverflow.com/questions/5084896/using-contentproviderclient-vs-contentresolver-to-access-content-provider) points at a similar issue. It seems safer to wrap it with a ContentResolver. Later this day, I will create a userdebug so that you can test this.

Later this day, I will create a userdebug so that you can test this.

Indeed, I can confirm that TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210729-access_area_data_with_ContentResolver does not crash upon startup everytime anymore if I switch on the warnings again.

I still do see some spurious crashes of the sort described above. IOW the app starts building the area db and right at the end of that it dies. Sometimes. If I open it again and everything can be fine (or it may crash again and the next startup is fine.) I hope this log captures one of these cycles properly:

2021-07-29 13:01:01.079 Logging started, new file created. Device info:
2021-07-29 13:01:01.080 ------------------------------------------------------
2021-07-29 13:01:01.080 Android SDK version: 28
2021-07-29 13:01:01.081 Android SDK version: REL
2021-07-29 13:01:01.081 Android build: 47.2.A.11.228
2021-07-29 13:01:01.081 Hardware: qcom
2021-07-29 13:01:01.081 Product: G8441
2021-07-29 13:01:01.082 Model: G8441
2021-07-29 13:01:01.082 Manufacturer: Sony
2021-07-29 13:01:01.082 App build: 26
2021-07-29 13:01:01.083 App build name: 0.56.3-userdebug_202107210
2021-07-29 13:01:01.083 ------------------------------------------------------
2021-07-29 13:01:01.084
Available display:Logical density: 2.0
Scaled density: 2.0
Width (pixels): 720
Height (pixels): 1184
x-dpi: 326.571
y-dpi: 325.12
calculated physical metrics:
Width (x): 2.2 inch
Height (y): 3.64 inch
Pixel-independent metrics:
Width (x) in dp: 353
Height (y) in dp: 583

2021-07-29 13:01:01.084 ------------------------------------------------------
2021-07-29 13:01:01.084 DATABASE: Areas database deleted.
2021-07-29 13:01:01.338 ALARM MANAGER: update from API not due.
2021-07-29 13:01:01.341 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:01.510 ALARM MANAGER: update from API not due.
2021-07-29 13:01:01.512 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:03.974 DATABASE: database error when getting weather warnings: no such table: tables (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM tables WHERE warncellid IN(?)
2021-07-29 13:01:04.202 ALARM MANAGER: update from API not due.
2021-07-29 13:01:04.210 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:04.444 ALARM MANAGER: update from API not due.
2021-07-29 13:01:04.447 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:11.887 DATABASE: Areas database deleted.
2021-07-29 13:01:12.146 ALARM MANAGER: update from API not due.
2021-07-29 13:01:12.148 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:12.319 ALARM MANAGER: update from API not due.
2021-07-29 13:01:12.321 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:14.932 ALARM MANAGER: update from API not due.
2021-07-29 13:01:14.934 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:01:15.137 ALARM MANAGER: update from API not due.
2021-07-29 13:01:15.140 ALARM MANAGER: job scheduled in 24 minutes.
2021-07-29 13:02:05.044 DATABASE: Areas database deleted.
2021-07-29 13:02:05.303 ALARM MANAGER: update from API not due.
2021-07-29 13:02:05.306 ALARM MANAGER: job scheduled in 23 minutes.
2021-07-29 13:02:05.472 ALARM MANAGER: update from API not due.
2021-07-29 13:02:05.474 ALARM MANAGER: job scheduled in 23 minutes.
2021-07-29 13:02:11.390 DATABASE: Areas database deleted.
2021-07-29 13:02:11.647 ALARM MANAGER: update from API not due.
2021-07-29 13:02:11.650 ALARM MANAGER: job scheduled in 23 minutes.
2021-07-29 13:02:11.820 ALARM MANAGER: update from API not due.
2021-07-29 13:02:11.822 ALARM MANAGER: job scheduled in 23 minutes.
2021-07-29 13:02:14.416 ALARM MANAGER: update from API not due.
2021-07-29 13:02:14.425 ALARM MANAGER: job scheduled in 23 minutes.
2021-07-29 13:02:14.626 ALARM MANAGER: update from API not due.
2021-07-29 13:02:14.628 ALARM MANAGER: job scheduled in 23 minutes.

If logging worked as expected it should be a failed startup followed by a successful one.

There is also a new issue on that front. TWFG will recreate the database (This needs to be done only once) every time I close the app and restart it. Now, I have to admit that I might not yet get closing an app on Android properly. What I do is: fire up the window list and swipe it away from there. Once done this, if I fire up the app from the widget or from it's icon the location database gets rebuilt.

> Later this day, I will create a userdebug so that you can test this. Indeed, I can confirm that `TinyWeatherForecastGermany-build025-version_0.56.2-userdebug-20210729-access_area_data_with_ContentResolver` does _not_ crash upon startup everytime anymore if I switch on the warnings again. I still do see some spurious crashes of the sort described above. IOW the app starts building the area db and right at the end of that it dies. _Sometimes_. If I open it again and everything can be fine (or it may crash again and the next startup is fine.) I hope this log captures one of these cycles properly: ``` 2021-07-29 13:01:01.079 Logging started, new file created. Device info: 2021-07-29 13:01:01.080 ------------------------------------------------------ 2021-07-29 13:01:01.080 Android SDK version: 28 2021-07-29 13:01:01.081 Android SDK version: REL 2021-07-29 13:01:01.081 Android build: 47.2.A.11.228 2021-07-29 13:01:01.081 Hardware: qcom 2021-07-29 13:01:01.081 Product: G8441 2021-07-29 13:01:01.082 Model: G8441 2021-07-29 13:01:01.082 Manufacturer: Sony 2021-07-29 13:01:01.082 App build: 26 2021-07-29 13:01:01.083 App build name: 0.56.3-userdebug_202107210 2021-07-29 13:01:01.083 ------------------------------------------------------ 2021-07-29 13:01:01.084 Available display:Logical density: 2.0 Scaled density: 2.0 Width (pixels): 720 Height (pixels): 1184 x-dpi: 326.571 y-dpi: 325.12 calculated physical metrics: Width (x): 2.2 inch Height (y): 3.64 inch Pixel-independent metrics: Width (x) in dp: 353 Height (y) in dp: 583 2021-07-29 13:01:01.084 ------------------------------------------------------ 2021-07-29 13:01:01.084 DATABASE: Areas database deleted. 2021-07-29 13:01:01.338 ALARM MANAGER: update from API not due. 2021-07-29 13:01:01.341 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:01.510 ALARM MANAGER: update from API not due. 2021-07-29 13:01:01.512 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:03.974 DATABASE: database error when getting weather warnings: no such table: tables (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM tables WHERE warncellid IN(?) 2021-07-29 13:01:04.202 ALARM MANAGER: update from API not due. 2021-07-29 13:01:04.210 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:04.444 ALARM MANAGER: update from API not due. 2021-07-29 13:01:04.447 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:11.887 DATABASE: Areas database deleted. 2021-07-29 13:01:12.146 ALARM MANAGER: update from API not due. 2021-07-29 13:01:12.148 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:12.319 ALARM MANAGER: update from API not due. 2021-07-29 13:01:12.321 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:14.932 ALARM MANAGER: update from API not due. 2021-07-29 13:01:14.934 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:01:15.137 ALARM MANAGER: update from API not due. 2021-07-29 13:01:15.140 ALARM MANAGER: job scheduled in 24 minutes. 2021-07-29 13:02:05.044 DATABASE: Areas database deleted. 2021-07-29 13:02:05.303 ALARM MANAGER: update from API not due. 2021-07-29 13:02:05.306 ALARM MANAGER: job scheduled in 23 minutes. 2021-07-29 13:02:05.472 ALARM MANAGER: update from API not due. 2021-07-29 13:02:05.474 ALARM MANAGER: job scheduled in 23 minutes. 2021-07-29 13:02:11.390 DATABASE: Areas database deleted. 2021-07-29 13:02:11.647 ALARM MANAGER: update from API not due. 2021-07-29 13:02:11.650 ALARM MANAGER: job scheduled in 23 minutes. 2021-07-29 13:02:11.820 ALARM MANAGER: update from API not due. 2021-07-29 13:02:11.822 ALARM MANAGER: job scheduled in 23 minutes. 2021-07-29 13:02:14.416 ALARM MANAGER: update from API not due. 2021-07-29 13:02:14.425 ALARM MANAGER: job scheduled in 23 minutes. 2021-07-29 13:02:14.626 ALARM MANAGER: update from API not due. 2021-07-29 13:02:14.628 ALARM MANAGER: job scheduled in 23 minutes. ``` If logging worked as expected it should be a failed startup followed by a successful one. There is also a new issue on that front. TWFG will recreate the database (`This needs to be done only once`) _every time_ I _close_ the app and restart it. Now, I have to admit that I might not yet get `closing` an app on Android properly. What I do is: fire up the window list and swipe it away from there. Once done this, if I fire up the app from the widget or from it's icon the location database gets rebuilt.

The area database creation was broken in the last unserdebug.

It took me quite a long time to find out why (short answer: do not delete a database on the main thread when unsing a ContentProvider at the same time, because the ContentProvider won't notice reliably that the database is gone).

To improve user experience, the creation of the area database does not block the UI any more.

Crashes related to the area database should be finally fixed now.

You can give a new userdebug a try.

The area database creation was broken in the last unserdebug. It took me quite a long time to find out why (short answer: do not delete a database on the main thread when unsing a ContentProvider at the same time, because the ContentProvider won't notice reliably that the database is gone). To improve user experience, the creation of the area database does not block the UI any more. Crashes related to the area database should be finally fixed now. You can give a new userdebug a try.

Crashes related to the area database should be finally fixed now.

Indeed all seems well now! Thank you! :)

To improve user experience, the creation of the area database does not block the UI any more.

And it even looks nice. :)

> Crashes related to the area database should be finally fixed now. Indeed all seems well now! Thank you! :) > To improve user experience, the creation of the area database does not block the UI any more. And it even looks nice. :)

Then, you can enjoy the sea and costal areas displayed correctly, finally. :-)

Then, you can enjoy the sea and costal areas displayed correctly, finally. :-)

fixed: 45668ef37b and confirmed by @arwagner

fixed: https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/45668ef37bc98d887193f10f821735fc91396efa and confirmed by @arwagner
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Starfish/TinyWeatherForecastGermany#74
There is no content yet.