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

access violation at address on windows 10 when unloaded qt library

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • 5.4.2
    • Core: Plugins
    • None

      I am trying use qt in windows 10 and when i try unload qt libraries it is behaving to crash application. I am analysed code and find bug in Qt5Core library in file qlibrary.cpp. You are deleting pointer on smart object in line 550 (delete inst.data()). Please, fix it.

      bool QLibraryPrivate::unload(UnloadFlag flag)
      {
      if (!pHnd)

      { return false; }

      if (libraryUnloadCount.load() > 0 && !libraryUnloadCount.deref()) { // only unload if ALL QLibrary instance wanted to
      delete inst.data();
      if (flag == NoUnloadSys || unload_sys())

      { if (qt_debug_component()) qWarning() << "QLibraryPrivate::unload succeeded on" << fileName << (flag == NoUnloadSys ? "(faked)" : ""); //when the library is unloaded, we release the reference on it so that 'this' //can get deleted libraryRefCount.deref(); pHnd = 0; instance = 0; }

      }

      return (pHnd == 0);
      }

        1. qlibrary.cpp
          37 kB
          Sergey Zaikin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            zserjo Sergey Zaikin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes