osmscout-server icon indicating copy to clipboard operation
osmscout-server copied to clipboard

Make it possible to enable/disable main menu in Ubuntu Touch

Open rinigus opened this issue 4 years ago • 11 comments

Right now, enabled is just a dummy property. Fix it properly. Corresponding log from earlier issue:

Published using Logviewer for Ubuntu Touch
From file /home/phablet/.cache/upstart/application-click-osmscout-server.jonnius_osmscout-server_2.0.0.log:
Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
library "libgui.so" wasn't loaded and RTLD_NOLOAD prevented it
Creating a QMirClientScreen now
qml: Error while creating component
qml: qrc:/qml/MainMenu.qml:29 "MenuDrawerPL.enabled" is not available due to component versioning.

qrc:/qml/platform/ApplicationWindowPL.qml:60: TypeError: Value is null and could not be converted to an object
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Cannot call method 'open' of null
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Cannot call method 'open' of null
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Cannot call method 'open' of null
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error
qt.qpa.mirclient: Attempted to deliver an event to a non-existent window, ignoring.
Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
library "libgui.so" wasn't loaded and RTLD_NOLOAD prevented it
Creating a QMirClientScreen now
qml: Error while creating component
qml: qrc:/qml/MainMenu.qml:29 "MenuDrawerPL.enabled" is not available due to component versioning.

qrc:/qml/platform/ApplicationWindowPL.qml:60: TypeError: Value is null and could not be converted to an object
[PERFORMANCE]: Last frame took 88 ms to render.
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Cannot call method 'open' of null
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Cannot call method 'open' of null
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Cannot call method 'open' of null
qrc:/qml/platform/ApplicationWindowPL.qml:82: TypeError: Type error

rinigus avatar Mar 30 '21 20:03 rinigus

As it is using Qt Controls2 Drawer, we just need to wait for Qt 5.12 update of Ubuntu Touch. See https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#enabled-prop

rinigus avatar Apr 21 '21 06:04 rinigus

We already have Qt 5.12 in Ubuntu Touch.

jonnius avatar Apr 21 '21 17:04 jonnius

The issue above should not have happened after Qt 5.10 - so I wonder whether update to 5.12 happened in meantime?

rinigus avatar Apr 21 '21 17:04 rinigus

We were on Qt 5.12 when we hit the issue. I just tested removing https://github.com/rinigus/osmscout-server/commit/6dc09e39f1793fd7149380f1d0883b040539fc56 and the issue persists. It seems we have QtQuickControls 2.5 (qtquickcontrols2-5-dev) in UT.

jonnius avatar Apr 21 '21 18:04 jonnius

Strange, there is no such version. See https://doc.qt.io/qt-5/qtquickcontrols-index.html#versions . I wonder why removing that commit doesn't fix it. The error

"MenuDrawerPL.enabled" is not available due to component versioning.

indicates that we are limiting it by versioning, but 2.12 should have it available. Puzzling and cannot really test it over here either.

rinigus avatar Apr 21 '21 18:04 rinigus

Trying to get help in UT app dev group...

In fact you can reproduce the issue easily in Clickable Desktop Mode as explained in https://github.com/rinigus/osmscout-server/tree/master/packaging/click#readme.

jonnius avatar Apr 21 '21 18:04 jonnius

Couldn't get clickable desktop to run last night when I tried and then, after some struggling, had to stop with it. Let's see if we will get help.

rinigus avatar Apr 21 '21 18:04 rinigus

I would be interested in understanding your struggle in order to improve Clickable.

jonnius avatar Apr 21 '21 19:04 jonnius

Some comment from the group:

if you have other QMLs in the project importing a different version, it can cause problems. had this issue with like addressbook and dialer iirc, when updating to 5.12

jonnius avatar Apr 21 '21 19:04 jonnius

And by the way, we have QtQuick and Controls 2.12 in UT, not 2.5. That number is something else.

jonnius avatar Apr 21 '21 19:04 jonnius

We do have a mix of versions, as we have support from Qt version of SFOS (5.6). So, the base is imported with the lower version. Maybe that is what we are hitting here. Let's keep it open and see when we can bump the versions for Qt.

As such, this issue is nothing major and may prevent some corner case when server process crashes. However, it will just be impossible to apply any changes anyway, so it should be OK for now.

rinigus avatar Apr 21 '21 19:04 rinigus

Is it resolved now with UT 20.04?

rinigus avatar Jan 27 '23 18:01 rinigus

We already have reverted this workaround. See https://github.com/rinigus/osmscout-server/pull/402.

jonnius avatar Jan 28 '23 12:01 jonnius

Excellent. closing it here then.

rinigus avatar Jan 28 '23 13:01 rinigus