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
Forum Updated to NodeBB v4.3 + New Features

eliminating "RTTI symbol not found" problem

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 4 Posters 1.4k Views 2 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on 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...

    JoeCFDJ JonBJ 2 Replies Last reply
    0
    • mzimmersM mzimmers

      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...

      JonBJ Online
      JonBJ Online
      JonB
      wrote on 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
      • mzimmersM mzimmers

        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...

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on 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
        • mzimmersM mzimmers

          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...

          JonBJ Online
          JonBJ Online
          JonB
          wrote on 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
          • jeremy_kJ Offline
            jeremy_kJ Offline
            jeremy_k
            wrote on 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/

            mzimmersM 1 Reply Last reply
            2
            • jeremy_kJ jeremy_k

              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).

              mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by mzimmers
              #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
              • mzimmersM mzimmers has marked this topic as solved on

              • Login

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