Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#3
Originally Posted by rinigus View Post
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

* run
Code:
qmlscene mapbox-gl-qml.qml
Zeta 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).

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).
I tested with this new simple QML app, and first comment is that it looks great ! It is fast (no visible lags, adapts quite well to the zoom level), so a big applause once more to have been able to provide something like this to the Sailfish community.

Now for the tests itself:
* Played with it for quite some time with this basic red theme, and didn't notice anything wrong. I moved/zoomed around as fast as possible (in the range of "normal use" to "crazy as hell") without any crash.
* Seeing at it looks like it was working well, I edited the QML to remove the "jsonStyle" part, to get back to the standard map (it is really easy to do, good job!), and I got it working for quite some time. As a lot is now displayed, it is fun to zoom/move/unzoom/move somewhere else. At the end, I got another crash (segmentation fault). it can work from 10 to 30 seconds before the crash when torturing it (from world to street level and back to another country streets in seconds). Using it a bit less fast (looking around a single city), it can last close to 1 minutes. And if only zooming in a park and not touching it, except to keep it from shutting screen, then it seems to run forever (I stopped after 7 minutes, by moving around as fast as possible and it then crashed).

So at this end, the way it is used impacts the time it takes to crash, and the simple red theme, if it could finally crash, does it after a long time of torturing it.
Likely some resources exhaustion (network, ram, gpu, handles of something ?), some timing issues (the more it is to do, the more likely a collision can occur), memory/stack corruption, or a specific program path that leads to the crash when a specific item has to be computed/drawn ? Nothing easy to find so...
The main differences between the Jolla1 and the other are mainly the gpu driver, and some more limited hardware. There are also different kernel and the like.

With full map, the crash can appear anywhere it seems. gdb output is:
Code:
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?)
Or :
Code:
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: