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

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Won't Do
    • Affects Version/s: 5.12.3, 5.13.0
    • Fix Version/s: None
    • Component/s: Core: Other, Core: Plugins
    • Labels:
      None
    • Environment:
      macOS 10.12.3, macOS 10.13.6, Qt Qt 5.9.3, Qt 5.12.3, Qt 5.13.0
    • Platform/s:
      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

            Assignee:
            thiago Thiago Macieira
            Reporter:
            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