mh- / corona-warn-companion-android

Android App Which Shows Details about CWA Exposures (Requires Root or CCTG or RaMBLE Apps)
GNU General Public License v3.0
130 stars 22 forks source link

App crashes in RaMBLE Mode #137

Closed DerVogel2020 closed 2 years ago

DerVogel2020 commented 2 years ago

Since Jan 4th 2022 the app always crashes while it downloads the Diagnoseschlüssel. Until Jan 3rd 2022 I didn't have any problems. My device is not rooted. Can I do anything to do a diagnosis why this happens?

meisteredermeistereder-the-second commented 2 years ago

This happens to me when I share the database from the CCTG (f-droid). First the app seems to load the diagnostic keys and then it closes. Could it be that the number of diagnostic keys is getting too large (e.g. > 1000000)? Yesterday it was >900000. I use a Fairphone 3 with iodé as operating system, so microG is also installed on the operating system side. Device not rooted.

the-dreamer commented 2 years ago

I had just above 1 mio keys some days before and same for me now, app is crashing. sony xperia xz1 compact, not rooted. Last times checking keys also was taking ages (>30 min), sometimes android was force closing the app when i have not woke up the phone.

Oi-sin commented 2 years ago

I have the same problem on my device (BQ Aquarius X Pro) since yesterday. I've sent a crash report this morning too. The attached logs showed an OutOfMemoryException in the Array class. I suppose the number of keys from the German server is too large to be handled by the current implementation. Changing the key server to smaller countries like Belgium allows a successful download. As we have to assume that the number of keys to be downloaded will increase fast in the days and weeks to come, this bug looks like it makes the app useless, at least for German users (and users from countries attached to the German server).

The error is reproduceable when using CCTG export as well as when using a Ramble database.

A solution might be to download and process the keys in chunks. Some kind of caching might also help and speed up the matching process too as the same matches are executed every time the app is run.

DerVogel2020 commented 2 years ago

Fixed for me with Version 2.1.3.

Oi-sin commented 2 years ago

Thank you very much for the fast fix. I can confirm, that the download works again with more than 1200000 keys. There is also a massive improvement in performance: download and verification are much faster on my device by a factor of 5 to 10!