janbar / osmin

GPS Navigator On-Road/Off-Road for Android and Linux devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rendering issues on Pixel 4A

hrdl-github opened this issue · comments

commented

When testing osmin 1.8.4 on a Pixel 4a running GrapheneOS I noticed that the rendering is not as sharp as on my laptop. Especially rendered text and railway connections are affected. The copyright notice and scale indicator are rendered just fine. What assumptions does the renderer make? I did not immediately see a way to enable debug output in libosmscout.
osmin_1
osmin_2

The copyright notice and scale indicator, as all app buttons are overlays on the map widget. Therefore their renderer is that of the qml engine. The aliasing could differ between the map and those overlays.

Hi @lennonhill, are you using "Tiled rendering" (can be turn on in configuration) or plain rendering? Because with tile rendering tile image may be re-scaled and it is causing such bluring...

commented

I've tried both and I don't really see a difference. I will check the debug log to get information about the detected screen resolution as soon as I've set up a suitable build environment.

I added a patch over libosmscout to quiet debug output. So to enable full debug of osmscout you have to add the following line 81 in MapView.qml (folder controls_509 ou controls_515, depending of qt version you are using):

79        // on azimuth changed
80        compass.polled.connect(function(azimuth, rotation){ mapView.azimuth = azimuth; });
81        mapSettings.debugLevel = 2;
82    }

debugLevel = 2, means debug performance and data. Then you should see in output the dpi etc:
Draw: [0.99650 S 16.60925 W - 57.13474 N 20.06398 E] 16x/4 552x1068 127.00000 DPI

commented

Would you mind providing a debug build with this option enabled? I managed to build an apk via act after giving up on getting this to run on Arch Llinux. However, the application quits shortly after launch:

logcat
04-19 17:45:28.854 11345 11368 D osmin   : Loading providers from  "/storage/emulated/0/Android/data/io.github.janbar.osmin/files/resources/voice-providers.json"
04-19 17:45:28.854 11345 11345 W QtThread: type=1400 audit(0.0:61971): avc: denied { ioctl } for path="socket:[450555]" dev="sockfs" ino=450555 ioctlcmd=0x8927 scontext=u:r:untrusted_app_27:s0:c234,c256,c512,c768 tcontext=u:r:untrusted_app_27:s0:c234,c256,c512,c768 tclass=tcp_socket permissive=0 app=io.github.janbar.osmin
04-19 17:45:28.865 11345 11400 D osmin   : Basemap found and loaded from ' "/storage/emulated/0/Android/data/io.github.janbar.osmin/files/resources/world" '...
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:25:1: module "QtGraphicalEffects" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:24:1: module "Qt.labs.settings" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:22:1: module "QtQuick.Controls.Universal" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:21:1: module "QtQuick.Controls.Material" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:20:1: module "QtQuick.Controls" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:19:1: module "QtQuick.Layouts" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:25:1: module "QtGraphicalEffects" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:24:1: module "Qt.labs.settings" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:22:1: module "QtQuick.Controls.Universal" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:21:1: module "QtQuick.Controls.Material" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:20:1: module "QtQuick.Controls" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:19:1: module "QtQuick.Layouts" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:25:1: module "QtGraphicalEffects" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:24:1: module "Qt.labs.settings" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:22:1: module "QtQuick.Controls.Universal" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:21:1: module "QtQuick.Controls.Material" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:20:1: module "QtQuick.Controls" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:19:1: module "QtQuick.Layouts" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:25:1: module "QtGraphicalEffects" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:24:1: module "Qt.labs.settings" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:22:1: module "QtQuick.Controls.Universal" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:21:1: module "QtQuick.Controls.Material" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:20:1: module "QtQuick.Controls" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:19:1: module "QtQuick.Layouts" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:25:1: module "QtGraphicalEffects" is not installed
04-19 17:45:28.919 11345 11368 W osmin   : qrc:/controls2/osmin.qml:24:1: module "Qt.labs.settings" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:22:1: module "QtQuick.Controls.Universal" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:21:1: module "QtQuick.Controls.Material" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:20:1: module "QtQuick.Controls" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:19:1: module "QtQuick.Layouts" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:25:1: module "QtGraphicalEffects" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:24:1: module "Qt.labs.settings" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:22:1: module "QtQuick.Controls.Universal" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:21:1: module "QtQuick.Controls.Material" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:20:1: module "QtQuick.Controls" is not installed
04-19 17:45:28.920 11345 11368 W osmin   : qrc:/controls2/osmin.qml:19:1: module "QtQuick.Layouts" is not installed
04-19 17:45:28.976 11380 11380 W System.err: 	at io.github.janbar.osmin.QtAndroidService.onCreate(QtAndroidService.java:19)
04-19 17:45:28.980 11380 11380 W System.err: 	at io.github.janbar.osmin.QtAndroidService.onCreate(QtAndroidService.java:19)
04-19 17:45:29.054  1514  1778 I ActivityManager: Deferring FGS notification in legacy app io.github.janbar.osmin/u0a234 : Notification(channel=ForegroundServiceChannel shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE)
04-19 17:45:29.277  1514  2952 I ActivityManager: Process io.github.janbar.osmin (pid 11345) has died: cch CRE
commented

Comparing the release apk (1.8.5) and my apk (6b95edb), it's obvious that some of the shared libraries are missing. When are these supposed to be added? Are they present in your debug builds? I use cmake 3.16 instead of cmake 3.23 and there is also a chance that some of my environment variables differ or are unset.

diff
1a2
> ./assets/android_rcc_bundle.rcc
43d43
< ./assets/resources/stylesheets/contour_lines.ost
46,47d45
< ./assets/resources/stylesheets/max_speeds.ost
< ./assets/resources/stylesheets/motorways.ost
338d335
< ./classes2.dex
377a375,400
> ./lib/arm64-v8a/libqml_QtGraphicalEffects_private_qtgraphicaleffectsprivate_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtGraphicalEffects_qtgraphicaleffectsplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_Qt_labs_folderlistmodel_qmlfolderlistmodelplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_Qt_labs_settings_qmlsettingsplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtPositioning_declarative_positioning_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQml_Models.2_modelsplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQml_qmlplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQml_RemoteObjects_qtqmlremoteobjects_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQml_StateMachine_qtqmlstatemachine_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQml_WorkerScript.2_workerscriptplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick.2_qtquick2plugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls.2_Fusion_qtquickcontrols2fusionstyleplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls.2_Imagine_qtquickcontrols2imaginestyleplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls.2_Material_qtquickcontrols2materialstyleplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls.2_qtquickcontrols2plugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls.2_Universal_qtquickcontrols2universalstyleplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls_qtquickcontrolsplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls_Styles_Android_qtquickcontrolsandroidstyleplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Controls_Styles_Flat_qtquickextrasflatplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Dialogs_dialogplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Dialogs_Private_dialogsprivateplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Extras_qtquickextrasplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Layouts_qquicklayoutsplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_PrivateWidgets_widgetsplugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Templates.2_qtquicktemplates2plugin_arm64-v8a.so
> ./lib/arm64-v8a/libqml_QtQuick_Window.2_windowplugin_arm64-v8a.so
384a408
> ./lib/arm64-v8a/libQt5PositioningQuick_arm64-v8a.so
386a411
> ./lib/arm64-v8a/libQt5QmlWorkerScript_arm64-v8a.so
396,397c421,422
< ./META-INF/CERT.RSA
< ./META-INF/CERT.SF
---
> ./META-INF/KEY0.RSA
> ./META-INF/KEY0.SF

I have no idea how to build an apk for GrapheneOS. The package should contains all binaries and qml modules too.

Edit: Is a Android package you are using ? If yes then I could provide to you a signed apk with the right debug level flag.

commented

Yes, GrapheneOS also Android-based. Thanks uploading your build. I gave it a try but did not get the expected output via logcat. I get the debug-level "Skip database ..." messages, but nothing more when panning or zooming on the map.

commented

I witness the same behaviour (suboptimal rendering and lack of Draw ... debug messages with the debug build) on another LineageOS 18.1 device.

I checked the logcat, and all debug messages are dropped for a signed build. So we have to build a debug build without signature. In the repository you will find the script "android/linux-build-arm64-qt515.sh" to do it as follows:

  • First clone the repository of the branch 1.8:

    git clone https://github.com/janbar/osmin -b fixes/1.8
    git submodule init && git submodule update

  • You need to install the jdk1.8, android build tools (platform-tools, ndk 21), and the android binaries for Qt5.15:
    See the content of the build script (linux-build-arm64-qt515.sh) for required version of the ndk, and you could customize the paths depending of your deployment ...

  • Then build the android APK for debug (the debug build can be achieved by launching the script without argunments):

    cd android
    cp AndroidManifest.xml.in.ndk21 AndroidManifest.xml.in
    ./linux-build-arm64-qt515.sh

  • Finally, install the generated APK in your device with "adb install". But first you have to deinstall the signed APK.

commented

I'm still experiencing the same issue, i.e. the application crashes and I see warnings about some modules (e.g. QtQuick.Layouts; see logcat above) not being installed. The files indicated as missing in the diff above are still missing. I don't know much about Qt development, so I don't know when those modules would be added or which component in the build process would add / register them. My best guess is that there is minor discrepancy between our build environments that causes mine to silently produce faulty builds.

I uploaded the debug APK: https://github.com/janbar/osmin/releases/download/1.8.6/osmin-arm64-FOR_DEBUG_ONLY.apk
The relase is 1.8.6 without patch to quiet osmscout debug messages. To instal it you will have to uninstall first the installed APK which is signed.

commented

Thanks for the effort. The log out put is more verbose now, but I am still missing the Draw: ... DPI outputs. I will try to compile one of the older versions using NDK 18 once I find the time. I suspect that for some reason the packaging goes wrong in my build environment, even though I don't see any relevant difference between your build log and mine.

commented

Is 73f3df9 relevant to the debug output I was missing? If so I would try this if you happen to have another debug build.

Hi @hrdl-github , I released the latest android app with a debug logging option. Apk is available at "https://github.com/janbar/osmin/releases/download/1.9.6/osmin-arm64-v8a-with-debug-option-signed.apk".
To enable debug logging you have to:

  • click the burger menu on the map screen (under the compass)
  • click "Settings"
  • click on top-right burger menu, then click "About"
  • In the dialog, check the option "Enable debug logging"