Reply
Thread Tools
Posts: 1,746 | Thanked: 1,832 times | Joined on Dec 2010
#31
tested on one Sony X, works well if routing worked this would be handy for an Uber app
 

The Following 2 Users Say Thank You to m4r0v3r For This Useful Post:
Posts: 578 | Thanked: 994 times | Joined on Dec 2012
#32
Testing: mapbox-sfos 0.1+master.20170916171905.daedaf3-10.6.1.jolla

Device: Photon Q
SFOS version: 2.1.0.11
Helsinki, Punavuori, Kluuvi looks correct but Fabianinkatu and few others flick when Bearing or pitching.
There are also other artefacts: black rectangle in top left corner and black flicking lines when bearing or pitching.
gdb log: https://pastebin.com/HyeSExgU
Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4637c390 (LWP 8020)]
0x43502948 in ?? ()
(gdb) bt full
#0  0x43502948 in ?? ()
No symbol table info available.
#1  0x4350f988 in ?? ()
No symbol table info available.
#2  0x4350f988 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
/proc/pid/maps gives me:
434be000-43593000 r-xp 00000000 103:05 79376 /system/lib/egl/libGLESv2_adreno200.so
I guess it's not good.

Last edited by elros34; 2017-09-17 at 20:23.
 

The Following 2 Users Say Thank You to elros34 For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#33
Thank you all very much for taking time and testing. I will wait for a bit more tests to come in and then would make the table. As far as I understood, J1 could be a problem and should be tested further. We are also missing tests on Jolla Tablet.

Please test only if you have 2.1.x.y versions of SFOS - 2.0.5.6 is not supported at this stage.

Specific replies:

@Zeta: On normal systems you would usually see OOM killer in dmesg. Not sure it is there in SFOS. I have not thought that this app would take too much RAM. On my phone it takes about 100 MB RSS (250 MB virtual). Shouldn't be too much, I guess.

However, looks like there is something fishy with memory handling going on. I presume that OOM would not result in SIGSEGV in free(). Maybe someone can help us with tutorial on how to get debug symbols into your backtraces...

@PamNor: Your experience sounds to be fine and an expected one. On SFOS emulator/vm, there are no labels at all - hence the question regarding labels. Labels are expected to appear/disappear while you rotate/tilt the map since there are some parameters controlling how much can they overlap.

@m4r0v3r: no worries, will get there quite soon, I hope.

@elros34: seems like we have the same black box as in J1. You also seem to hit one of the crashes as experienced by Zeta. I'll try to run the whole thing in valgrind, let's see what will happen.

Edit: valgrind no go since it complains about illegal instruction on all tested programs.

Last edited by rinigus; 2017-09-17 at 20:04.
 

The Following User Says Thank You to rinigus For This Useful Post:
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#34
Originally Posted by rinigus View Post
@Zeta: On normal systems you would usually see OOM killer in dmesg. Not sure it is there in SFOS. I have not thought that this app would take too much RAM. On my phone it takes about 100 MB RSS (250 MB virtual). Shouldn't be too much, I guess.

However, looks like there is something fishy with memory handling going on. I presume that OOM would not result in SIGSEGV in free(). Maybe someone can help us with tutorial on how to get debug symbols into your backtraces...
I didn't see anything in dmesg, but as OOM appends regularly on Jolla 1, that was my obvious first thing to check.

Anyway, so far it seems that the problem is real and appends at least on the two weaker (CPU/GPU/RAM) phones tested, as Jolla 1 and Photon Q are both from 2012/2013 era with "only" 1GB RAM and Adreno 305/320 GPU. Not sure if that is a coincidence or not yet...
 

The Following User Says Thank You to Zeta For This Useful Post:
Posts: 578 | Thanked: 994 times | Joined on Dec 2012
#35
I have 1GB swap enabled so it is not OOM killer.
 

The Following 2 Users Say Thank You to elros34 For This Useful Post:
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#36
Originally Posted by rinigus View Post
Maybe someone can help us with tutorial on how to get debug symbols into your backtraces...
I got lost when trying it before, as gdb was giving commands to install them with "zypper", which appears to not be the good package manager on the Jolla (I am not far of 1 package manager per device I use, so it is sometime difficult to remember which one is used where....)
Code:
pkcon install glibc-debuginfo
Seems to do the trick.

The latest full trace and memory mapping with this are here : https://pastebin.com/Dmr34wGS
and https://pastebin.com/gs9Jv0VT


It never fail at the same place for me, but in my last tests this appends mostly around malloc/free calls.

By the way, I may have not said it before, there is a warning that I didn't take seriously before as it mostly works, but anyway, here it is:
Code:
[nemo@Sailfish ~]$ mapbox-sfos 
[D] unknown:0 - Using Wayland-EGL
[W] unknown:0 - Could not find any zN.M subdirs!
[W] unknown:0 - Theme dir "/usr/share/themes/jolla-ambient/meegotouch/z1.0/" does not exist
 

The Following 2 Users Say Thank You to Zeta For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#37
Originally Posted by rinigus View Post
I have managed to compile Mapbox GL Native for SFOS and tested it with the small app. All seems to be working as expected. Even in online mode, its fast, allows smooth transitions and so on.
Nice! Thanks a lot!

This should really help a lot, jut to name a few things that an Open GL based map view could provided in comparison to the custom tile based more or less 2D QML element:
  • support for proper rotation of maps (no upside down labels)
  • support for nicely animated transitions (zooming, map re-centering)
  • non-90 degree camera angle (eq. what common car navigation devices usually due in turn-by-turn navigation mode)
  • possibility for live style changes (no need to switch layers to switch on night mode or the possibility to highlight specific map elements - like roads - on the fly)

Originally Posted by rinigus View Post
SFOS packaging: Compilation relies on recent gcc (using 6.4.0, https://build.merproject.org/package...oolbox/opt-gcc). The compiled Qt version of the library is available at https://build.merproject.org/package...maps/qmapboxgl on the basis of https://github.com/rinigus/pkg-mapbox-gl-native .

QML integration: At present, Mapbox GL Native development is targeting Qt/QML through QtLocation 5.9 plugin. As a result, direct interface with QML was removed in the beginning of March 2017.

I have made a small project that would allow us to interface Mapbox GL through QML at https://github.com/rinigus/mapbox-gl-qml . Idea is to compose the interface that can be used by mapping applications for showing and interacting with the maps. Interface between OpenGL and QML is based on the same approach as used in the current implementation for QtLocation. This looks to be compatible with Silica as well, as much as I tested.
Yeah, that sounds to me as the way to go. We still can't use any form of Qt Location for Jolla Store apps, so depending on Qt Location from Qt 5.9 when another Qt 5 update on Sailfish OS is not even on the horizon is really a no-go.

What is the QML interface of the element like going to look like & what features will it likely support ?
Eq.: Just map centering, zooming control, etc. or more advanced stuff like POI markers any polyline display (routing trace/track logs) ? I've took a quick a for documentation of the upstream mapbox/mapbox-gl-native API and have not been really able to find a clear answer.

I guess if there is no marker/polyline support in the widget itself I should be able to use the existing polyline & POI overlays in modRana by putting them on top of the widget and adjusting them accordingly (scale, rotation, offset, etc.). But it could be quite tricky if the widget supports non-90 degree view angles & fractional scrolling. Also synchronization with animations would have to be handled so that the overlay does not lag behind during animations. Coordinate transformations could also potentially by fun in some cases.

Originally Posted by rinigus View Post
Small SFOS app is available at https://github.com/rinigus/mapbox-demo-sfos and shows how to integrate developed QML interface into the app as well as the integration with gcc-6.4.0.

I am letting you know about the development early, so we can discuss the ways we can integrate it with the available map applications (Poor Maps, modRana, Maep, and others). There is plenty to do, but all seems to be doable at this stage and shouldn't take a while before we'll get the map applications based on OpenGL rendering. Ideally, we should keep the same source code trees for tile-based and OpenGL map applications.
I'll likely integrating this map view first as an alternative option to the current fully tile based map view. At least until the features people expect to work (polylines, markers, maybe also overlays ?) can be provided by the Open GL based view as well.

BTW, what about offline usage ? Looking at the available documentation the widget seems to be basically locked to Mapbox for the input data for it's map rendering. How feasible does it look like making it (optionally ?) consume locally available data packs managed by OSM Scout Server and hosted @ modrana.org (as we already do with the other data packs) ?

And thanks yet again for working on all this! It's incredible what all you have accomplished so far!
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 2 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#38
Originally Posted by Zeta View Post
I got lost when trying it before, as gdb was giving commands to install them with "zypper", which appears to not be the good package manager on the Jolla (I am not far of 1 package manager per device I use, so it is sometime difficult to remember which one is used where....)
Code:
pkcon install glibc-debuginfo
Seems to do the trick.

The latest full trace and memory mapping with this are here : https://pastebin.com/Dmr34wGS
and https://pastebin.com/gs9Jv0VT


It never fail at the same place for me, but in my last tests this appends mostly around malloc/free calls.

By the way, I may have not said it before, there is a warning that I didn't take seriously before as it mostly works, but anyway, here it is:
Code:
[nemo@Sailfish ~]$ mapbox-sfos 
[D] unknown:0 - Using Wayland-EGL
[W] unknown:0 - Could not find any zN.M subdirs!
[W] unknown:0 - Theme dir "/usr/share/themes/jolla-ambient/meegotouch/z1.0/" does not exist
Looking good. Would you mind to add debug info for qmapboxgl and mapbox-sfos. As far as I can see, its packages qmapboxgl-debugsource and mapbox-sfos-debuginfo . Actually, you could add http://repo.merproject.org/obs/home:...mv7hl/armv7hl/ as a repo and then just use
Code:
pkcon install
. It will also allow you to upgrade in future, while we hunt for the bug.

If I can get these crash backtraces, we could open an issue for mapbox-gl-native and explain what has been done to make it run on SFOS. Maybe they can help.

As for crashes occurring for J1 and Photon Q: I wonder if its some OpenGL limitation of these devices. I haven't fiddled with OpenGL settings while compiling qmapboxgl, but maybe I should (have to look it up). But then not sure why it would crash on free/malloc calls...
 

The Following User Says Thank You to rinigus For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#39
Originally Posted by MartinK View Post
...

Yeah, that sounds to me as the way to go. We still can't use any form of Qt Location for Jolla Store apps, so depending on Qt Location from Qt 5.9 when another Qt 5 update on Sailfish OS is not even on the horizon is really a no-go.
As far as I remember, qmapboxgl does use some QtLocation structures, but I could be mistaken. If this will disqualify it from current Harbour - so be it. I am sure that Jolla will change the rules regarding QtLocation when they manage to get into working on QtLocation 5.6. There is surely a pressure from their customers to get it sorted, maybe just would take some time. In meanwhile, we can distribute via OpenRepos, if needed.

Originally Posted by MartinK View Post
What is the QML interface of the element like going to look like & what features will it likely support ?
Eq.: Just map centering, zooming control, etc. or more advanced stuff like POI markers any polyline display (routing trace/track logs) ? I've took a quick a for documentation of the upstream mapbox/mapbox-gl-native API and have not been really able to find a clear answer.
Mapbox GL Native allows you to add all these elements via GeoJSON and styling of the data. This should allow to add POIs, routes, any polygon... See https://github.com/mapbox/mapbox-gl-...window.cpp#L96 for the start of the example. I am planning to expose similar API as well as write a small wrapper allowing you to add routes/POIs/location icon easier. So, you would not have to draw anything above it, just regular widgets as you do for interaction. Let's see where I can get in a week.

Originally Posted by MartinK View Post
I'll likely integrating this map view first as an alternative option to the current fully tile based map view. At least until the features people expect to work (polylines, markers, maybe also overlays ?) can be provided by the Open GL based view as well.
We would probably need tile-based widgets, as you all have already, as well to support sources that are not compatible with the mapbox-gl. So, you would probably end up having two alternative ways to show the maps that you would have to switch in between in the application.

Originally Posted by MartinK View Post
BTW, what about offline usage ? Looking at the available documentation the widget seems to be basically locked to Mapbox for the input data for it's map rendering. How feasible does it look like making it (optionally ?) consume locally available data packs managed by OSM Scout Server and hosted @ modrana.org (as we already do with the other data packs) ?
Widget seems to be locked. Its actually possible to use other data sources, as done for https://openmaptiles.org/ . Right now I am developing against Mapbox data sources, since it easiest. Already now it should be possible to use other sources, but I have not tried.

As for offline, as soon as widget is ready, I am planning to add offline support for it via OSM Scout Server. We should be able to squeeze in additional datapack for mapbox gl, I presume it will be of similar size to mapnik datapack. Hopefully, data.modrana.org will be fine to host it . So, the plan is to go all the way with the full online and offline support. And I don't think there are any major roadblocks on the way.
 

The Following User Says Thank You to rinigus For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#40
Originally Posted by elros34 View Post
Testing: mapbox-sfos 0.1+master.20170916171905.daedaf3-10.6.1.jolla

Device: Photon Q
SFOS version: 2.1.0.11
Helsinki, Punavuori, Kluuvi looks correct but Fabianinkatu and few others flick when Bearing or pitching.
There are also other artefacts: black rectangle in top left corner and black flicking lines when bearing or pitching.
gdb log: https://pastebin.com/HyeSExgU
Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4637c390 (LWP 8020)]
0x43502948 in ?? ()
(gdb) bt full
#0  0x43502948 in ?? ()
No symbol table info available.
#1  0x4350f988 in ?? ()
No symbol table info available.
#2  0x4350f988 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
/proc/pid/maps gives me:
434be000-43593000 r-xp 00000000 103:05 79376 /system/lib/egl/libGLESv2_adreno200.so
I guess it's not good.
Edit: Looks like the same lib is used in J1. In my case (Oneplus X), I have libGLESv2_adreno.so (and others similar, without 200). Whether its an issue, don't know - I am not a specialist on OpenGL.

Last edited by rinigus; 2017-09-18 at 07:54.
 

The Following User Says Thank You to rinigus For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:00.