nymea / nymea-app

A nymea frontend app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App hangs upon click on sensor diagram

hermanndetz opened this issue · comments

This error occurred during plugin development, so a potentially buggy partially-completed plugin is involved.

Opening the temperature sensor of a thing and clicking on the temperature vs. time plot leads to a complete freeze of the app. The (empty) plot in question is attached as picture. The terminal output is attached in the following. It should be noted that the last line before the crash starting with "min QVariant(Invalid) ..." appears, when clicking on the temperature sensor thing that opens the temperature vs. time plot. When doing the actual click on the plot, which leads to the crash, there is no additional terminal output.
temp_plot

`App log opened at ".../.cache/nymea/nymea-app/nymea-app.log"
nymea:app 1.0.238 running on "..." "Ubuntu 20.04.1 LTS" "ubuntu" "20.04"
Locale info: QLocale(English, Latin, United States) "en_US" QLocale::English QLocale(English, Latin, United States)
Failed to load translations for locale QLocale(English, Latin, United States)
Loaded Host from cache "nymea" QUuid("{962c99a8-da40-49b7-96cb-f990349690e0}")
|- Connection: "0" QUrl("nymeas://127.0.0.1:2222") Connection::BearerTypeLoopback secure: true
|- Connection: "1" QUrl("nymeas://10.0.0.163:2222") Connection::BearerTypeLan secure: true
UPnP: Discovering on QHostAddress("10.0.0.163") 49125
ZeroConf: Created service browser for _jsonrpc._tcp: true
ZeroConf: Created service browser for _ws._tcp: true
No current host... Nothing to do...
UPNP: Discovery started...
Setting AWS configuration to "Community"
qml: AWS not logged in. Cannot register for push
qml: Last connected host was {962c99a8-da40-49b7-96cb-f990349690e0}
UPNP: Discovery stopped.
qml: calling init. Auth required: false initial setup required: false jsonrpc connected: false Current host: NymeaHost(0x5602e208f520)
Nymea host is "nymea" QUuid("{962c99a8-da40-49b7-96cb-f990349690e0}")
Best candidate Loopback connection: QUrl("nymeas://127.0.0.1:2222")
Connecting to: QUrl("nymeas://127.0.0.1:2222") TcpSocketTransport(0x5602e2397c90) Connection(0x5602e20926d0)
TCP socket connecting to "127.0.0.1" 2222
Socket state changed --> QAbstractSocket::HostLookupState
Socket state changed --> QAbstractSocket::ConnectingState
No available Cloud connection to "nymea"
qrc:/ui/RootItem.qml:373:31: QML TabButton: Binding loop detected for property "width"
: QML QQuickLayoutAttached: Binding loop detected for property "preferredHeight"
Socket state changed --> QAbstractSocket::ConnectedState
There's a host but no connection. Trying to connect now...
Best candidate Loopback connection: QUrl("nymeas://127.0.0.1:2222")
Already have a connection (or connection attempt) for QUrl("nymeas://127.0.0.1:2222")
No available Cloud connection to "nymea"
SSL errors for url: QUrl("nymeas://127.0.0.1:2222")
"The host name did not match any of the valid hosts for this certificate"
Ignoring host mismatch on certificate.
"The certificate is self-signed, and untrusted"
Ignoring self signed certificate.
TCP socket encrypted
NymeaConnection: Connected to "nymea" via QUrl("nymeas://127.0.0.1:2222")
JsonRpcClient: Transport connected. Starting handshake.
Zeroconf: Adding new connection to host: "nymea" "wss://10.0.0.163:4444"
Zeroconf: Setting connection online: "nymea" "nymeas://10.0.0.163:2222"
Zeroconf: Adding new connection to host: "nymea" "wss://10.0.0.35:4444"
Zeroconf: Adding new connection to host: "nymea" "nymeas://10.0.0.35:2222"
Zeroconf: Adding new connection to host: "nymea" "wss://127.0.0.1:4444"
Zeroconf: Setting connection online: "nymea" "nymeas://127.0.0.1:2222"
Handshake reply: Protocol version: "5.1" InitRequired: false AuthRequired: true PushButtonAvailable: false
This connections certificate is trusted.
Hello reply: {
"authenticationRequired": true,
"initialSetupRequired": false,
"language": "en_US",
"locale": "en_US",
"name": "nymea",
"protocol version": "5.1",
"pushButtonAuthAvailable": false,
"server": "nymea",
"uuid": "{962c99a8-da40-49b7-96cb-f990349690e0}",
"version": "0.23.1+202009081353~focal1"
}

Caches: QHash()
qml: auth required changed
qml: calling init. Auth required: false initial setup required: false jsonrpc connected: false Current host: NymeaHost(0x5602e208f520)
Notifications enabled: QMap(("enabled", QVariant(bool, true))("namespaces", QVariant(QVariantList, (QVariant(QString, "Tags"), QVariant(QString, "Configuration"), QVariant(QString, "Logging"), QVariant(QString, "Rules"), QVariant(QString, "Devices"), QVariant(QString, "JSONRPC"), QVariant(QString, "Scripts"), QVariant(QString, "System")))))
qml: json client connected changed true
qml: calling init. Auth required: false initial setup required: false jsonrpc connected: true Current host: NymeaHost(0x5602e208f520)
Current connection: NymeaHost(0x5602e208f520) TcpSocketTransport(0x5602e2397c90) 1
(TcpSocketTransport(0x5602e2397c90))
Connection(0x5602e20926d0)
Engine: connected changed: true
Engine: inital setup required: false auth required: false
Notifications enabled: QMap(("enabled", QVariant(bool, true))("namespaces", QVariant(QVariantList, (QVariant(QString, "Tags"), QVariant(QString, "Configuration"), QVariant(QString, "Logging"), QVariant(QString, "Rules"), QVariant(QString, "Devices"), QVariant(QString, "JSONRPC"), QVariant(QString, "Scripts"), QVariant(QString, "System"), QVariant(QString, "Integrations")))))
Initializing thing manager took 32 ms
nymea:core capabilities: Power management: true Update management: true Time management: true
Server time: QDateTime(2020-09-28 17:43:30.000 CEST Qt::LocalTime) Automatic Time available: true Automatic time: true
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
qml: **** getting page for interfaces [sensor]
qml: Selecting page SensorDevicePage.qml for interface list: [sensor]
Both point size and pixel size set. Using pixel size.
Ignored NaN, Inf, or -Inf value.
Attempting to set invalid range for value axis: [ nan - nan ]
Ignored NaN, Inf, or -Inf value.
Attempting to set invalid range for value axis: [ nan - 0 ]
Fetching logs: {
"limit": 100,
"offset": 0,
"thingIds": [
"15347002-337a-4697-b4e4-30f5101adae6"
],
"typeIds": [
"cfd71e64-b666-45ef-8db0-8213acd82c5f"
]
}

Fetching logs: {
"limit": 100,
"offset": 0,
"thingIds": [
"15347002-337a-4697-b4e4-30f5101adae6"
],
"typeIds": [
"f0f596bf-7e45-43ea-b3d4-767b82dd422a"
]
}

QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
Received logs from 0 to 1 Actual count: 1
qml: pointadded 1601394215470 1
qml: pointadded 1601394215470 1
qml: pointadded 1601307802540 1
qml: pointadded 1601307862540 1
min QVariant(Invalid) max QVariant(Invalid) newMin QVariant(int, 0) newMax QVariant(int, 1)
Received logs from 0 to 0 Actual count: 0
qml: **** getting page for interfaces [sensor]
qml: Selecting page SensorDevicePage.qml for interface list: [sensor]
Both point size and pixel size set. Using pixel size.
Ignored NaN, Inf, or -Inf value.
Attempting to set invalid range for value axis: [ nan - nan ]
Ignored NaN, Inf, or -Inf value.
Attempting to set invalid range for value axis: [ nan - 0 ]
Fetching logs: {
"limit": 100,
"offset": 0,
"thingIds": [
"15347002-337a-4697-b4e4-30f5101adae6"
],
"typeIds": [
"cfd71e64-b666-45ef-8db0-8213acd82c5f"
]
}

Fetching logs: {
"limit": 100,
"offset": 0,
"thingIds": [
"15347002-337a-4697-b4e4-30f5101adae6"
],
"typeIds": [
"f0f596bf-7e45-43ea-b3d4-767b82dd422a"
]
}

QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
QQmlComponent: Created graphical object was not placed in the graphics scene.
Received logs from 0 to 1 Actual count: 1
qml: pointadded 1601394220306 1
qml: pointadded 1601394220306 1
qml: pointadded 1601307802540 1
qml: pointadded 1601307862540 1
min QVariant(Invalid) max QVariant(Invalid) newMin QVariant(int, 0) newMax QVariant(int, 1)
Received logs from 0 to 0 Actual count: 0
^C
`

Interesting... might happen if there is only exactly 1 sensor value available...

That's likely the reason since I had troubles filling in the values. Might actually be 0 values, but I guess you already identified the code that leads to the problem.

Do you happen to have a plugin which still reproduces this? Please be so kind and push it to somewhere.

I think I managed to reproduce. never mind.

In case you need it: nymea-plugins-modbus add-idm branch, idm thing

Found it. Thanks for the report.

fixed and merged