rinigus / pure-maps

Maps and navigation
https://rinigus.github.io/pure-maps/
GNU General Public License v3.0
252 stars 43 forks source link

App crashes when selecting menu Pure Maps #582

Open wilfridd opened 2 years ago

wilfridd commented 2 years ago

[MiA2, halium 9] , RC 2021-50. I recently updated to have sensor working for compass and magnometer. Since then, with map type set as Default, the app crashes when selecting the "nine dots" menu which leads to screen Pure Map. Workaround : I set the map type to Hybrid or Terrain then back to Default and it does not crash

rinigus commented 2 years ago

Can you specify platform as well? Ubuntu Touch? Some other Linux?

wilfridd commented 2 years ago

Ubuntu Touch on halium device. Let me know if I can provide any log

rinigus commented 2 years ago

@jonnius - looks like your "customer" :)

jonnius commented 2 years ago

Thanks for reporting. This is a weird issue. I was able to reproduce a freeze instead of a crash two times and no I can't reproduce it any more. My observation:

I don't understand why there is something about libertine in the logs. Libertine is a container solution for running desktop apps in Ubuntu Touch and a normal app like Pure Maps should have nothing to do with it.

jonnius commented 2 years ago

@wilfridd, is the issue reproducible for you? Could you provide me with a log file which is located at ~/.cache/upstart/application-click-pure-maps.jonnius_pure-maps_2.9.0.log?

wilfridd commented 2 years ago

Thanks for your fast reply! application-click-pure-maps.jonnius_pure-maps_2.9.0.log Last session at 2021-12-17 20:15 ends with a crash :

Another here : application-click-pure-maps.jonnius_pure-maps_2.9.0.log

jonnius commented 2 years ago

I am afraid that the log does not really contain anything pointing to the root cause of your crash.

This weekend I had the chance to test navigation with MapTiler on the road and found it quite buggy. On starting the navigation I got a flickering switching forth and back between the navigation menu and map view.

rinigus commented 2 years ago

@jonnius: MapTiler should be unrelated - if there is some kind of flickering it should appear with any vector tiles based maps. What do you mean by "navigation menu" - routing page or something that is overlayed on top of the map on main map page?

Is this bug hardware specific?

Note that on SFOS I don't see anything like it.

jonnius commented 2 years ago

By navigation menu I mean the routing page. On my trip there was clearly a huge difference between Offline profile, where I didn't see any issues at all and Online profile with MapTiler, where those different issues appeared (menu freeze for me, app crash for wilfridd, the endless loop of switching forth and back between routing page and map page for me). I also tried the Online Here profile and did not encounter any issues. I need to do more testing these days.

About being device specific: Possible. wilfridd uses a halium 9 device (based on Android 9). My device is halium 7. Those HALs sometimes behave differently. In desktop mode I can't reproduce the issue.

jonnius commented 2 years ago

@wilfridd, could you try whether you can reproduce any issues with the other maps like Mapbox?

rinigus commented 2 years ago

OK, so it was a combination of MapTiler and some router that you used for route calculation (Stadia, I presume). But what's odd is that online and offline maps both use mapboxgl vector tile rendering. There could be differences in how much it is stressing gpu, but still. In particular, switching between pages is very strange.

wilfridd commented 2 years ago

@jonnius , I got no crash with type=Default and these map providers : here, mapbox, opentopomap. Hsl, openslopemap doesn't seem to work for me (grey background)

merisilta commented 2 years ago

Unfortunately the same on SFOS 4.4.0.58 on X10II after flashed back to Android11 and reflashed SFOS. When starting PureMaps first, I can choose profile offline to use OSMScoutServer. From now I can enter menu, but when I choose any menu item, the app crashes. Restart the app doesn't help. Reboot the phone makes that I can use menu once. The next use of menu crashes the app again.

rinigus commented 2 years ago

Try to remove cache of Pure Maps and maybe its config as well. If it wouldn't help, try to make logs

merisilta commented 2 years ago

This doesn't help. Unfortunately I do not know how to create a logfile. But I have noticed the following. When I turn off location on the phone, the app responds very smoothly and quickly. There are no crashes. As soon as I turn location on and have a GPS fix, PureMaps responds sluggishly. Sometimes the app freezes or crashes.

popanz commented 1 year ago

