osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.6k stars 1.01k forks source link

OSMAnd sometimes reboots Samsung S5 #8234

Open ohhai opened 4 years ago

ohhai commented 4 years ago

Have the subject issue for monthes. Device is old and seems to have some power degradations (screen flicker on low brightness, can turn off in cold weather before 0% of battery), but OSMAnd is currently the only app to cause reboot, so writing it here.

Steps to reproduce: have three alternative cases: ) Just start OSMAnd. Sometimes device reboots after that with no additional actions. ) Start OSMAnd and scroll map. *) Start OSMAnd and enable GPS: reboot may happen when the GPS marker (GPS fix) appears - exactly this moment.

Reboot frequency is 20-25% maybe (happens not always). Can reboot with both high battery level and charging. Another apps (including GPS-related) don't cause reboots. Have no any error messages before or just after reboot. Tried to switch "OpenGL rendering" in development settings, have no effect. Can't use "safe mode" there, it is reset to disabled after every OSMAnd restart.

Versions: OsmAnd+ 3.5.5, released 2019-11-28 Samsung Galaxy S5 (Exynos edition), Android 6.0.1 Using offline map of Ukraine (version "Jan 1, 2020") plus hillshade and contour layers.

sonora commented 4 years ago

I have seen this occasioanlly on some devices, and believe it may be due to corrupt app data.

I guess you can try this: Find out what your OsmAnd data folder actually is (be aware you may have more .../net.osmand(.plus) folders on your device, but only one is the one you actually have maps, tracks etc. in.) Rename it. Then, under your Android (not OsmAnd) settings, find "Apps" or "App manager" or similar, select OsmAnd, and use "Delete Data". Be aware, this will reset all your OsmAnd settings to their default. (But you will keep all data like maps, tracks, favs in your renamed data folder.)

Then restart OsmAnd. It will start as if freshly installed. Select the data folder to be on the storage medium you prefer. Afterwards, OsmAnd should function normally (except is has no maps yet). You can set the profile etc. settings again as preferred. After this works ok, you can move data like maps, tracks, favorites.gpx etc. again from the renamed backup folder to the new active one, using a file manager or PC.

It is cumbersome to a degree, but may be worth it if you want to try.

ohhai commented 4 years ago

Thanks, I did not think about this. Just to be clear: the problem is entire phone/device reboot -- not only OSMAnd crash/exit/... Will try and write back, thank you.

sonora commented 4 years ago

I had an old device which had similar issues. I always suspected the SD card or SD card interface/reader, and maybe it was. I am not using the device much, hence cannot be sure - but ever since I did this reset (which is essentially an OsmAnd re-install), it seems to work. Cannot say if it was corrupt OsmAnd data in some internal storage-database, or maybe a corrupt map or similar file on a flaky SD card. But it may have helped , it seems ...

Could be worth a try. Just be sure you somehow backup the data folder before, so you do not lose data like recorded tracks or favorites.

ohhai commented 4 years ago

Sure, thanks a lot. It seems strange for me -- OS should not react this way even if entire filesystem is corrupted, not just some application data. If it's some physical/electrical problems with storage (I keep OSM maps on SD card, it's true) -- why only OSMand is affected... I'll definitely check it, it's interesting and quite annoying :)

ohhai commented 4 years ago

Inserted another (completely empty) SD card, launched OSMAnd and had reboot on "get started" OSMAnd screen. Erased "Android/obb/net.osmand.plus" and "osmand" dirs on internal memory, and freshly created OSMAnd dirs under "Android/data/" on SD card. Launched OSMAnd, had reboot again.

Can try to reinstall OSMAnd if it keeps license (bought also Contour lines plugin).

ohhai commented 4 years ago

Removed SD card and started OSMAnd: same, reboot on "get started" OSMAnd screen.

ohhai commented 4 years ago

I just run "Stress test" from AnTuTu Go and "Sling shot" test from 3DMark. Finished successfully, no reboots.

ohhai commented 4 years ago

Finally, when I inserted initial SD card back and started OSMAnd, it showed me "crash happened" frame. Not sure if really related, but I'm attaching the report here.

Device : k3g Brand : samsung Model : SM-G900H Product : k3gxx Build : MMB29K.G900HXXS1CQD1 Version : 6.0.1 App Version : OsmAnd+ Apk Version : 3.5.5 355

exception.log

sonora commented 4 years ago

From what I see, that log is from Version OsmAnd+ 3.0.4 21.06.2018 2:05:23 ?

In any case, have you tried my suggestion to delete the OsmAnd data under Android's App manager settings? That does more than just deleting the data folders, it essentially performs an OsmAnd re-installation (no harm to license).

PS: I have both an S5mini and an S5neo, neither has ever shown this issue. Hence it must either be an issue with your particular installation (hence this suggestion), or a hardware failure on your device.

ohhai commented 4 years ago

Regarding v3.0.4: the only explanation I have is that OSMAnd handled an old report somehow. Sorry, I missed you are talking about erase in App manager and not just folders. So what I just did:

Samsung produces different versions even for "same" models, my S5 also has Exynos and Snapdragon editions. Hardware failure might be the case, but OSMAnd is the only app to cause reboot even after stress test by AnTuTu and 3DMark.

Is there any remote debugging option I can try? Have small experience with Android, but losing OSMAnd is a really bad alternative.

sonora commented 4 years ago

This is really weird. After everything you have tried, essentually even after re-installing OsmAnd, I can only repeat that a good portion of the devices I test all OsmAnd versions on are Samsung devices. Hence at this point I can only suspect there may be an individual problem with the very device, though I am really at loss what it may be and how OsmAnd could possibly cause a device reboot. Just short of suggesting a factory reset, at this point I would have to pass things off to someone else to see if there are any fresh ideas?

ohhai commented 4 years ago

There are some chances to catch something in logs, so I'd be happy to get any hints for it. Can try to check logcat in adb.

Besides that, the weirdest thing was seen today. Presence of OSMand "get started" screen seem to depend on screen brightness (remember, this device has issues in power chain and screen flickering is a problem for lowest brightness levels). I set low brightness, started OSMAnd and it showed empty map (logical). Then I did exit, set higher brightness and started OSMAnd again. This time have "get started" screen. Then decreased brightness again, restarted OSMAnd and have empty map again.

I can imagine all of that related with hardware issues, but single app triggering them - it's strange. OSMAnd contains some native code as far as I understand. It there any way to enable "safe mode" persistently? Or are there any good benchmarks/tests in Play store to check (except AnTuTu and 3DMark)?