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

QAxServer application with an embedded dumpcpp wrapped COM object crashes with a buffer overrun.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • Some future release
    • 4.6.3
    • ActiveX Support
    • None
    • Windows XP SP3, MS VS2005, Qt 4.6.3 commercial license

    Description

      I'm building a out-of-process COM object that has a QAxWidget embedding a 3rd party COM object.

      Stand alone (before adding the ActiveX Server headers to our main.cpp) it works fine. But after transforming my app to a QAxServer it crashes due to a buffer overrun. The embedded COM object gets created, but the object pointers that I get out of this wrapped COM object seem to be invalid/wrong type (can't really tell what type but they're not NULL).

      This behaviour is repeatable, I verified my case using the Qutlook example and the following steps:
      Added ActiveX Server Library to the Qt Project Options.
      Changed the position of QAxServerd.lib so that it is used before QAxContainerd.lib to get rid of "already defined" link errors.
      And added the AxFactory headers to the main entry point to see if it would break.

      "Qutlook" main.cpp:

      #include "addressview.h"
      #include <QApplication>
      #include <QAxFactory>
      
      QAXFACTORY_DEFAULT(AddressView,
                           "{A9D26251-F732-4598-B10B-60E8492BB023}",
                           "{8BA74D64-9A82-4cc2-AE32-DF1A74E83C9E}",
                           "{546DF316-2602-4816-8210-83B20AC076F0}",
                           "{624BC818-F458-4217-BF18-36BC55BCBFEA}",
                           "{D91298FB-10E3-4a65-B267-D4C121960957}");
      
      int main(int argc, char ** argv)
      {
          QApplication a(argc, argv);
      
          AddressView view;
          view.setWindowTitle("Qt Example - Looking at Outlook");
          view.show();
      
          return a.exec();
      }
      

      Raises an exception at runtime:
      "Unhandled exception at 0x00424087 in qutlook.exe: 0xC0000005: Access violation reading location 0x00000002."
      Without the QAXFACTORY_DEFAULT template it works honky dory.

      Attachments

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

        Activity

          People

            pullatti Prasanth Ullattil
            joshua Joshua Krosenbrink
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes