Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121424

Invalid method invoke packet received

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6.1
    • Remote Objects
    • None
    • Windows

    Description

      According to this part of the RemoteObjects documentation https://doc.qt.io/qt-6/qtremoteobjects-source.html#identifying-sources

      The name under which that remoteobject is made public on the registry is chosen by that order stated in the documentation.

      I customized my repc like followed:
      repcodegenerator.cpp

      if (mode != SIMPLE_SOURCE) {
            // m_stream << "    Q_CLASSINFO(QCLASSINFO_REMOTEOBJECT_TYPE, \""
            //          << astClass.name << "\")" << Qt::endl;
            // m_stream << "    Q_CLASSINFO(QCLASSINFO_REMOTEOBJECT_SIGNATURE, \""
            //          << QLatin1String(classSignature(astClass)) << "\")" <<
            //          Qt::endl;
      

      After that I tried using the registry like followed:

               QString id = QUuid::createUuid().toString();
               bool rslt = p.data()->enableRemoting(&obj, id);
      

      and like so

               QString id = QUuid::createUuid().toString();
               obj.setObjectName(QStringLiteral("%1-%2")).arg("ExampleClass",id));
               bool rslt = p.data()->enableRemoting(&obj);
      

      Both versions result in the error

             qt.remoteobjects:  Invalid method invoke packet received.  Index = 0 which is out of bounds for type "ExampleClass-{6dd0a02e-50b0-446f-b264-0808b757e507}"
      

      After reverting the changes made in repc it works again. Specifically

      Q_CLASSINFO(QCLASSINFO_REMOTEOBJECT_TYPE, \""
                   << astClass.name << "\")" << Qt::endl;
      

      makes it work

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bstottle Brett Stottlemyer
            redman Calvin Flatt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes