Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QAxObject SIGSEGV

    General and Desktop
    2
    11
    4446
    Loading More Posts
    • 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
      Maxbester last edited by

      Hi there,

      I am developing an application using an existing tlb file. I use dumpcpp to generate a C++ namespace.

      But when I try to access some members, a segmentation fault occurs in qmetaobject.cpp line 679.

      This is in: @int QMetaObject::indexOfProperty(const char *name) const;@

      I guess it means that Qt can't find this member in the object. However I am sure it exists. What could be wrong?

      Should I use querySubObject() instead of calling directly the generated method?

      1 Reply Last reply Reply Quote 0
      • M
        Maxbester last edited by

        Still no reply and still no solution.

        I realised the problem occurs when I try to access a method when the ActiveX connection is not established yet.

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          I'm not a QAx specialist, but are you sure your object is valid when you try to call that method ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • M
            Maxbester last edited by

            Absolutely not. That's the point. The object is sometimes valid but not always and I don't know how to check it...

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Can you show how you create it and use it ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • M
                Maxbester last edited by

                I use a tlb file. My .pro file has:

                @TYPELIBS = $$system( dumpcpp lib/Pulse.tlb -n PulseLabShop -o src/controller/Pulse )@

                Then I create the connection with:

                @PulseLabShop::Application *app = new PulseLabShop::Application();@

                In a destructor I have:

                @
                app->CloseProject(true);
                app->Quit();
                @

                But if the connection has been lost I have a SIGSEGV error. I would like to check if I can reliably call the Quit() function.

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  What other methods are available in this Application object ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply Reply Quote 0
                  • M
                    Maxbester last edited by

                    It has many but all will fail if the connection has not been set or if the connection is broken. I think the QMetaObject class shall have a method that tests the establishment of a connection.

                    Hasn't anyone faced this problem before?

                    1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      That's a question you should ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply Reply Quote 0
                      • M
                        Maxbester last edited by

                        Okay you're right.

                        Just an additional information.

                        I voluntarily generated an error while connecting to the QAxObject and I got those messages in the Qt Creator console:

                        @
                        CoCreateInstance failure (The class has not a valid license.)

                        QAxBase::setControl: requested control {587b4a33-81d3-11cf-91c5-0020af429815} could not be instantiated

                        QAxBase::qt_metacall: Object is not initialized, or initialization failed
                        @

                        So some messages are emitted. The question is how to catch them...

                        1 Reply Last reply Reply Quote 0
                        • SGaist
                          SGaist Lifetime Qt Champion last edited by

                          Maybe the QAxBase::exception signal ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post