The Following 29 Users Say Thank You to rinigus For This Useful Post: | ||
acrux, ajalkane, BentL, carmenluci, claustn, coderus, dcaliste, eekkelund, ejjoman, imaginaryenemy, Jordi, juiceme, klinglerware, lal, ljo, MartinK, nodevel, OVK, P@t, PamNor, rcolistete, seiichiro0185, suicidal_orange, taixzo, tealc, ThomasAH, tmi, wdehoog, Zeta |
|
2017-10-13
, 10:04
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#2
|
qmlscene mapbox-gl-qml.qml
The Following 4 Users Say Thank You to rinigus For This Useful Post: | ||
|
2017-10-13
, 20:25
|
Posts: 339 |
Thanked: 1,623 times |
Joined on Oct 2013
@ France
|
#3
|
To test whether very primitive style helps against crashes on Jolla 1, maybe someone could test QML-only app? For that:
* Install https://build.merproject.org/package...s/mapboxgl-qml (download from http://repo.merproject.org/obs/home:...mv7hl/armv7hl/)
* Get QML-only demo at https://github.com/rinigus/mapbox-de...aster/qml-only . You would need the both QML files in this directory
* runZeta has reported absence of crashes in C++ compiled app with dynamically linked libstdc++ (https://talk.maemo.org/showpost.php?...&postcount=125) and crashing on start with the statically linked libstdc++ (https://talk.maemo.org/showpost.php?...&postcount=123).Code:qmlscene mapbox-gl-qml.qml
At present, QML plugin is statically linked with newer stdc++. So, I wonder if that would work on J1. On other devices I don't expect any problems (except Photon Q).
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x4816e3a0 (LWP 5624)] 0x4553db2c in mbgl::VectorTileLayer::getFeature(unsigned int) const () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so (gdb) bt full #0 0x4553db2c in mbgl::VectorTileLayer::getFeature(unsigned int) const () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so No symbol table info available. #1 0x454b0290 in mbgl::GeometryTileWorker::redoLayout() () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so No symbol table info available. #2 0x4acb1b60 in ?? () Cannot access memory at address 0x0 No symbol table info available. #3 0x4acb1b60 in ?? () Cannot access memory at address 0x0 No symbol table info available. Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x481643a0 (LWP 5759)] 0x40edb734 in malloc_consolidate (av=av@entry=0x44d00010) at malloc.c:4165 4165 malloc.c: No such file or directory. (gdb) bt #0 0x40edb734 in malloc_consolidate (av=av@entry=0x44d00010) at malloc.c:4165 #1 0x40edd13e in _int_malloc (av=av@entry=0x44d00010, bytes=bytes@entry=512) at malloc.c:3423 #2 0x40ede77c in __GI___libc_malloc (bytes=512) at malloc.c:2891 #3 0x40d8d7a8 in operator new(unsigned int) () from /usr/lib/libstdc++.so.6 #4 0x456d0716 in void std::vector<protozero::data_view, std::allocator<protozero::data_view> >::_M_emplace_back_aux<protozero::data_view>(protozero::data_view&&) () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so #5 0x456d0a3a in mapbox::vector_tile::layer::layer(protozero::data_view const&) () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so #6 0x456cedf6 in mbgl::VectorTileLayer::VectorTileLayer(std::shared_ptr<std::string const>, protozero::data_view const&) () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so #7 0x456cef50 in mbgl::VectorTileData::getLayer(std::string const&) const () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so #8 0x4563eeea in mbgl::GeometryTileWorker::redoLayout() () from /usr/lib/qt5/qml/MapboxMap/libqmlmapboxglplugin.so #9 0x482973c0 in ?? () Cannot access memory at address 0x0
The Following 4 Users Say Thank You to Zeta For This Useful Post: | ||
|
2017-10-13
, 21:12
|
Posts: 172 |
Thanked: 353 times |
Joined on Nov 2014
|
#4
|
[nemo@Sailfish mapbox]$ qmlscene mapbox-gl-qml.qml [D] unknown:0 - Using Wayland-EGL [D] onCompleted:334 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component [ERROR] {QSGRenderThread}[Style]: Failed to load sprite: HTTP status code 404 [ERROR] {QSGRenderThread}[Style]: Failed to load sprite: HTTP status code 404 [nemo@Sailfish mapbox]$
|
2017-10-14
, 07:03
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#5
|
|
2017-10-14
, 20:06
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#6
|
LD_LIBRARY_PATH=/usr/lib/qt5/qml/MapboxMap qmlscene mapbox-gl-qml.qml
|
2017-10-15
, 14:22
|
Posts: 339 |
Thanked: 1,623 times |
Joined on Oct 2013
@ France
|
#7
|
Zeta, just in case if the shared stdc++ is better, please try to run with QML plugin from https://build.merproject.org/package...g/mapboxgl-qml
This version is compiled with shared libstdc++ with the corresponding library installed at /usr/lib/qt5/qml/MapboxMap . Now before I'll be breaking my neck and figuring out how to explain to qmlscene that the libs from that directory have a preference, please run with
Try to see if you could make it crash with the red and full styles, please.Code:LD_LIBRARY_PATH=/usr/lib/qt5/qml/MapboxMap qmlscene mapbox-gl-qml.qml
If its the same result as with the statically linked stdc++, I'll prefer to use that version. Then, before moving back to the statically linked plugin, please uninstall plugin first. Otherwise you'll leave libstdc++ in the plugin directory.
[nemo@Sailfish test]$ LD_LIBRARY_PATH=/usr/lib/qt5/qml/MapboxMap /usr/lib/qt5/bin/qmlscene mapbox-gl-qml.qml [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 [D] onCompleted:334 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component terminate called after throwing an instance of 'mbgl::gl::Error' what(): glDrawElements( static_cast<GLenum>(primitiveType), static_cast<GLsizei>(indexLength), GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(sizeof(uint16_t) * indexOffset)): Error GL_OUT_OF_MEMORY at src/mbgl/gl/context.cpp:681 Aborted
The Following 4 Users Say Thank You to Zeta For This Useful Post: | ||
|
2017-10-15
, 14:51
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#8
|
|
2017-10-15
, 15:43
|
Posts: 339 |
Thanked: 1,623 times |
Joined on Oct 2013
@ France
|
#9
|
Do you want to submit your findings into the issue https://github.com/mapbox/mapbox-gl-native/issues/10029 ?
The Following 3 Users Say Thank You to Zeta For This Useful Post: | ||
|
2017-10-15
, 20:18
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#10
|
cacheDatabaseStoreSettings: true cacheDatabaseDefaultPath: true
It is recommended to use this as QML plugin and use it through QML interface. It is possible to use the developed plugin by incorporating it on C++ source level, but then you will need newer gcc (>=4.9). When using QML interface, older gcc provided with SFOS is sufficient.
I am starting this thread to provide simple to find information on this QML plugin and to mark the readiness of the plugin for general development of map applications. This thread could be considered as a continuation of "brainstorm" thread https://talk.maemo.org/showthread.php?t=93358 and the step towards implementation of the original brainstorm request.
Project GitHub page: https://github.com/rinigus/mapbox-gl-qml
Documentation: https://github.com/rinigus/mapbox-gl.../master/api.md
License: LGPL3. For the gesture area interaction component, MIT.
Requirements: Qt >= 5.6
SFOS packaging:
OBS: https://build.merproject.org/package...s/mapboxgl-qml
OpenRepos: https://openrepos.net/content/rinigu...indings-qt-qml
C++ development library
QMapboxGL for C++ development is packaged using https://github.com/rinigus/pkg-mapbox-gl-native and available at https://build.merproject.org/package...maps/qmapboxgl.
Example code
As an example, see a QML item that would show a map that can be zoomed and panned
Current issues
Issues are followed on GitHub project page at https://github.com/rinigus/mapbox-gl-qml/issues
Current main issue is crashes on Jolla 1 and Photon Q.
Obligatory screenshots
Poor Maps prototype showing
- a road found by routing component incorporated into the map under the layer with the labels
- POIs drawn on the map with the labels and interactive QML dialog following geographical location of POI
.Last edited by rinigus; 2017-12-16 at 21:13. Reason: Recomended API is via QML