ViewPiece.qml:105: TypeError: Cannot read property 'sessionName' of null
-
wrote on 5 Jan 2020, 20:02 last edited by
Hello list,
I have an app using qml , and running under debian/buster. Please see:
https://github.com/SietseAchterop/RtcNoordAppOn exiting the program that works fine in itself otherwise I get about 10 of the
above messages, of different properties. Always the "of null".
The properties are actually used in the correctly working app.
The problem also happens when I start the program and then immediately close it again.
There probably is something wrong in bringing down the application, but I have no
idea how to tackle this.I am not aware that I am doing something unusual.
Hopefully someone can point me in a direction.Thanks in advance, Sietse
-
wrote on 6 Jan 2020, 11:17 last edited by
Hi,
I'm having the same issue since Qt 5.14. When I quit my app all the properties I exposed to QML via setContextProperty are set to null or undefined and in some way QML tries to access them on exit. It was fine in 5.13.
Thomas
-
wrote on 6 Jan 2020, 21:29 last edited by
Now you mention it, I think that's the case here also.
So it could well be a regression. -
wrote on 8 Jan 2020, 16:24 last edited by
Hi,
I've created an issue on Qt bug report platform : https://bugreports.qt.io/browse/QTBUG-81247
-
wrote on 9 Jan 2020, 08:40 last edited by
If you didn't check the QTBUG, the solution is to construct the object you want to expose to QML before the engine itself so they are destroyed after the engine.
-
wrote on 14 Jan 2020, 08:02 last edited by
I've created all my objects before engine but the bug still occurs if the app stops after less than 5 seconds (approximately)
-
wrote on 28 Jan 2020, 17:37 last edited by Jovan Mitrevski
The bug was closed, but I still see the problem.
context.setContextProperty("bridge", bridge) ... engine.load(QtCore.QUrl.fromLocalFile(str(qmlFile)))
I need that order because the bridge provides the data needed in the qml file. But on exit, it seems like the bridge gets closed before the qml file. Any suggestions?
-
wrote on 19 May 2020, 02:57 last edited by
I believe I figured out this issue. I left a comment on the linked bug.