Hi, my Pro1 died, so I had to switch to a Xperia X 10 II. On my Pro1 I had no problems, on my Xperia it tends to be nearly unusable. Behaviour is exactly the same as described by @merisilta. When Puremaps crashes, I get these lines in dmesg:

[Mi Mai 31 17:57:15 2023] binder: 2774:2774 transaction failed 29189/-22, size 32-0 line 3096
[Mi Mai 31 17:57:16 2023] kgsl kgsl-3d0: booster-silica-[5797]: gpu timeout ctx 13 ts 1067964
[Mi Mai 31 17:57:16 2023] kgsl kgsl-3d0: booster-silica-[5797]: gpu fault ctx 13 ctx_type GL ts 1067964 status 00E79425 rb 01d3/0218 ib1 00000007FEE5E000/05de ib2 00000007F9E7C5AC/12d2
[Mi Mai 31 17:57:16 2023] kgsl kgsl-3d0: booster-silica-[5797]: gpu fault rb 2 rb sw r/w 01d3/0218
[Mi Mai 31 17:57:16 2023] kgsl kgsl-3d0: booster-silica-[5797]: gpu failed ctx 13 ts 1067964

Does that help to debug? or how can I help here? Is Puremaps writing it's own logs somewhere. I know that OSM Scout Server does. But I have no clue if Puremaps does.

I have no API Keys filled in and I'm running Puremaps only in Offline Mode. I installed from Chum.

rinigus commented 1 year ago

Anything on Pure Maps output? If you start it from cmd line in terminal...

Try also to remove qml caches, it may help.

popanz commented 1 year ago

Hi rinigus, thanks for your quick response. In the meantime I don't think, that Pure Maps is the main culprit. I have opened a thread on Sailfish forum: https://forum.sailfishos.org/t/xperia-x-10-ii-gpu-heavily-affected-by-gps-fix-pure-maps-and-other-gps-related-apps-4-5-0-19/15794. But maybe crash handling could be better in Pure Maps. If I start Pure Maps from cli I get this output (from start to crash):

[defaultuser@Xperia10II-DualSIM ~]$ harbour-pure-maps
Current locale: de_DE
Loaded translation
[D] unknown:0 - Using Wayland-EGL
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
[D] unknown:0 - Got library name:  "/usr/lib64/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
[I] unknown:0 - Acquired QGeoPositionInfoSource: "geoclue"
[D] unknown:0 - Tracking  "io.github.rinigus.OSMScoutServer"
[W] unknown:71 - file:///usr/share/harbour-pure-maps/qml/PositionSource.qml:71: TypeError: Cannot read property 'center' of null
[D] onCompleted:580 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:0 - Translation not found for navigator: "en"
Started DBus service at io.github.rinigus.PureMaps
[D] init:78 - Initializing voice engine navigator en female
[D] init:83 - Voice engine: navigator PicoTTS active=true
[D] init:78 - Initializing voice engine navigator en female
[D] init:83 - Voice engine: navigator PicoTTS active=true
[D] init:78 - Initializing voice engine navigator de_DE female
[D] init:83 - Voice engine: navigator PicoTTS active=true
[D] unknown:0 - Loaded translation for navigation "de_DE"
[D] unknown:0 - Reset locations true 0 2
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[W] unknown:0 - [ INFO ]  "{unknown}[General]: GPU Identifier: Adreno (TM) 610"
[D] unknown:0 - Geoclue client path: "/org/freedesktop/Geoclue/Master/client9"
[W] unknown:91 - file:///usr/share/harbour-pure-maps/qml/pure-maps.qml:91:5: QML PositionSource: Binding loop detected for property "active"
[W] unknown:0 - Positioning update timeout
[D] unknown:0 - Service appeared  "io.github.rinigus.OSMScoutServer"
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[D] unknown:0 - Geoclue client path: "/org/freedesktop/Geoclue/Master/client13"
[W] unknown:91 - file:///usr/share/harbour-pure-maps/qml/pure-maps.qml:91:5: QML PositionSource: Binding loop detected for property "active"
[W] unknown:91 - file:///usr/share/harbour-pure-maps/qml/pure-maps.qml:91:5: QML PositionSource: Binding loop detected for property "active"
[D] unknown:0 - Geoclue client path: "/org/freedesktop/Geoclue/Master/client14"
Calculated magnetic declination 3.5380437166457512
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
Killed
[defaultuser@Xperia10II-DualSIM ~]$

I used already the clear map cache from inside the app, but it doesn't really help.