Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. eliminating "RTTI symbol not found" problem

eliminating "RTTI symbol not found" problem

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 4 Posters 1.2k Views
  • 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.
  • M Offline
    M Offline
    mzimmers
    wrote on 9 Feb 2024, 18:34 last edited by
    #1

    Hi all -

    I've got a bug in my app that causes a crash. When running in debug mode, though, I get this error at the point of the crash:

    RTTI symbol not found for class 'QObject'
    

    If I understand this message, it has something to do with how the program is built. Any ideas on how I can eliminate this, so I can get a stack trace to help me find my bug?

    Thanks...

    J J 2 Replies Last reply 9 Feb 2024, 18:46
    0
    • M mzimmers
      9 Feb 2024, 18:34

      Hi all -

      I've got a bug in my app that causes a crash. When running in debug mode, though, I get this error at the point of the crash:

      RTTI symbol not found for class 'QObject'
      

      If I understand this message, it has something to do with how the program is built. Any ideas on how I can eliminate this, so I can get a stack trace to help me find my bug?

      Thanks...

      J Offline
      J Offline
      JonB
      wrote on 9 Feb 2024, 18:52 last edited by
      #3

      @mzimmers
      Bearing in mind I don't know about QML environment. And you really should Google RTTI symbol not found for class 'QObject', there are quite few specific hits which may be your situation. For example, it might be

      I think this is a problem of GDB when it looks for RTTI of a type where a lambda is involved.

      But if you want to view a QObject in a debugger you will need Qt compiled for debug as well as your own code. I don't know whether this would give that error. I manage without Qt debug libraries, but I don't get to look into Qt code.

      I see @JoeCFD has posted, he probably knows a lot more than I!

      1 Reply Last reply
      1
      • M mzimmers
        9 Feb 2024, 18:34

        Hi all -

        I've got a bug in my app that causes a crash. When running in debug mode, though, I get this error at the point of the crash:

        RTTI symbol not found for class 'QObject'
        

        If I understand this message, it has something to do with how the program is built. Any ideas on how I can eliminate this, so I can get a stack trace to help me find my bug?

        Thanks...

        J Online
        J Online
        JoeCFD
        wrote on 9 Feb 2024, 18:46 last edited by
        #2

        @mzimmers one possible reason is one of your classes inherits QObject, but without Q_OBJECT. Make sure that the header file has the Q_OBJECT macro declared in it.

        1 Reply Last reply
        2
        • M mzimmers
          9 Feb 2024, 18:34

          Hi all -

          I've got a bug in my app that causes a crash. When running in debug mode, though, I get this error at the point of the crash:

          RTTI symbol not found for class 'QObject'
          

          If I understand this message, it has something to do with how the program is built. Any ideas on how I can eliminate this, so I can get a stack trace to help me find my bug?

          Thanks...

          J Offline
          J Offline
          JonB
          wrote on 9 Feb 2024, 18:52 last edited by
          #3

          @mzimmers
          Bearing in mind I don't know about QML environment. And you really should Google RTTI symbol not found for class 'QObject', there are quite few specific hits which may be your situation. For example, it might be

          I think this is a problem of GDB when it looks for RTTI of a type where a lambda is involved.

          But if you want to view a QObject in a debugger you will need Qt compiled for debug as well as your own code. I don't know whether this would give that error. I manage without Qt debug libraries, but I don't get to look into Qt code.

          I see @JoeCFD has posted, he probably knows a lot more than I!

          1 Reply Last reply
          1
          • J Offline
            J Offline
            jeremy_k
            wrote on 9 Feb 2024, 23:25 last edited by
            #4

            RTTI = Run Time Type Introspection

            By any chance does the code attempt to dynamic_cast a QObject derived object? Qt has traditionally been built with RTTI turned off (-fno-rtti or similar).

            Asking a question about code? http://eel.is/iso-c++/testcase/

            M 1 Reply Last reply 10 Feb 2024, 00:32
            2
            • J jeremy_k
              9 Feb 2024, 23:25

              RTTI = Run Time Type Introspection

              By any chance does the code attempt to dynamic_cast a QObject derived object? Qt has traditionally been built with RTTI turned off (-fno-rtti or similar).

              M Offline
              M Offline
              mzimmers
              wrote on 10 Feb 2024, 00:32 last edited by mzimmers 2 Oct 2024, 01:09
              #5

              Thanks for all the replies, guys. @JoeCFD my class does have the Q_OBJECT macro. @JonB I did search that exact string, but nothing I found seemed relevant to my situation. @jeremy_k I don't have any dynamic_cast.

              Since this looks more like a C++ problem, I'm going to mark it as solved and post something in the C++ forum. After thinking about it, I'm going to post in the QML forum since it's a QML call that provokes this.

              Thanks for looking.

              1 Reply Last reply
              0
              • M mzimmers has marked this topic as solved on 10 Feb 2024, 00:32

              5/5

              10 Feb 2024, 00:32

              • Login

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