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

macOS: Crash in QVariant::fromValue when called in a plugin with an object defined in a shared library

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 5.12.3, 5.13.0
    • Core: Other, Core: Plugins
    • None
    • macOS 10.12.3, macOS 10.13.6, Qt Qt 5.9.3, Qt 5.12.3, Qt 5.13.0
    • macOS

    Description

      I have the following use case (source code attached):

      A Qt plugin that uses a shared library (named sdk) and the plugin provides some functionality for the main app that loads it. If the plugin calls `QVariant::fromValue` and sends as parameter an object which is defined in the shared library, the application crashes when loading the plugin the second time (Load -> Unload -> Load => crash).

      I have noticed that if the the library linked from the plugin is compiled statically the application does not crash. Also, if the object passed as parameter to `QVariant::fromValue` does not have the default constructor, the copy constructor and the destructor defined the crash does not appear.

      I wasn't able to figure out the cause of the problem in my app, I suppose there's something wrong in `QVariant`.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            niculare nicu lare
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes