Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong division with MediaTek CPUs #4097

Closed
murmeltier4 opened this Issue Jul 27, 2014 · 56 comments

Comments

Projects
None yet
@murmeltier4
Copy link

commented Jul 27, 2014

After Updating Yoga Tablet Lenovo B6000-H to Android-Version 4.4.2 the offline installed OSM Maps are not displayed correctly. Sometimes only some parts of the map are displayed, but mostly nothing is shown. Zoom in and out makes it more worse. If in Map the option "Enable live" is selected, symbols for geocaches were displayed (if at all) in one single column in the middle of the map. Similar problem by using online "OSM: Mapnik" and "OSM: Radfahrerkarte". "Google: Map" and "Google: Satellit" is working correctly.
See attached image for example.
cgeo_osm_map

@marco-dev

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2014

Are you developer and able to connect your device to eclipse for getting a logfile?

@SammysHP

This comment has been minimized.

Copy link
Member

commented Jul 27, 2014

This is an issue only with the Lenovo Yoga 8 tablet with this ROM version. Additionally this ROM seems to have issues with the system log as CatLog with superuser permissions is not able to catch all messages.

See http://forum.geoclub.de/viewtopic.php?f=155&t=74995.

I suggest to close this with "won't fix" and ask affected users to forward it to Lenovo.

@murmeltier4

This comment has been minimized.

Copy link
Author

commented Jul 27, 2014

That's too bad. So the only way to seems to be a workaround by downgrading to Android 4.2 ?
With this Android version it worked perfectly...
@marco-dev: no developer, no logfile
Anyway thanks for the information.

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2014

The interesting thing is, that at least one user reported, that the map works for him with Locus. Pethaps you can cross-check that, too?

@murmeltier4

This comment has been minimized.

Copy link
Author

commented Jul 27, 2014

With Locus Free V3.1.3 works the same map (same file) perfectly.

@Lineflyer

This comment has been minimized.

Copy link
Member

commented Jul 27, 2014

Where did you place the map file?
Is it on external SD card or in some internal memory.
It should make no difference as we are just reading from that location (and in 4.4 we can no longer write to external SD card) but maybe the device handles something wrong here.

@SammysHP

This comment has been minimized.

Copy link
Member

commented Jul 27, 2014

Please note that Locus uses a heavily patched version of Mapsforge! AFAIK not only the rendering engine was completely replaced (by a version using OpenGL), but also file format support etc.

(Today I noticed again that Locus renders some map features not the same as c:geo does – same map, same theme.)

@murmeltier4

This comment has been minimized.

Copy link
Author

commented Jul 27, 2014

There is no external SD card placed in my Yoga tablet. In the directroy tree the map file is located
in /mnt/sdcard/cgeo. So it seams there is an internal SD card, which is mounted beside the system or the internal SD card has multiple partitions (system menu said that total memory is 16.000.000.000 byte).
I tried also a external USB stick with the map file on it (will be mounted to /storage/usbotg/). Same behavior as described above.

@2Rusties

This comment has been minimized.

Copy link

commented Jul 30, 2014

I have the same problem on my brand new THL 5000 smartphone (4.4.2, MT6592 Octacore, 2GB RAM, no root). Locus is working fine with the same map (Mapsforge), Cachebox also, but not stable (maybe not related to the map issue). c:geo shows more or less no map (less than above, just some city names for a short time) and the same single column of geocaches.

@murmeltier4

This comment has been minimized.

Copy link
Author

commented Aug 18, 2014

Today Lenovo released a update (latest firmware version for YOGA 8 is now B6000_A442_001_023_140811_WW_3GDATA). Unfortunatly the problem is still present :-(

@Lineflyer

This comment has been minimized.

Copy link
Member

commented Sep 8, 2014

From support mail:
Also happening on:

  • Efox Smart E5s with Android 4.4.2
  • Cubot X6 with Android 4.2.2.

What to do?

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 9, 2014

Both with MediaTek CPU (MT6592). I really wonder what the hell they're doing.

What to do? Ignore the problem and wait until we have tried the new version of Mapsforge.

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 9, 2014

I wonder if it is related to this issue: https://code.google.com/p/android/issues/detail?id=65750

But it should be fixed now as it also appears on KitKat.

@mucek4

This comment has been minimized.

Copy link
Member

commented Sep 9, 2014

On your link it says:

The bug was introduced on 2/2/2013 and fixed on 4/26/2013. It appears that your failing devices are using a build cut during that window.

Could it be?

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 9, 2014

But that was about Jelly Bean (Android 4.3), this issue happens also with 4.2 and 4.4.

But what we can say definitely: It is a bug in the Dalvik JIT compiler specific for MediaTek CPUs. It might be interesting to investigate if it is a issue of the CPU (that would be really bad) or in the CPU specific part of the JIT compiler. I assume the latter.

@SammysHP SammysHP changed the title OSM online and offline not working after update to Android 4.4 Mapsforge not working with MediaTek CPUs Sep 9, 2014

@SammysHP SammysHP added Prio - Medium and removed Unverified labels Sep 9, 2014

@Lineflyer

This comment has been minimized.

Copy link
Member

commented Sep 10, 2014

In case a logfile would still be of any use:
I asked a user on support mail if he could provide a log.

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 10, 2014

The logs I've seen from Yoga tablets (with root!) weren't helpful (most of the log missing). Tomorrow I'll meet someone with a Yoga 8 and I'll test c:geo myself.

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 11, 2014

I was able to reproduce it. The version with disabled JIT works without problems.

https://www.dropbox.com/sh/f9nj0u9tnhgnm7t/AACKQQLMrQ0uKfSO71XlcRnVa?dl=0

@Lineflyer

This comment has been minimized.

Copy link
Member

commented Sep 12, 2014

So disabling JIT would be an optionto workaround this?

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 12, 2014

Yes, but you notice that it runs a little bit slower. Also it is nothing that you can change during runtime (like the hardware acceleration). Also some other apps crash because of this bug.

The source of this issue is a bug in the JIT compiler that is used with MediaTek CPUs. We could provide a version without JIT on our website. I wouldn't invest more effort, but we should check if the latest version of Mapsforge triggers this bug too.

@DaPapa

This comment has been minimized.

Copy link

commented Sep 13, 2014

Hello,
I had the same problem. In the most cases I did not even see a map. I tried different maps and settings for three weeks now. I also tried the nighly buiIds. I have a Acer Iconia A1 810 with Mediatek processor and Android 4.4.2. I thought it came with the Android update. I installed the version without Jit and its running fine now. Thanks for the solution! How about updates for this special version?

@SammysHP

This comment has been minimized.

Copy link
Member

commented Sep 13, 2014

There won't be any updates for that specific version as it was signed with my certificate. But as long as the issue is not fixed (either by MediaTek, Lenovo or Mapsforge) we might try providing a second nightly build without JIT.

@Bananeweizen is not available currently. Can someone else create a second build job (copy of the nightly build) that patches our AndroidManifest.xml and adds

android:vmSafeMode="true"

in the application tag?

@2Rusties

This comment has been minimized.

Copy link

commented Sep 13, 2014

I also installed the modified version on my THL 5000 and it's also working there. Thanks a lot for solving the problem, I hope there will be a sustainable solution for the future. By the way: Switching from Dalvik to ART didn't solve the problem.

@mucek4

This comment has been minimized.

Copy link
Member

commented Sep 13, 2014

@SammysHP I would recommend a release build without a JIT. If anybody knows what devices are this we could disable them in play.

@SammysHP

This comment has been minimized.

Copy link
Member

commented Oct 30, 2014

@samueltardieu

This comment has been minimized.

Copy link
Member

commented Oct 30, 2014

@SammysHP I've read them all, but it doesn't make it clearer to me how you are proposing to distribute this new version if not through the Play Store, and what do you want to base it on. Nightly builds? Release branch? Release tags?

@SammysHP

This comment has been minimized.

Copy link
Member

commented Oct 30, 2014

First of all it would be nice to have a second nightly build with JIT disabled. The next step would be to add a check in c:geo that shows a message if a MedaTek CPU was detected, e.g.

Your phone has a CPU from MediaTek. Due to bugs in the firmware, c:geo might not work properly. If you notice any problems, please try this version: …

@Torgut

This comment has been minimized.

Copy link

commented Dec 6, 2014

Dear friends, today I bought a new smartphone. I did it because I am traveling to Cuba this week and needed a replacement to my handheld GPS, which is not allowed in the country. Well... to my dismay Mapsforge maps will behave like described in this topic. C:Geo and Cachesense can't render the maps. However, Cruiser can, but it's basically useless.

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2014

@Torgut I am not sure if this already has been tried and whether it can be working technically in the first place, but if your phone has at least version 4.4 (kitkat), you might try if it helps switching to the ART-runtime if possible.

@Torgut

This comment has been minimized.

Copy link

commented Dec 7, 2014

Yes, it's 4.4 Kitkat. I will investigate that situation, thanks for suggesting.

@Torgut

This comment has been minimized.

Copy link

commented Dec 7, 2014

OK... I did it. Didn't help. Although I find it odd that after rebooting it only took one minute for the phone to be operative. As far as I know it should had taken a much longer time.

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2014

Thanks for the test. I am looking into setting up a second build with jit disabled as suggested, in order to have at least a nightly available. You could in the meantime cross-check with the developer build from here: #4097 (comment)
to see whether this would help. In order to install this build you likely need to uninstall the current version first (and if you already have caches in your db, consider a backup first).

@Torgut

This comment has been minimized.

Copy link

commented Dec 7, 2014

Ah I did try that version. Yes it works BUT... for some reason it fails to import most of the personalized points I created (I follow a long process which starts by using Google Earth to mark places I want to visit and so, then save KML, then export to GPX, then open with GSAK, then put together with geocaches and then finally import with an Android app (C:GEO, Cachebox, Cachesense).

Sadly the only of the three rendering mapsforge maps right now is C:GEO with that build. I say sadly because in the other hand C:GEO is also the only of the three having troubles importing my points :-(

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2014

Did you have the import trouble also with the nightly build? If so, please open a new separate issue for that.
If not, pleas stay tuned as I will try to get an up-to-date build with JIT disabled.

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2014

The build as such is ready but the upload part requires some works still. For now, an up-to-date version built from current master:
https://www.dropbox.com/s/ymzs1tcmjybl4c0/c-geo-nightly-nojit.apk?dl=0

@Torgut

This comment has been minimized.

Copy link

commented Dec 7, 2014

Yes, the import trouble occurs with all the builds.

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2014

Than please open a new issue for that with a description of expected and observed behaviour and a sample GPX to reproduce the problem.

@Lineflyer

This comment has been minimized.

Copy link
Member

commented Dec 10, 2014

Another affected device (reported on support mail):

  • Blackview Crown

Installing the no-jit version works for the user.

@SammysHP

This comment has been minimized.

Copy link
Member

commented Dec 10, 2014

@rsudev
Any progress with the non-jit nightly build?

@rsudev

This comment has been minimized.

Copy link
Contributor

commented Dec 16, 2014

@SammysHP The build as such works, so the nightly can be download through Jenkins. I didn't yet get around to create the ftp-upload script for that.

@cerisara

This comment has been minimized.

Copy link

commented Mar 10, 2015

Another affected device: Wiko Goa.
I uninstalled the Google play version, and installed the latest non-jit build link above, and it's working fine.
Could you please give an update about what's the plan for the future releases/builds ? What about systematically distributing another application: c-geo-nonjit.apk ?
Thanks !

@SammysHP

This comment has been minimized.

Copy link
Member

commented Mar 10, 2015

We cannot simply distribute a special version via the Play Store. The only possibility (as posted above) is to add a warning for affected devices and provide a special version on our website.

@rsudev said that the build is working - so let's check it… I don't know if you can access this deep link, but try it.

http://ci.cgeo.org/job/c-geo-nightly-nojit/ws/main/bin/cgeo-release.apk

@cerisara

This comment has been minimized.

Copy link

commented Mar 10, 2015

Thanks, I can access the link, I installed the non-jit-march version, and it works.
I personally don't care about play store. So your solution is fine. I'm just pushing for this non-jit build to be
indeed systematic (by adding it alongside the normal build in the standard maven/gradle/... release target) and that it is also automatically deployed on your website with a visible link. If so, then I'm more than happy ;-)

Btw, does just-in-time compilation really make a difference ? Did anyone evaluated the gain in speed ? Well, I guess so, otherwise, people wouldn't ask for it...
Thanks a lot !

@SammysHP

This comment has been minimized.

Copy link
Member

commented Mar 10, 2015

Yes, there is a difference, but I have not measured it for c:geo.

The link to the non-jit version stays valid, a version is built automatically every night (in Europe).

@SammysHP SammysHP changed the title Mapsforge not working with MediaTek CPUs Wrong division with MediaTek CPUs Mar 31, 2015

ge0rg added a commit to ge0rg/aprsdroid that referenced this issue Jun 2, 2015

@SammysHP

This comment has been minimized.

Copy link
Member

commented Jun 29, 2015

OK, let's close this. We have the non-jit nightly build running and that's all we can do. If it works in the future, it will be a side effect of other changes (e.g. Mapsforge update, ROM update etc.).

@SammysHP SammysHP closed this Jun 29, 2015

@cerisara

This comment has been minimized.

Copy link

commented Jun 28, 2017

Too bad the link to the no-jit version is not working any more... :-(

@cerisara

This comment has been minimized.

Copy link

commented Jun 29, 2017

Thanks a lot !

ge0rg added a commit to ge0rg/aprsdroid that referenced this issue Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.