Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ViewPiece.qml:105: TypeError: Cannot read property 'sessionName' of null
Forum Updated to NodeBB v4.3 + New Features

ViewPiece.qml:105: TypeError: Cannot read property 'sessionName' of null

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 5 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SietseAchteropS Offline
    SietseAchteropS Offline
    SietseAchterop
    wrote on last edited by
    #1

    Hello list,

    I have an app using qml , and running under debian/buster. Please see:
    https://github.com/SietseAchterop/RtcNoordApp

    On 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

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thomas12345
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • SietseAchteropS Offline
        SietseAchteropS Offline
        SietseAchterop
        wrote on last edited by
        #3

        Now you mention it, I think that's the case here also.
        So it could well be a regression.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Thomas12345
          wrote on last edited by
          #4

          Hi,

          I've created an issue on Qt bug report platform : https://bugreports.qt.io/browse/QTBUG-81247

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Thomas12345
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              Jim Gir
              wrote on last edited by
              #6

              I've created all my objects before engine but the bug still occurs if the app stops after less than 5 seconds (approximately)

              1 Reply Last reply
              0
              • J Offline
                J Offline
                Jovan Mitrevski
                wrote on last edited by Jovan Mitrevski
                #7

                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?

                1 Reply Last reply
                1
                • B Offline
                  B Offline
                  benjamin.green
                  wrote on last edited by
                  #8

                  I believe I figured out this issue. I left a comment on the linked bug.

                  1 Reply Last reply
                  1

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved