Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] QObject::children problem
Forum Updated to NodeBB v4.3 + New Features

[solved] QObject::children problem

Scheduled Pinned Locked Moved General and Desktop
10 Posts 3 Posters 5.6k 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.
  • B Offline
    B Offline
    broadpeak
    wrote on last edited by
    #1

    What is wrong?
    @
    QObject* parentObject;
    QObjectList ol = parentObject->children();
    @

    When the parentObject is empty, I got this error:

    (Internal error: pc 0xf in read in psymtab, but not in symtab.)
    ...
    (Internal error: pc 0x10 in read in psymtab, but not in symtab.)
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    ...
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    (Internal error: pc 0xf in read in psymtab, but not in symtab.)
    ...
    (Internal error: pc 0x10 in read in psymtab, but not in symtab.)
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    ...
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    (Internal error: pc 0xf in read in psymtab, but not in symtab.)
    ...
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    ...
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    (Internal error: pc 0xf in read in psymtab, but not in symtab.)
    ....
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    ...
    can't find linker symbol for virtual table for QObject' value found qt_meta_stringdata_QAbstractItemView' instead
    found `qt_meta_stringdata_QAbstractItemView' instead
    ...
    ASSERT: "d" in file c:\Digia\Qt\4.8.3\include/QtCore/../../src/corelib/tools/qscopedpointer.h, line 112
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      parentObject is an invalid pointer. You need to create an object with the new keyword and assign it to the pointer.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • B Offline
        B Offline
        broadpeak
        wrote on last edited by
        #3

        Thanks, I've modified the code according to your suggestion.
        But:
        I got the same error message:
        ASSERT: "d" in file c:\Digia\Qt\4.8.3\include/QtCore/../../src/corelib/tools/qscopedpointer.h, line 112
        Invalid parameter passed to C runtime function.
        Invalid parameter passed to C runtime function.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Make sure to rerun qmake so that moc picks up your changes.

          (Z(:^

          1 Reply Last reply
          0
          • B Offline
            B Offline
            broadpeak
            wrote on last edited by
            #5

            [quote author="sierdzio" date="1353932193"]Make sure to rerun qmake so that moc picks up your changes.[/quote]

            I made a full clean-up, made a qmake run, made a full rebuild and
            I have no success.
            ('m gonna crayzeeee...)

            1 Reply Last reply
            0
            • B Offline
              B Offline
              broadpeak
              wrote on last edited by
              #6

              Waaaaaaaaaaaahhhhh! Solved!
              The problem was in full other place!
              I had an object on the stack, and after the code goes out of scope
              that object is cleared....

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                Ah, good to know, because I was out of ideas here :)

                (Z(:^

                1 Reply Last reply
                0
                • JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  That's quite strange. Can you make a minimal program that shows that behaviour (e.g. put the buggy code in int main() ) and post it here?

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  0
                  • JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #9

                    Whoops, too late :) Glad to hear you solved it

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      broadpeak
                      wrote on last edited by
                      #10

                      Typical C++ happyness:
                      The point of crash and the error message was
                      totally misleading (for me) :)
                      Thanks to all!

                      1 Reply Last reply
                      0

                      • Login

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