osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.66k stars 1.02k forks source link

OsmAnd on MIUI crashes on startup #3065

Open Sergey82K opened 8 years ago

Sergey82K commented 8 years ago

Hello! On MIUI version greater than 6.7.14 OsmAnd v2.4.6 always crashes on startup. I tried to reinstall application and clear application data, but nothing to helped. Log attached (MIUI 6.9.8 - last version). logcat_20160912_104915.txt Phone: Xiaomi Redmi 2 TD, Android 4.4.4. Thanks!

2016-09-11 19-13-34 2016-09-11 19-15-12 2016-09-12 10-34-17

vshcherb commented 8 years ago

Looks like reinstall is needed.

Sergey82K commented 8 years ago

Tried to reinstall it again. Everything is the same crash at startup :(

Tiemichael commented 8 years ago

Same problem here! Osmand (free version from Google Play) crashes at startup. Xiaomi Note 1 LTE, Android 4.4.4, Miui 8.0.1.0 Uninstalling, deleting residual files .... did not help

There is a lot of reports about this issue on the Xiaomi-Forums. It seems to be independent of the Osmand-version, but caused by a recent Xiaomi-update. Android 4.4.x devices seem to be not working, while e.g. my Xiaomi Note 2 running Android 5.0.2 and Miui 8.1 is working fine.

vshcherb commented 8 years ago

This is quite strange cause OsmAnd free doesn't use USE_FINGERPRINT, GET_ACCOUNT_PRIVILEGED permissions. It might be related to in app billing but this strange that it fails on startup.

Can somebody please try Free~ of Paid~ versions http://download.osmand.net/latest-night-build/, in that sense we could identify if issue is related to Google Play or it is a generic issue.

vshcherb commented 8 years ago

It will be also good to know if it is related to 2.4.6 or 2.3.5 is also affected (http://download.osmand.net/releases/). It is quite hard to debug without specific device, so any testing help is very appreciated .

Tiemichael commented 8 years ago

Here is my observations: I had OSMAND (not sure if it was free from Playstore or the 'nightly-version' installed for several months, and it was working fine. A few weeks ago, the phone (running Android 4.4. was automatically updated from Miui7 to Miui8. When starting OSMAND yesterday it crashed (= same version of OSMAND as before) Next I installed a new nighly-version: crash Next the most recent version from Google-Play: crash.

Based on the above the issue seems to be generic to OSMAND, and being caused the upgrade from Miui7 to Miui8 for Android4.4. (I have another Xiaomi Phone running Miui8 on Android 5.0.2 which is ok)

Tiemichael commented 8 years ago

This problematic phone is not rooted, so as far as I know I cannot provide any kind of LogCat. Just an idea: Could you provide some 'osmand-test.apk' which creates a suitable log-file, to help you debug the issue?

deavid commented 8 years ago

Here I have the very same issue. Xiaomi Redmi 4G single SIM upgraded to MIUI 8. But i do have a rooted phone. (If anyone with MIUI 8 needs to root the phone, just install TWRP Recovery using Fastboot method, and enter into recovery before rebooting into MIUI)

Other phones using Android 5 + MIUI 8 do not have this issue. Seems we have this issue because is Android 4.4 + MIUI 8. The issue is the same using Free & Paid versions, also Beta versions fail.

It's been a long time since I last tried to develop for Android. Anyone has a guide on how to extract a meaningful log from the crash? I believe it happens when finishes drawing or near its end.

Also I want to suggest a feature: enabling debug mode by default if some file called "enable_debug_mode" exists on maps folder; as a workaround for those devices where Native Code loads but ends in a crash.

If I can help you in any way to debug or fix this, please let me know.

Sergey82K commented 8 years ago

It will be also good to know if it is related to 2.4.6 or 2.3.5 is also affected

net.osmand-2.4.6.apk - Crashed! logcat_20160913_102233-cut.txt There are no USE_FINGERPRINT and GET_ACCOUNT_PRIVILEGED in log.

net.osmand-2.3.5.apk - Crashed! logcat_20160913_104235-cut.txt

MIUI 8 ver. 6.9.8, Android 4.4.4., Xiaomi Redmi 2 TD

Sergey82K commented 8 years ago

Can somebody please try Free~ of Paid~ versions http://download.osmand.net/latest-night-build/

OsmAnd-nightly-2.3.apk 12-Sep-2016 22:19 - Crashed! logcat_20160913_105123.txt

What APK next? :)

If I can help you in any way to debug or fix this, please let me know.

I use LogcatBrowser. Device without root. I remember current time, start OsmAnd, wait for crash, then start a LogcatBrowser and save full log. Copy to PC. On PC I searching for previous recorded time and search for first mention osmand. Deleted early log. Then search last mention of osmand and delete to end.

vshcherb commented 8 years ago

Thanks for logs, looks like crash is related to skia map rendering and it is deep in the native code, so without debug version, we won't see details

Sergey82K commented 8 years ago

Waiting for debug version ;)

Sergey82K commented 8 years ago

How I can switch render to "safe mode"? As I can remember, this option was present in menu but I can not start program. What file contain this option? ( Because I without map now :( )

Tiemichael commented 8 years ago

Hi, can we expect some kind of debug version? When will it be available? It would be a pity if OSMAND is not running on these devices ....

vshcherb commented 8 years ago

Latest night version http://download.osmand.net/latest-night-build/OsmAnd-default.apk is compiled with debug mode and should provide better stacktrace.

Sergey82K commented 8 years ago

Crashed on startup too :(

logcat_20160918_165939-cut.txt

vshcherb commented 8 years ago

About my change: it was not supposed to be fixed, it was supposed to show more information. Cause it starts crashing for all versions of OsmAnd on new MIUI system, it is clearly regression in MIUI kernel. It still works as expected on other devices. What we are trying to find out which native method causes crash. Please not that OsmAnd doesn't use any internal API, though OsmAnd uses internally built version of Skia which is also part of Android but the functions are packaged and should not be in conflict with system functions.

Clearly in stacktrace visible skthrow method. It would be a great help if somebody from MIUI team could provide more information what's been changed around that, so it could help us to identify it the issue.

vshcherb commented 8 years ago

Also a valuable comment here I think:

Other phones using Android 5 + MIUI 8 do not have this issue. Seems we have this issue because is Android 4.4 + MIUI 8. 
vshcherb commented 8 years ago

For people who want to run in Compatibility mode, though it is highly not recomendable but possible to do via apk modification. Apk file is simple zip file if you delete all files "*.so" from libs folder http://download.osmand.net/latest-night-build/OsmAnd-default.apk, OsmAnd will ignore native library and you can run with compatibility mode. The normal routes (>20km) won't be calculated and you might experience Out of memory issues and have other weird bugs.

Sergey82K commented 8 years ago

For people who want to run in Compatibility mode

Thanks! In this mode OsmAnd can work on my phone.

It would be a great help if somebody from MIUI team could provide more information what's been changed around that, so it could help us to identify it the issue.

I will try to pay attention MIUI developers on this issue and wait for the upgrade firmware to Android 5/6 for my phone. Is any additional information for developers to open bug report on MIUI global site? New weekly MIUI firmware is coming soon, I will upgrade and I will open bug report.

Tiemichael commented 8 years ago

There are several reports about this issue on the Miui-Forums, and I also did a 'Bug-Report' earlier today. It seems that Xiaomi developers are not very interested and active in fixing bugs like these. Until now, none of the forum moderators has been 'stamping' any of these reports as 'confirmed' or 'checking' or ...

Thank you OSMAND for taking these problems serious!

Those of you who are Miui-Forum Members, please go to this post and confirm the bug. It might increase our chances that Xiaomi is looking into it.

Tiemichael commented 8 years ago

Post is still there (http://en.miui.com/thread-361811-1-1.html)

From: Sergey [mailto:notifications@github.com] Sent: Friday, 23 September 2016 02:16 To: osmandapp/Osmand Osmand@noreply.github.com Cc: Tiemichael mictiemix@gmail.com; Comment comment@noreply.github.com Subject: Re: [osmandapp/Osmand] OsmAnd on MIUI crashes on startup (#3065)

please go to this post and confirm the bug

post deleted?

Sergey82K commented 7 years ago

Problem still present. OsmAnd 2.6.3, MIUI 8.2.1.0 (Stabile), Android 4.4.4.